Documentation
¶
Index ¶
- func CreateAccessToken(id, email, role string) (string, error)
- func CreateTokenPair(id, email, role string) (accessToken string, refreshToken string, err error)
- func HashPassword(password string) (string, error)
- func RefreshAccessToken(refreshToken string) (string, error)
- func VerifyPassword(hashedPassword, password string) error
- func VerifyToken(tokenString string) (*jwt.Token, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAccessToken ¶
CreateToken generates a JWT for a given user email and role.
func CreateTokenPair ¶
CreateTokenPair generates an access and a refresh token for a given user email and role.
func HashPassword ¶
func RefreshAccessToken ¶
func VerifyPassword ¶
VerifyPassword compares a hashed password with its possible plaintext equivalent.
func VerifyToken ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.