diff --git a/auth/backend.py b/auth/backend.py index 392bc41..7f753a4 100644 --- a/auth/backend.py +++ b/auth/backend.py @@ -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 = ',' @@ -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) } diff --git a/auth/views.py b/auth/views.py index d746b69..c1215e0 100644 --- a/auth/views.py +++ b/auth/views.py @@ -1,4 +1,4 @@ from django.shortcuts import redirect def auth_redirect(request): - return redirect('social:begin', 'hswro') + return redirect('social:begin', 'spejstore')