-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow multiple audiences #426
Conversation
Can you elaborate how this would be a breaking change? |
You would either have two functions then ( |
// WithAudience configures the validator to require the specified audience in | ||
// the `aud` claim. Validation will fail if the audience is not listed in the | ||
// token or the `aud` claim is missing. | ||
// WithAudience configures the validator to require ONE of the specified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A matchAll
option would be useful here for users who want to ensure ALL audiences are present.
#342 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe #427 does just that, likely the implementation we'll go with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just saw that, thanks!
closed in favour of #433 |
Hey there!
This change allows for multiple allowed audiences when verifying a JWT (see #342 ).
I did not implement the suggested function signature
func WithAudiences(auds []string, matchAll bool) ParserOption {}
as this would either cause breaking changes or lead to confusion and unnecessary complexity as a separate option.