Skip to content

Commit

Permalink
update authlib (#2805)
Browse files Browse the repository at this point in the history
  • Loading branch information
petrjasek authored Jan 3, 2025
1 parent 19e1ac5 commit 092f4de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"croniter<6.1",
"python-dateutil<2.10",
"unidecode>=0.04.21,<=1.3.8",
"authlib>0.14,<0.15",
"authlib>0.14,<1.5",
"draftjs-exporter[lxml]<5.1",
"regex>=2020.7.14,<=2024.11.6",
"flask-oidc-ex>=0.5.5,<0.7",
Expand Down
8 changes: 5 additions & 3 deletions superdesk/auth_server/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ def __init__(self, data):
def client_id(self):
return str(self._id)

def check_token_endpoint_auth_method(self, method):
return method == "client_secret_basic"

def check_client_secret(self, client_secret):
return bcrypt.checkpw(client_secret.encode(), self.pwd_hash.encode())

Expand All @@ -48,6 +45,11 @@ def check_grant_type(self, grant_type):
def get_allowed_scope(self, scope):
return ""

def check_endpoint_auth_method(self, method, endpoint):
if endpoint == "token":
return method == "client_secret_basic"
return True


def query_client(client_id):
clients_service = superdesk.get_resource_service("auth_server_clients")
Expand Down

0 comments on commit 092f4de

Please sign in to comment.