Documentation
¶
Index ¶
- Constants
- Variables
- func AvatarURLOK(raw string) bool
- func CodeExpiry(now time.Time) time.Time
- func CodeOK(code string) bool
- func EmailOK(email string) bool
- func EmailWhitelisted(email string, allowedEmails, allowedDomains []string) bool
- func HashPAT(token string) string
- func HashSecret(pepper, value string) string
- func IsPATFormat(prefix, token string) bool
- func IssueCode() (string, error)
- func MintLinkToken() (string, error)
- func MintPAT(prefix string) (token, hash, display string, err error)
- func NormalizeDisplayName(raw string) (string, bool)
- func NormalizeEmail(email string) string
- func PasswordOK(pw string) bool
- func SignupAllowed(email string, allowedEmails, allowedDomains []string) bool
- func SlugOK(slug string) bool
- func SlugReserved(slug string) bool
- func UUIDOK(s string) bool
Constants ¶
View Source
const ( CodeLength = 6 CodeTTL = 10 * time.Minute CodeMaxTries = 5 ResendCooldown = time.Minute )
View Source
const ( ResetLinkTTL = time.Hour VerifyLinkTTL = 24 * time.Hour )
View Source
const AvatarURLMaxLen = 2048
View Source
const DefaultPATPrefix = "tk_"
View Source
const DisplayNameMaxLen = 100
Variables ¶
Functions ¶
func AvatarURLOK ¶
func EmailWhitelisted ¶
func HashSecret ¶
func IsPATFormat ¶
func MintLinkToken ¶
func NormalizeDisplayName ¶
func NormalizeEmail ¶
func PasswordOK ¶
func SignupAllowed ¶
func SlugReserved ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.