diff --git a/.env.template b/.env.template index 364a5ea86..986476aa7 100644 --- a/.env.template +++ b/.env.template @@ -24,7 +24,6 @@ SIB_API_KEY=__key_to_be_set__ # for Inclusion Connect INCLUSION_CONNECT_BASE_URL=http://127.0.0.1:8080 -INCLUSION_CONNECT_REALM=local INCLUSION_CONNECT_CLIENT_ID=local_inclusion_connect INCLUSION_CONNECT_CLIENT_SECRET=__key_to_be_set__ diff --git a/config/settings/base.py b/config/settings/base.py index fd6c7bb86..b2607623c 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -285,7 +285,6 @@ # Inclusion Connect # ------------------------------------------------------------------------------ INCLUSION_CONNECT_BASE_URL = os.getenv("INCLUSION_CONNECT_BASE_URL") -INCLUSION_CONNECT_REALM = os.getenv("INCLUSION_CONNECT_REALM") INCLUSION_CONNECT_CLIENT_ID = os.getenv("INCLUSION_CONNECT_CLIENT_ID") INCLUSION_CONNECT_CLIENT_SECRET = os.getenv("INCLUSION_CONNECT_CLIENT_SECRET") diff --git a/lacommunaute/inclusion_connect/constants.py b/lacommunaute/inclusion_connect/constants.py index 7a1d767f3..98f83d92d 100644 --- a/lacommunaute/inclusion_connect/constants.py +++ b/lacommunaute/inclusion_connect/constants.py @@ -8,15 +8,14 @@ INCLUSION_CONNECT_CLIENT_ID = settings.INCLUSION_CONNECT_CLIENT_ID INCLUSION_CONNECT_CLIENT_SECRET = settings.INCLUSION_CONNECT_CLIENT_SECRET -INCLUSION_CONNECT_REALM_ENDPOINT = "{base_url}/realms/{realm}/protocol/openid-connect".format( +INCLUSION_CONNECT_ENDPOINT = "{base_url}/auth".format( base_url=settings.INCLUSION_CONNECT_BASE_URL, - realm=settings.INCLUSION_CONNECT_REALM, ) -INCLUSION_CONNECT_ENDPOINT_AUTHORIZE = f"{INCLUSION_CONNECT_REALM_ENDPOINT}/auth" -INCLUSION_CONNECT_ENDPOINT_REGISTRATIONS = f"{INCLUSION_CONNECT_REALM_ENDPOINT}/registrations" -INCLUSION_CONNECT_ENDPOINT_TOKEN = f"{INCLUSION_CONNECT_REALM_ENDPOINT}/token" -INCLUSION_CONNECT_ENDPOINT_USERINFO = f"{INCLUSION_CONNECT_REALM_ENDPOINT}/userinfo" -INCLUSION_CONNECT_ENDPOINT_LOGOUT = f"{INCLUSION_CONNECT_REALM_ENDPOINT}/logout" +INCLUSION_CONNECT_ENDPOINT_AUTHORIZE = f"{INCLUSION_CONNECT_ENDPOINT}/authorize/" +INCLUSION_CONNECT_ENDPOINT_REGISTRATIONS = f"{INCLUSION_CONNECT_ENDPOINT}/register/" +INCLUSION_CONNECT_ENDPOINT_TOKEN = f"{INCLUSION_CONNECT_ENDPOINT}/token/" +INCLUSION_CONNECT_ENDPOINT_USERINFO = f"{INCLUSION_CONNECT_ENDPOINT}/userinfo/" +INCLUSION_CONNECT_ENDPOINT_LOGOUT = f"{INCLUSION_CONNECT_ENDPOINT}/logout/" # These expiration times have been chosen arbitrarily. INCLUSION_CONNECT_TIMEOUT = 60