Skip to content

Commit e72fad9

Browse files
committed
fix (OAuth): align auth handler with current changes
1 parent cd6ab4c commit e72fad9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/DIRAC/FrameworkSystem/API/AuthHandler.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def initializeRequest(self):
4949

5050
path_index = [".well-known/(oauth-authorization-server|openid-configuration)"]
5151

52-
def web_index(self, well_known, instance=None):
52+
def web_index(self, well_known, instance=None, **kwargs):
5353
"""Well known endpoint, specified by
5454
`RFC8414 <https://tools.ietf.org/html/rfc8414#section-3>`_
5555
@@ -96,7 +96,7 @@ def web_index(self, well_known, instance=None):
9696
resDict.pop("Clients", None)
9797
return resDict
9898

99-
def web_jwk(self):
99+
def web_jwk(self, **kwargs):
100100
"""JWKs endpoint
101101
102102
Request example::
@@ -121,7 +121,7 @@ def web_jwk(self):
121121
result = self.server.db.getKeySet()
122122
return result["Value"].as_dict() if result["OK"] else {}
123123

124-
def web_revoke(self):
124+
def web_revoke(self, **kwargs):
125125
"""Revocation endpoint
126126
127127
Request example::
@@ -137,7 +137,7 @@ def web_revoke(self):
137137
self.log.verbose("Initialize a Device authentication flow.")
138138
return self.server.create_endpoint_response(RevocationEndpoint.ENDPOINT_NAME, self.request)
139139

140-
def web_userinfo(self):
140+
def web_userinfo(self, **kwargs):
141141
"""The UserInfo endpoint can be used to retrieve identity information about a user,
142142
see `spec <https://openid.net/specs/openid-connect-core-1_0.html#UserInfo>`_
143143
@@ -175,7 +175,7 @@ def web_userinfo(self):
175175

176176
path_device = ["([A-z%0-9-_]*)"]
177177

178-
def web_device(self, provider=None, user_code=None):
178+
def web_device(self, provider=None, user_code=None, client_id=None, **kwargs):
179179
"""The device authorization endpoint can be used to request device and user codes.
180180
This endpoint is used to start the device flow authorization process and user code verification.
181181
@@ -276,7 +276,7 @@ def web_device(self, provider=None, user_code=None):
276276

277277
path_authorization = ["([A-z%0-9-_]*)"]
278278

279-
def web_authorization(self, provider=None):
279+
def web_authorization(self, provider=None, **kwargs):
280280
"""Authorization endpoint
281281
282282
GET: LOCATION/authorization/<provider>
@@ -312,7 +312,7 @@ def web_authorization(self, provider=None):
312312
"""
313313
return self.server.validate_consent_request(self.request, provider)
314314

315-
def web_redirect(self, state, error=None, error_description="", chooseScope=[]):
315+
def web_redirect(self, state, error=None, error_description="", chooseScope=[], **kwargs):
316316
"""Redirect endpoint.
317317
After a user successfully authorizes an application, the authorization server will redirect
318318
the user back to the application with either an authorization code or access token in the URL.
@@ -393,7 +393,7 @@ def web_redirect(self, state, error=None, error_description="", chooseScope=[]):
393393
resp.payload = getHTML("authorization response", state=resp.status_code, body=resp.payload)
394394
return resp
395395

396-
def web_token(self):
396+
def web_token(self, **kwargs):
397397
"""The token endpoint, the description of the parameters will differ depending on the selected grant_type
398398
399399
POST LOCATION/token

0 commit comments

Comments
 (0)