Documentation ¶
Index ¶
- Constants
- func AddEvent(user models.Account, event, target, ip, ua string) models.ActionEvent
- func AddNotifySubscriber(user models.Account, provider, device, ua string) (models.NotificationSubscriber, error)
- func Authenticate(access, refresh string, depth int) (models.Account, string, string, error)
- func ConfirmAccount(code string) error
- func CreateAccount(name, nick, email, password string) (models.Account, error)
- func GetAccount(id uint) (models.Account, error)
- func GetFactorCode(factor models.AuthFactor) (bool, error)
- func GetThirdClient(id string) (models.ThirdClient, error)
- func GetThirdClientWithSecret(id, secret string) (models.ThirdClient, error)
- func LookupAccount(id string) (models.Account, error)
- func LookupChallenge(id uint) (models.AuthChallenge, error)
- func LookupChallengeWithFingerprint(id uint, ip string, ua string) (models.AuthChallenge, error)
- func LookupFactor(id uint) (models.AuthFactor, error)
- func LookupFactorsByUser(uid uint) ([]models.AuthFactor, error)
- func LookupSessionWithToken(tokenId string) (models.AuthSession, error)
- func NewMagicToken(mode models.MagicTokenType, assignTo *models.Account, expiredAt *time.Time) (models.MagicToken, error)
- func NewNotification(user models.ThirdClient, target models.Account, subject, content string, ...) error
- func NotifyMagicToken(token models.MagicToken) error
- func PerformAutoSignoff() *gorm.DB
- func SendMail(target string, subject string, content string) error
- func SendMailHTML(target string, subject string, content string) error
- func ValidateMagicToken(code string, mode models.MagicTokenType) (models.MagicToken, error)
Constants ¶
View Source
const ConfirmRegistrationTemplate = `` /* 600-byte string literal not displayed */
View Source
const EmailPasswordTemplate = `` /* 534-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func AddNotifySubscriber ¶
func Authenticate ¶
func ConfirmAccount ¶
func GetFactorCode ¶
func GetFactorCode(factor models.AuthFactor) (bool, error)
func GetThirdClient ¶
func GetThirdClient(id string) (models.ThirdClient, error)
func GetThirdClientWithSecret ¶
func GetThirdClientWithSecret(id, secret string) (models.ThirdClient, error)
func LookupChallenge ¶
func LookupChallenge(id uint) (models.AuthChallenge, error)
func LookupFactor ¶
func LookupFactor(id uint) (models.AuthFactor, error)
func LookupFactorsByUser ¶
func LookupFactorsByUser(uid uint) ([]models.AuthFactor, error)
func LookupSessionWithToken ¶
func LookupSessionWithToken(tokenId string) (models.AuthSession, error)
func NewMagicToken ¶
func NewMagicToken(mode models.MagicTokenType, assignTo *models.Account, expiredAt *time.Time) (models.MagicToken, error)
func NewNotification ¶
func NewNotification( user models.ThirdClient, target models.Account, subject, content string, links []models.NotificationLink, important bool, ) error
func NotifyMagicToken ¶
func NotifyMagicToken(token models.MagicToken) error
func PerformAutoSignoff ¶
func ValidateMagicToken ¶
func ValidateMagicToken(code string, mode models.MagicTokenType) (models.MagicToken, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.