File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ const (
114114)
115115
116116// ErrJWTMissing denotes an error raised when JWT token value could not be extracted from request
117- var ErrJWTMissing = echo .NewHTTPError (http .StatusUnauthorized , "missing or malformed jwt" )
117+ var ErrJWTMissing = echo .NewHTTPError (http .StatusBadRequest , "missing or malformed jwt" )
118118
119119// ErrJWTInvalid denotes an error raised when JWT token value is invalid or expired
120120var ErrJWTInvalid = echo .NewHTTPError (http .StatusUnauthorized , "invalid or expired jwt" )
@@ -255,10 +255,10 @@ func (config Config) ToMiddleware() (echo.MiddlewareFunc, error) {
255255 }
256256
257257 if lastTokenErr == nil {
258- return echo . NewHTTPError ( http . StatusBadRequest , "missing or malformed jwt" ). SetInternal (err )
258+ return ErrJWTMissing . WithInternal (err )
259259 }
260260
261- return echo . NewHTTPError ( http . StatusUnauthorized , "invalid or expired jwt" ). SetInternal (err )
261+ return ErrJWTInvalid . WithInternal (err )
262262 }
263263 }, nil
264264}
You can’t perform that action at this time.
0 commit comments