Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrJWTInvalidClaims = echo.NewHTTPError(http.StatusUnauthorized, "invalid jwt claims")
)
Errors
Functions ¶
This section is empty.
Types ¶
type AuthClaims ¶
type AuthClaims struct { jwt.StandardClaims Dashboard bool `json:"dashboard"` API bool `json:"api"` }
func (*AuthClaims) VerifySubject ¶
func (c *AuthClaims) VerifySubject(expected string) bool
type JWTAuth ¶ added in v1.2.2
type JWTAuth struct {
// contains filtered or unexported fields
}
func NewJWTAuth ¶ added in v1.2.2
func (*JWTAuth) Middleware ¶ added in v1.2.2
func (j *JWTAuth) Middleware(skipper middleware.Skipper, allow func(c echo.Context, subject string, claims *AuthClaims) bool) echo.MiddlewareFunc
Click to show internal directories.
Click to hide internal directories.