echo-jwt icon indicating copy to clipboard operation
echo-jwt copied to clipboard

Return default errors so they can be overridden by users

Open gerardsn opened this issue 8 months ago • 1 comments

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 avatar Mar 27 '25 13:03 gerardsn

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

gerardsn avatar Apr 30 '25 12:04 gerardsn

Closing, #39 did this change. Thank to @gerardsn for proposing this.

aldas avatar Nov 20 '25 15:11 aldas