-
Notifications
You must be signed in to change notification settings - Fork 970
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
feat: allow additional id token audiences #3616
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3616 +/- ##
==========================================
- Coverage 78.79% 78.29% -0.51%
==========================================
Files 343 343
Lines 24024 23406 -618
==========================================
- Hits 18930 18326 -604
- Misses 3700 3701 +1
+ Partials 1394 1379 -15
|
func verifyToken(ctx context.Context, keySet oidc.KeySet, config *Configuration, rawIDToken, issuerURL string) (*Claims, error) { | ||
tokenAudiences := append([]string{config.ClientID}, config.AdditionalIDTokenAudiences...) | ||
var token *oidc.IDToken | ||
var err error |
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 suggest initializing this with a default error, otherwise the default err is nil, so no error, so audience validated.
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.
Good point, I added the fallback.
Fixes ory/network#343
Related issue(s)
Checklist
introduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got the approval (please contact
[email protected]) from the maintainers to push
the changes.
works.
Further Comments