Documentation
¶
Index ¶
- func GenerateAccessToken(userID, email, role, secret string, expiry time.Duration) (string, error)
- func GenerateRefreshToken() (string, error)
- func HashPassword(password string) (string, error)
- func HashRefreshToken(token string) string
- func VerifyPassword(password, encoded string) (bool, error)
- type Claims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAccessToken ¶
GenerateAccessToken generates a JWT access token
func GenerateRefreshToken ¶
GenerateRefreshToken generates a random refresh token
func HashPassword ¶
HashPassword hashes a password using argon2id
func HashRefreshToken ¶
HashRefreshToken hashes a refresh token for storage
func VerifyPassword ¶
VerifyPassword verifies a password against a hash
Types ¶
Click to show internal directories.
Click to hide internal directories.