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

token invalid states #12

Open
ReinsBrain opened this issue Jan 9, 2019 · 0 comments
Open

token invalid states #12

ReinsBrain opened this issue Jan 9, 2019 · 0 comments

Comments

@ReinsBrain
Copy link

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?

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

No branches or pull requests

1 participant