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

feat: add "typ" (Type) Header Parameter check #514

Merged
merged 1 commit into from
Jan 18, 2021
Merged

feat: add "typ" (Type) Header Parameter check #514

merged 1 commit into from
Jan 18, 2021

Conversation

panva
Copy link
Contributor

@panva panva commented Jan 12, 2021

This PR adds a tick for the capability of a library to check a JWT "typ" (Type) Header Parameter. The current best practice for new JWT profiles is to explicitly type them. A recipient of a given JWT profiled token is then responsible for checking the token's type to be what they expect.

The "typ" check is similar to the existing "value" ones such as "iss" with, except that

  • it expects the property in the protected header
  • its value is case-insensitive
  • it may or may not be prefixed with application/

Example implementation of such check is available here

@Sambego Sambego merged commit 6e088c7 into jsonwebtoken:master Jan 18, 2021
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