Skip to content

Conversation

dhaneshbs
Copy link
Contributor

No description provided.

@dhaneshbs dhaneshbs requested a review from jranaskit July 30, 2025 05:11
raise exp

def validate_access_token_and_get_claims(self, token: str, options: Optional[Dict] = None, audience = None) -> Dict[str, Any]:
def validate_access_token_and_get_claims(self, token: str, options: Optional[TokenValidationOptions] = None) -> Dict[str, Any]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have removed audience parameter from the params. Would it be ok as it would break for any customers already using this method.

if options.issuer:
jwt_options["issuer"] = options.issuer
if options.audience:
audience = options.audience[0] if len(options.audience) == 1 else options.audience
Copy link
Collaborator

@jranaskit jranaskit Jul 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic needs to be refined.
We are converting audience to str if len(options.audience) == 1 or else we pas the list itself. Why is the conversion required of len = 1 as well?

Secondly, if user has provided audience separately in params, then we should take that as well in consideration and put it in options block itself and send only options block to jwt.decode()

@dhaneshbs dhaneshbs merged commit 6b605f1 into main Aug 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants