Skip to content

Commit 3774a63

Browse files
mfeitozahsluoyz
andauthored
feat: add kwargs to async parse_jwt_token() API (#85)
* fix(async_main): add kwargs to parse jwt * Update async_main.py --------- Co-authored-by: Eric Luo <[email protected]>
1 parent cbf7f08 commit 3774a63

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/casdoor/async_main.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ async def refresh_oauth_token(self, refresh_token: str, scope: str = "") -> str:
242242
token = await self.refresh_token_request(refresh_token, scope)
243243
return token.get("access_token")
244244

245-
def parse_jwt_token(self, token: str) -> Dict:
245+
def parse_jwt_token(self, token: str, **kwargs) -> Dict:
246246
"""
247247
Converts the returned access_token to real data using
248248
jwt (JSON Web Token) algorithms.
@@ -257,6 +257,7 @@ def parse_jwt_token(self, token: str) -> Dict:
257257
certificate.public_key(),
258258
algorithms=self.algorithms,
259259
audience=self.client_id,
260+
**kwargs,
260261
)
261262
return return_json
262263

0 commit comments

Comments
 (0)