Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomClaims ¶
type CustomClaims struct { Option string `json:"option"` jwt.StandardClaims }
CustomClaims is jwt claim
type JWTer ¶
type JWTer interface { CreateBasicToken(t int64, clientID, userName string) (string, error) CreateCustomToken(t int64, clientID, userName, option string) (string, error) ValidateToken(tokenString string) error ValidateTokenWithClaim(tokenString, clientID, userName string) error ValidateTokenWithCustomClaim(tokenString, clientID, userName, option string) error }
JWTer interface
type SigAlgoer ¶
type SigAlgoer interface { GetMethod() jwt.SigningMethod SignedString(token *jwt.Token) (string, error) ValidateMethod(token *jwt.Token) bool GetKey() interface{} }
SigAlgoer interface
type SimpleJWTer ¶
func NewSimpleJWT ¶
func NewSimpleJWT(key string) SimpleJWTer
Click to show internal directories.
Click to hide internal directories.