Documentation ¶
Index ¶
- func GetUserFromLoginId(id string) string
- func HasTOTP(user string) bool
- func InvalidateSession(sid string)
- func NewLogin(user string) (string, error)
- func NewSession(user string, ttl time.Duration) string
- func NewTOTP(user string, ttl time.Duration) (*otp.Key, error)
- func PasswordIsValid(user []byte, passwd []byte) bool
- func VerifySession(sid string) string
- func VerifyTOTP(user string, otp string) bool
- type Login
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUserFromLoginId ¶
func InvalidateSession ¶
func InvalidateSession(sid string)
func NewSession ¶
Create a new 32-character SID, returns the created Session struct
func PasswordIsValid ¶
Returns true if the hash of the password matches the hash associated with user
func VerifySession ¶
func VerifyTOTP ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.