Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyToken empty token ErrEmptyToken = errors.New("token: empty token") )
Functions ¶
func GenerateToken ¶
GenerateToken generate a token with given payload
Types ¶
type Config ¶
type Config struct { Secret string // LookupMethod methods to lookup token // Here are support 3 methods: // ["query-<param>", "header-<key>", "cookie-<key>"] // eg: ["query-token", "header-token", "cookie-token"] // Will start looking up the token from the beginning of the array, and stop until it is found LookupMethod []string // contains filtered or unexported fields }
Config jwt config
Click to show internal directories.
Click to hide internal directories.