Skip to content

Commit

Permalink
authentik tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Wiktor committed Nov 18, 2023
1 parent 0fda2e3 commit 9977c4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions auth/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

class HSWawOAuth2(BaseOAuth2):
"""Hackerspace OAuth authentication backend"""
name = 'hswro'
name = 'spejstore'
ID_KEY = 'username'
AUTHORIZATION_URL = 'http://sso.lokal.hswro.org/oauth/authorize'
ACCESS_TOKEN_URL = 'http://sso.lokal.hswro.org/oauth/token'
AUTHORIZATION_URL = 'https://auth.apps.hskrk.pl/application/o/authorize/'
ACCESS_TOKEN_URL = 'https://auth.apps.hskrk.pl/application/o/token/'
DEFAULT_SCOPE = ['profile:read']
REDIRECT_STATE = False
SCOPE_SEPARATOR = ','
Expand All @@ -27,7 +27,7 @@ def get_user_details(self, response):

def user_data(self, access_token, *args, **kwargs):
"""Loads user data from service"""
url = 'http://sso.lokal.hswro.org/api/1/profile'
url = 'https://auth.apps.hskrk.pl/application/o/userinfo/'
headers = {
'Authorization': 'Bearer {}'.format(access_token)
}
Expand Down
2 changes: 1 addition & 1 deletion auth/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.shortcuts import redirect

def auth_redirect(request):
return redirect('social:begin', 'hswro')
return redirect('social:begin', 'spejstore')

0 comments on commit 9977c4c

Please sign in to comment.