Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidToken = errors.New("token is invalid") ErrExpiredToken = errors.New("token has expired") )
Functions ¶
func CheckPassword ¶
CheckPassword checks if the provided password is correct or not.
func HashPassword ¶
HashPassword returns the bcrypt hash of the password.
Types ¶
type Claims ¶
type Claims struct {
UserID string `json:"user_id"`
Email string `json:"email"`
jwt.RegisteredClaims
}
type JWTMaker ¶
type JWTMaker struct {
// contains filtered or unexported fields
}
func (*JWTMaker) CreateToken ¶
Click to show internal directories.
Click to hide internal directories.