Documentation ¶
Index ¶
Constants ¶
View Source
const AccessTokenValidity = time.Minute * 20
View Source
const RefreshTokenValidity = time.Hour * 24
Variables ¶
This section is empty.
Functions ¶
func AuthorizeToken ¶
AuthorizeToken check if a refresh token is valid
func GenerateToken ¶
func GenerateToken(signMethod *jwt.SigningMethodHMAC, claims jwt.MapClaims, secret *string) (*string, error)
GenerateToken generates only an access token
func GetTokenFromHeader ¶
GetTokenFromHeader returns the token string in the authorization header
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.