Skip to content

The "jti" claim should be optional? #80

@JThinkable

Description

@JThinkable

Thanks for all the work on this!

The jti claim seems to be required when it should be optional. This makes it tough to use with a provider that thinks it's optional. Is there a way to disable this check?

# Make sure that any custom claims we expect in the token are present
if 'jti' not in data:
    raise JWTDecodeError("Missing claim: jti")

4.1.7. "jti" (JWT ID) Claim

The "jti" (JWT ID) claim provides a unique identifier for the JWT.
The identifier value MUST be assigned in a manner that ensures that
there is a negligible probability that the same value will be
accidentally assigned to a different data object; if the application
uses multiple issuers, collisions MUST be prevented among values
produced by different issuers as well. The "jti" claim can be used
to prevent the JWT from being replayed. The "jti" value is a case-
sensitive string. Use of this claim is OPTIONAL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions