Skip to content

Return default errors so they can be overridden by users #33

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gerardsn
Copy link

@gerardsn gerardsn commented Mar 27, 2025

the default errors ErrJWTMissing and ErrJWTInvalid are currently unused. I believe the currently returned error should should have been derived from the default errors so they can be overridden by users.

For example, we prefer to let ErrJWTMissing return a 401 but it is currently hardcoded to a 400. (which is also inconsistent with the default error, but I've changed the default error to match the existing behavior)

@gerardsn
Copy link
Author

@aldas this also restores functionality that was available in the previous middleware (overwriting the now ignored default errors)

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.

1 participant