Skip to content

Commit

Permalink
included email profile scopes for token renewal and removed redirect …
Browse files Browse the repository at this point in the history
…url from the logout request
  • Loading branch information
lahirujayathilake committed Sep 17, 2024
1 parent 64486e7 commit 34fa393
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion django_airavata/apps/auth/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def _get_token_and_userinfo_from_refresh_token(self,
token_url = settings.KEYCLOAK_TOKEN_URL
userinfo_url = settings.KEYCLOAK_USERINFO_URL
verify_ssl = settings.KEYCLOAK_VERIFY_SSL
oauth2_session = OAuth2Session(client_id, scope='openid')
oauth2_session = OAuth2Session(client_id, scope='openid profile email')
verify = verify_ssl
if verify_ssl and hasattr(settings, 'KEYCLOAK_CA_CERTFILE'):
verify = settings.KEYCLOAK_CA_CERTFILE
Expand Down
5 changes: 1 addition & 4 deletions django_airavata/apps/auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,7 @@ def handle_login(request):

def start_logout(request):
logout(request)
redirect_url = request.build_absolute_uri(
resolve_url(settings.LOGOUT_REDIRECT_URL))
return redirect(settings.KEYCLOAK_LOGOUT_URL +
"?redirect_uri=" + quote(redirect_url))
return redirect(settings.KEYCLOAK_LOGOUT_URL)


def callback(request):
Expand Down

0 comments on commit 34fa393

Please sign in to comment.