From 0aaf99da9759b8345c84a5c3ac756d7019d477da Mon Sep 17 00:00:00 2001 From: decentral1se Date: Fri, 11 Jun 2021 18:26:38 +0200 Subject: [PATCH] Add jwks_uri and use username --- keycloak_collective_portal.py | 1 + templates/index.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/keycloak_collective_portal.py b/keycloak_collective_portal.py index f774989..f28b79a 100644 --- a/keycloak_collective_portal.py +++ b/keycloak_collective_portal.py @@ -26,6 +26,7 @@ oauth.register( client_secret=KEYCLOAK_CLIENT_SECRET, authorize_url=f"https://{KEYCLOAK_DOMAIN}/auth/realms/{KEYCLOAK_REALM}/protocol/openid-connect/auth", access_token_url=f"https://{KEYCLOAK_DOMAIN}/auth/realms/{KEYCLOAK_REALM}/protocol/openid-connect/token", + jwks_uri=f"https://{KEYCLOAK_DOMAIN}/auth/realms/{KEYCLOAK_REALM}/protocol/openid-connect/certs", ) diff --git a/templates/index.html b/templates/index.html index e16ca81..9ab1f20 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,6 +3,6 @@ Home -

Hello, {{ user }}

+

Hello, {{ user.preferred_username }}