Documentation
¶
Index ¶
- Variables
- func GenerateUniqueOtpSecret(id uuid.UUID) string
- func HashPassword(password string) (string, error)
- func NewJWT(payload jwt.MapClaims, signingKey string, secondsDuration int64) (string, error)
- func ParseJWT(token string, verificationKey string) (jwt.MapClaims, error)
- func ValidatePassword(hashPassword, password string) bool
- type Otp
- type OtpOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidRefreshToken = errors.New("invalid refresh token")
Functions ¶
func GenerateUniqueOtpSecret ¶
func HashPassword ¶
func ValidatePassword ¶
Types ¶
type Otp ¶
type Otp struct {
// contains filtered or unexported fields
}
func NewOtp ¶
func NewOtp(opts OtpOptions) *Otp
func (*Otp) Generate ¶
Todo: allow generate to take in optional secret in other to further personalize token generated for each user.
func (*Otp) GenerateUserPersonalKey ¶
type OtpOptions ¶
Click to show internal directories.
Click to hide internal directories.