Documentation ¶
Index ¶
Constants ¶
View Source
const MinPasswordLength = 7
Variables ¶
View Source
var ErrEmptyPassword = errors.New("No password provided")
View Source
var ErrMissingLetterOrNumber = errors.New("Password must contain both letters and numbers")
View Source
var ErrPasswordTooShort = fmt.Errorf("Password must be at least %d characters", MinPasswordLength)
Functions ¶
func CheckPasswordPolicy ¶
CheckPasswordPolicy checks if a password meets the minimum requirements.
func ComparePasswords ¶
ComparePasswords func for a comparing password.
func GeneratePassword ¶
GeneratePassword func for a making hash & salt with user password.
func NormalizePassword ¶
NormalizePassword func for a returning the users input as a byte slice.
func ParseRefreshToken ¶
ParseRefreshToken func for parse second argument from refresh token.
Types ¶
type TokenMetadata ¶
TokenMetadata struct to describe metadata in JWT.
func ExtractTokenMetadata ¶
func ExtractTokenMetadata(c *fiber.Ctx) (*TokenMetadata, error)
ExtractTokenMetadata func to extract metadata from JWT.
Click to show internal directories.
Click to hide internal directories.