Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TOKEN_KEY returns the jwt token secret TOKEN_KEY = "A9VxLvehJEnwMcsfG18=atlXh$FMOe^7M619oDs1g=bcrTWgGNYpnowkog5rA" // TOKEN_EXP returns the jwt token expiration duration. // Should be time.ParseDuration string. Source: https://golang.org/pkg/time/#ParseDuration // default: 10h TOKEN_EXP = "10h" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TokenPayload ¶
type TokenPayload struct {
ID int64
}
func Verify ¶
func Verify(token string) (*TokenPayload, error)
Click to show internal directories.
Click to hide internal directories.