Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
func NewBearerTokenMiddleware ¶
func NewBearerTokenMiddleware(verifyToken VerifyTokenFunc) Middleware
func NewSessionCookieMiddleware ¶
func NewSessionCookieMiddleware(cookieName string, verifyCookie VerifyCookieFunc) Middleware
func (*Middleware) AllOfRoles ¶
func (middleware *Middleware) AllOfRoles(requiredRoles ...string) gin.HandlerFunc
func (*Middleware) AnyAuthenticated ¶
func (middleware *Middleware) AnyAuthenticated() gin.HandlerFunc
func (*Middleware) AnyOfRoles ¶
func (middleware *Middleware) AnyOfRoles(allowedRoles ...string) gin.HandlerFunc
type MiddlewareHandler ¶
type MiddlewareHandler = func(rolesCheckingFunc RolesCheckingFunc) gin.HandlerFunc
type RolesCheckingFunc ¶
type VerificationResult ¶
type VerifyCookieFunc ¶
type VerifyCookieFunc = func(c *gin.Context, cookie string) (*VerificationResult, error)
type VerifyTokenFunc ¶
type VerifyTokenFunc = func(c *gin.Context, token string) (*VerificationResult, error)
Click to show internal directories.
Click to hide internal directories.