(backend) add option to configure list of required OIDC claims

We want to be able to refuse connection for users who have missing
claims from a list of required keys.
This commit is contained in:
Samuel Paccoud - DINUM
2024-12-21 08:55:26 +01:00
committed by Samuel Paccoud
parent 02a4740c66
commit c879f82114
4 changed files with 100 additions and 0 deletions

View File

@@ -474,6 +474,9 @@ class Base(Configuration):
environ_prefix=None,
)
USER_OIDC_REQUIRED_CLAIMS = values.ListValue(
default=[], environ_name="USER_OIDC_REQUIRED_CLAIMS", environ_prefix=None
)
USER_OIDC_FIELDS_TO_FULLNAME = values.ListValue(
default=["first_name", "last_name"],
environ_name="USER_OIDC_FIELDS_TO_FULLNAME",