Documentation
¶
Index ¶
- Constants
- func MakeToken(value, secretKey string) string
- func MakeTokenWithSalt(keySalt, value, secretKey string) string
- func ValidateToken(value, secretKey, actualTk string, timeout time.Duration) error
- func ValidateTokenWithKeySalt(keySalt, value, secretKey, actualTk string, timeout time.Duration) error
Constants ¶
View Source
const (
KeySalt = "github.com/hyuti/tokengen"
)
Variables ¶
This section is empty.
Functions ¶
func MakeToken ¶
MakeToken uses default key salt To validate token generated by MakeToken use ValidateToken See ValidateToken
func MakeTokenWithSalt ¶
MakeTokenWithSalt allows you to use your key salt instead of default key salt To validate token generated by MakeTokenWithSalt use ValidateTokenWithKeySalt See ValidateTokenWithKeySalt
func ValidateToken ¶
ValidateToken validates token and uses the default key salt See MakeToken
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.