23 lines
814 B
Go
23 lines
814 B
Go
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")
|
|
)
|