Documentation ¶
Index ¶
Constants ¶
View Source
const ( // JWTTokenContextKey holds the key used to store a JWT Token in the // context. JWTTokenContextKey string = "JWTToken" // JWTClaimsContextKey holds the key used to store the JWT Claims in the // context. JWTClaimsContextKey string = "JWTClaims" )
Variables ¶
View Source
var ( // ErrClaimNotFound when claim is expected in the gin context ErrClaimNotFound = errors.New("claim not found in context") )
Functions ¶
func JwtMiddleware ¶
func JwtMiddleware(conf *config.YamlConfig, newClaims jwt.Claims, method jwt.SigningMethod, keyFunc jwt.Keyfunc) gin.HandlerFunc
JwtMiddleware for Gin server if enabled
func NewJWTToken ¶
NewJWTToken - method for generating new jwt tokens
func TokenMiddleware ¶
func TokenMiddleware(conf *config.YamlConfig) gin.HandlerFunc
TokenMiddleware simple token authorization
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.