Skip to content
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

Added kid header in id token #56

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Conversation

DarthLegiON
Copy link
Contributor

Public keys may be rotating from time to time to enchance security and prevent leaks. It's good to add kid header into an id token to allow clients to recognize the keys they must use to check the token signature.

See about kids in the JWKS URI: https://openid.net/specs/openid-connect-core-1_0.html#RotateSigKeys
And in the ID token: https://openid.net/specs/openid-connect-core-1_0.html#id_tokenExample

In this PR I added optional parameter keyIdentifier to ID token response class. If it's set, the kid parameter will be passed into the ID token header. If not, it won't.

@steverhoades steverhoades merged commit 62f505a into steverhoades:master Sep 24, 2024
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.

2 participants