Documentation
¶
Index ¶
- Variables
- func GetAvatarURL(emailHash string) string
- func Hash(password string) (encodedHash string, err error)
- func LoadEnv(dir string)
- func SignToken(claims jwt.StandardClaims) (token string, err error)
- func Verify(password, encodedHash string) (match bool, err error)
- func VerifyToken(token string, issuer string) (claims *jwt.StandardClaims, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidHash error ErrInvalidHash = errors.New("the encoded hash is not in the correct format") // ErrIncompatibleVersion error ErrIncompatibleVersion = errors.New("incompatible version of argon2") )
Functions ¶
func GetAvatarURL ¶
GetAvatarURL get avatar url from email hash
func SignToken ¶
func SignToken(claims jwt.StandardClaims) (token string, err error)
SignToken sign jwt token using JWT_SECRET
func VerifyToken ¶
func VerifyToken(token string, issuer string) (claims *jwt.StandardClaims, err error)
VerifyToken verify token
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.