From 3774a632213a45cb254568adddabb7f41198714c Mon Sep 17 00:00:00 2001 From: Marcus Feitoza Date: Tue, 11 Jun 2024 11:23:33 -0300 Subject: [PATCH] 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 --- src/casdoor/async_main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/casdoor/async_main.py b/src/casdoor/async_main.py index ce72a3a..6853923 100644 --- a/src/casdoor/async_main.py +++ b/src/casdoor/async_main.py @@ -242,7 +242,7 @@ async def refresh_oauth_token(self, refresh_token: str, scope: str = "") -> str: token = await self.refresh_token_request(refresh_token, scope) return token.get("access_token") - def parse_jwt_token(self, token: str) -> Dict: + def parse_jwt_token(self, token: str, **kwargs) -> Dict: """ Converts the returned access_token to real data using jwt (JSON Web Token) algorithms. @@ -257,6 +257,7 @@ def parse_jwt_token(self, token: str) -> Dict: certificate.public_key(), algorithms=self.algorithms, audience=self.client_id, + **kwargs, ) return return_json