echo-jwt
echo-jwt copied to clipboard
Return default errors so they can be overridden by users
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)
@aldas this also restores functionality that was available in the previous middleware (overwriting the now ignored default errors)
Closing, #39 did this change. Thank to @gerardsn for proposing this.