Skip to content

Commit

Permalink
Update backend.py - access_token_method?
Browse files Browse the repository at this point in the history
  • Loading branch information
wprzyb authored Mar 16, 2024
1 parent 7276f56 commit 5f95e25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion auth/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class HSWawOAuth2(BaseOAuth2):
AUTHORIZATION_URL = "https://auth.apps.hskrk.pl/application/o/authorize"
ACCESS_TOKEN_URL = "http://authentik:9000/application/o/token"
DEFAULT_SCOPE = ["profile:read"]
ACCESS_TOKEN_METHOD = 'POST'
REDIRECT_STATE = False
SCOPE_SEPARATOR = ","
EXTRA_DATA = [("expires", "expires_in")]
Expand All @@ -28,7 +29,7 @@ def get_user_details(self, response):

def user_data(self, access_token, *args, **kwargs):
"""Loads user data from service"""
url = "https://auth.apps.hskrk.pl/application/o/userinfo"
url = "http://authentik:9000/application/o/userinfo"
headers = {"Authorization": "Bearer {}".format(access_token)}
return self.get_json(url, headers=headers)
def auth_url(self):
Expand Down

0 comments on commit 5f95e25

Please sign in to comment.