Skip to content

Add strict/coercion mode #37

@ixunio

Description

@ixunio
class MyJWTClaims(JWTClaims):
    # redefine 'sub' as required integer
    sub: int = Field(default=...)

MyJWTClaims(**{"sub"="123"})  # not failing

Default behavior should reject coercion for standard claims (or all of them?)

Also for the json.dumps() with non str keys

Related: jpadilla/pyjwt#1082

EDIT: not needed, standard claims are str safe for the timestamps which has already an issue opened re the int/float serialization and validation

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