Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminAuthMiddleware ¶
AdminAuthMiddleware stores the user context, but always as admin
func JWTMiddleware ¶
JWTMiddleware checks and pulls user information from JWT in Authorization header.
Types ¶
type CustomClaimsExample ¶
type CustomClaimsExample struct {
jwt.StandardClaims
}
func (*CustomClaimsExample) Valid ¶
func (c *CustomClaimsExample) Valid() error
type User ¶
User defines role access methods.
func ForContext ¶
ForContext finds the user from the context. REQUIRES Middleware to have run.
Click to show internal directories.
Click to hide internal directories.