Skip to content

Commit

Permalink
feat: add kwargs to async parse_jwt_token() API (#85)
Browse files Browse the repository at this point in the history
* fix(async_main): add kwargs to parse jwt

* Update async_main.py

---------

Co-authored-by: Eric Luo <[email protected]>
  • Loading branch information
mfeitoza and hsluoyz authored Jun 11, 2024
1 parent cbf7f08 commit 3774a63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/casdoor/async_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

Expand Down

0 comments on commit 3774a63

Please sign in to comment.