Skip to content

token invalid states #12

@ReinsBrain

Description

@ReinsBrain

Im excited to make use of pgjwt in our applications but I'd like to be able to be more informative regarding invalidation of a jwt. The invalid exceptions in JWT that Im aware of are:

JWT_CREDS_BAD_SCHEME
JWT_CREDS_BAD_FORMAT,
JWT_UNSUPPORTED_ALGORITHM,
JWT_TOKEN_NOT_ACTIVE,
JWT_TOKEN_EXPIRED,
JWT_SIG_VERIFY_FAILED,
JWT_CORRUPT,
JWT_PAYLOAD_CORRUPT

Do you think it might be valuable to include a 4th (and possibly 5th) column in the returned set from the verify function, perhaps called invalid_code (and invalid_message) which could return the cause of invalidation?

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