Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update authlib #2805

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading