Documentation ¶
Index ¶
- Variables
- func ActivateDB()
- func FinishTwoFactor(w http.ResponseWriter, tokenString TwoFactorTokenString, code string) error
- type Token
- type TokenString
- type TwoFactorToken
- type TwoFactorTokenString
- type User
- func (u User) Auth(w http.ResponseWriter) error
- func (u User) FullLogout() error
- func (u User) LastFullLogout() (time.Time, error)
- func (u User) LastRecovery() (string, time.Time)
- func (u User) LastVerification() (string, time.Time)
- func (u User) NewToken() (string, error)
- func (u User) RecoverPassword(email, code, newPw string) error
- func (u User) SendRecoveryLetter() error
- func (u User) SendVerificationLetter() error
- func (u User) StartTwoFactor(w http.ResponseWriter) error
- func (u User) ToggleTwoFactor() error
- func (u User) UpdateNickname(newNick string) error
- func (u User) UpdatePassword(old, new string) (User, error)
- func (u User) Verify(code string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Boltdb *bolt.DB
Functions ¶
func ActivateDB ¶
func ActivateDB()
func FinishTwoFactor ¶
func FinishTwoFactor(w http.ResponseWriter, tokenString TwoFactorTokenString, code string) error
Types ¶
type TokenString ¶
type TokenString string
func (TokenString) InBlackList ¶
func (t TokenString) InBlackList() (bool, error)
func (TokenString) ToBlackList ¶
func (t TokenString) ToBlackList() error
func (TokenString) Token ¶
func (t TokenString) Token() (Token, error)
func (TokenString) User ¶
func (t TokenString) User() (User, error)
type TwoFactorToken ¶
func (TwoFactorToken) String ¶
func (t TwoFactorToken) String() (TwoFactorTokenString, error)
type TwoFactorTokenString ¶
type TwoFactorTokenString string
func (TwoFactorTokenString) TwoFactorToken ¶
func (t TwoFactorTokenString) TwoFactorToken() (TwoFactorToken, error)
type User ¶
type User struct { ID uint64 `db:"id"` Email string `db:"email"` Nickname string `db:"nickname"` Passhash string `db:"passhash"` Verified bool `db:"verified"` TwoFactor bool `db:"twofactor"` }
func GetUserByEmail ¶
func GetUserByID ¶
func (User) FullLogout ¶
func (User) RecoverPassword ¶
func (User) SendRecoveryLetter ¶
func (User) SendVerificationLetter ¶
func (User) StartTwoFactor ¶
func (u User) StartTwoFactor(w http.ResponseWriter) error
func (User) ToggleTwoFactor ¶
func (User) UpdateNickname ¶
Click to show internal directories.
Click to hide internal directories.