Documentation ¶
Index ¶
- Variables
- func AuthKeyLogin(c *fiber.Ctx, userID int64, authKey string) (privateArmored pgp.PrivateKey, err error)
- func CanLogin(username string) (userID int64, err error)
- func HashKey(key string) (keyHash []byte, err error)
- func HashKeyB64(key string) (keyHash string, err error)
- func Logout(c *fiber.Ctx)
- type LoginDifficulty
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AuthKeyLogin ¶
func AuthKeyLogin(c *fiber.Ctx, userID int64, authKey string) (privateArmored pgp.PrivateKey, err error)
func HashKeyB64 ¶
Types ¶
type LoginDifficulty ¶
type LoginDifficulty int8
LoginDifficulty int8
const ( // None user has 0-2 login attempts None LoginDifficulty = iota // Easy user has 3-4 login attempts Easy // Medium user has 5-6 login attempts Medium // Hard user has 7-8 login attempts Hard // ExtraHard user has 9+ login attempts ExtraHard )
func LoginDiff ¶
func LoginDiff(userID int64) (LoginDifficulty, error)
LoginDiff user's login difficulty based on login attempts
Click to show internal directories.
Click to hide internal directories.