Documentation
¶
Index ¶
Constants ¶
View Source
const ( TOKEN_FORM = "token" TOKEN_HEADER = "x-access-token" TOKEN_COOKIE = "token" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
func AuthByRequest ¶
*
- Looks for query param 'token', header 'x-access-token' and cookie 'token'
- in that order
func AuthWithKey ¶
Validates token with the provided key.
Click to show internal directories.
Click to hide internal directories.