Documentation
¶
Overview ¶
Package jwt implements the JWT authentication
Index ¶
Constants ¶
View Source
const ( Access = "access" Refresh = "refresh" )
Variables ¶
View Source
var TokenTypeExpTime = map[string]string{ Access: "Secure.JWTAccessTimeMinute", Refresh: "Secure.JWTRefreshTimeHour", }
TokenTypeExpTime is a map that contains the expiration time of the JWT
View Source
var TokenTypeKeyName = map[string]string{ Access: "Secure.JWTAccessSecure", Refresh: "Secure.JWTRefreshSecure", }
TokenTypeKeyName is a map that contains the key name of the JWT in config.json
Functions ¶
func GetClaimsAndVerifyToken ¶
func GetClaimsAndVerifyToken(tokenString string, tokenType string) (claims jwt.MapClaims, err error)
GetClaimsAndVerifyToken verifies the token and returns the claims
Types ¶
Click to show internal directories.
Click to hide internal directories.