initial commit
This commit is contained in:
22
internal/routes/errors.go
Normal file
22
internal/routes/errors.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/http"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrInvalidJWTPrivateKeyType is returned when the private key type is not of an expected value.
|
||||
ErrInvalidJWTPrivateKeyType = errors.New("invalid JWT private key provided")
|
||||
|
||||
// ErrAuthTokenHeaderRequired is returned when a token check request is made, but the Authorization header is missing.
|
||||
ErrAuthTokenHeaderRequired = echo.NewHTTPError(http.StatusBadRequest, "header Authorization missing or invalid")
|
||||
|
||||
// ErrInvalidSigningMethod is returned when defined jwt signing method is not recognized.
|
||||
ErrInvalidSigningMethod = errors.New("unrecognized jwt signing method provided")
|
||||
|
||||
// ErrMissingIssuer is returned when the jwt issuer is not defined in the config.
|
||||
ErrMissingIssuer = errors.New("jwt issuer required")
|
||||
)
|
||||
Reference in New Issue
Block a user