Documentation ¶
Index ¶
- Constants
- func CanRead(c echo.Context) bool
- func CanWrite(c echo.Context) bool
- func IsAdmin(c echo.Context) bool
- func IsAdminReadOnly(c echo.Context) bool
- func IsGlobalAuditor(c echo.Context) bool
- func NewJWTMiddleware(keyFunc jwt.Keyfunc) echo.MiddlewareFunc
- func NewRequiresReadMiddleware() echo.MiddlewareFunc
- func NewRequiresWriteMiddleware() echo.MiddlewareFunc
- func NewSuccessHandler() middleware.JWTSuccessHandler
- type CFClaims
- type Scope
Constants ¶
View Source
const ( Username = "username" Scopes = "scopes" )
Variables ¶
This section is empty.
Functions ¶
func IsAdminReadOnly ¶
func IsAdminReadOnly(c echo.Context) bool
func IsGlobalAuditor ¶
func IsGlobalAuditor(c echo.Context) bool
func NewJWTMiddleware ¶
func NewRequiresReadMiddleware ¶
func NewRequiresReadMiddleware() echo.MiddlewareFunc
func NewRequiresWriteMiddleware ¶
func NewRequiresWriteMiddleware() echo.MiddlewareFunc
func NewSuccessHandler ¶
func NewSuccessHandler() middleware.JWTSuccessHandler
Types ¶
type CFClaims ¶
type CFClaims struct { Audience []string `json:"aud"` ClientID string `json:"client_id,omitempty"` ExpiresAt int64 `json:"exp,omitempty"` ID string `json:"jti,omitempty"` IssuedAt int64 `json:"iat,omitempty"` Issuer string `json:"iss,omitempty"` Subject string `json:"sub,omitempty"` UserID string `json:"user_id"` Username string `json:"user_name"` Scopes []string `json:"scope"` }
Click to show internal directories.
Click to hide internal directories.