Documentation ¶
Index ¶
Constants ¶
View Source
const ( E_token_expired = "token_expired" E_not_found_secret = "not_found_secret" E_claims_not_valid = "claims_not_valid" E_token_invalid = "token_invalid" E_token_fail_to_valid = "token_fail_to_valid" E_token_invalid_not_found = "token_invalid_not_found" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HMACToken ¶
type HMACToken struct {
// contains filtered or unexported fields
}
Mgr create method for working jwt
func CreateHMACToken ¶
CreateHMACToken is parse pub, priv key then init HMACToken
func (*HMACToken) GenerateHmacToken ¶
GenerateHmacToken is create token with secret
func (*HMACToken) ParseHmacToken ¶
ParseHmacToken is verify token string is valid: input is secret
type RSAToken ¶
type RSAToken struct {
// contains filtered or unexported fields
}
func CreateRSAToken ¶
CreateRSAToken is parse pub, priv key then init RSAToken
func (*RSAToken) GenerateToken ¶
GenerateToken is create token with privatekey
func (*RSAToken) ParseToken ¶
ParseToken is verify token string is valid: input is public key
func (*RSAToken) SetPrivateKey ¶
SetPrivateKey is push privatekey to Helper
func (*RSAToken) SetPublicKey ¶
SetPublicKey push publickey to Helper
Click to show internal directories.
Click to hide internal directories.