Skip to content

Commit 2961eb3

Browse files
committed
🔧(backend) allow configuring settings OIDC_OP_USER_ENDPOINT_FORMAT
The djang-lasuite package manages the settings OIDC_OP_USER_ENDPOINT_FORMAT allowing to enforce the format use by the user endpoint. By default it is set to `AUTO`.
1 parent fc68b71 commit 2961eb3

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to
1010

1111
- ✨(backend) support creating subdoc from file #1987
1212
- ✨(buildpack) add PaaS deployment support, tested with Scalingo #2293
13+
- 🔧(backend) allow configuring settings OIDC_OP_USER_ENDPOINT_FORMAT
1314

1415
### Fixed
1516

docs/env.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ These are the environment variables you can set for the `impress-backend` contai
105105
| OIDC_OP_LOGOUT_ENDPOINT | Logout endpoint for OIDC | |
106106
| OIDC_OP_TOKEN_ENDPOINT | Token endpoint for OIDC | |
107107
| OIDC_OP_USER_ENDPOINT | User endpoint for OIDC | |
108+
| OIDC_OP_USER_ENDPOINT_FORMAT | user endpoint format. Values can be `AUTO`, `JSON` or `JWT`| `AUTO` | |
108109
| OIDC_REDIRECT_ALLOWED_HOSTS | Allowed hosts for OIDC redirect url | [] |
109110
| OIDC_REDIRECT_REQUIRE_HTTPS | Require https for OIDC redirect url | false |
110111
| OIDC_RP_CLIENT_ID | Client id used for OIDC | impress |

src/backend/impress/settings.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from corsheaders.defaults import default_headers
2323
from csp.constants import NONE
2424
from lasuite.configuration.values import SecretFileValue
25+
from lasuite.oidc_login.enums import OIDCUserEndpointFormat
2526
from sentry_sdk.integrations.django import DjangoIntegration
2627
from sentry_sdk.integrations.logging import ignore_logger
2728

@@ -614,6 +615,12 @@ class Base(Configuration):
614615
OIDC_OP_USER_ENDPOINT = values.Value(
615616
None, environ_name="OIDC_OP_USER_ENDPOINT", environ_prefix=None
616617
)
618+
OIDC_OP_USER_ENDPOINT_FORMAT = values.Value(
619+
OIDCUserEndpointFormat.AUTO.name,
620+
environ_name="OIDC_OP_USER_ENDPOINT_FORMAT",
621+
eviron_prefix=None,
622+
choices=[e.name for e in OIDCUserEndpointFormat],
623+
)
617624
OIDC_OP_LOGOUT_ENDPOINT = values.Value(
618625
None, environ_name="OIDC_OP_LOGOUT_ENDPOINT", environ_prefix=None
619626
)

0 commit comments

Comments
 (0)