Documentation
¶
Index ¶
- func OptRegister(name string, bf BootFunc)
- type BootFunc
- type Mail
- type Option
- type RoleClaims
- type Token
- type User
- func (u *User) Active(token string) error
- func (u *User) InviteRequired() bool
- func (u *User) PasswordReset(token, password string) error
- func (u *User) PasswordResetApply(origin, email string) error
- func (u *User) PasswordUpdate(uid int64, oldPwd, newPwd string) error
- func (u *User) SignIn(usernameOrEmail, password string, ttl int) (*model.User, error)
- func (u *User) SignOut()
- func (u *User) Signup(email, password string, opt model.UserCreateOption) (*model.User, error)
- type UserKey
- func (uk *UserKey) ClientStore() *store.ClientStore
- func (uk *UserKey) Create(muk *model.UserKey) error
- func (uk *UserKey) LoadExistClient()
- func (uk *UserKey) ResetSecret(muk *model.UserKey) error
- func (uk *UserKey) Token(ctx context.Context, data *oauth2.GenerateBasic, isGenRefresh bool) (access, refresh string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OptRegister ¶
Types ¶
type Mail ¶
type Mail struct {
// contains filtered or unexported fields
}
func (*Mail) NotifyPasswordReset ¶
type RoleClaims ¶
type RoleClaims struct { jwt.StandardClaims Roles []string `json:"roles"` }
func NewRoleClaims ¶
func NewRoleClaims(subject string, ttl int, roles []string) *RoleClaims
func (*RoleClaims) Uid ¶
func (rc *RoleClaims) Uid() int64
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) InviteRequired ¶
func (*User) PasswordReset ¶
func (*User) PasswordResetApply ¶
type UserKey ¶ added in v1.6.0
type UserKey struct {
// contains filtered or unexported fields
}
func NewUserKey ¶ added in v1.6.0
func NewUserKey() *UserKey
func (*UserKey) ClientStore ¶ added in v1.6.0
func (uk *UserKey) ClientStore() *store.ClientStore
func (*UserKey) LoadExistClient ¶ added in v1.6.0
func (uk *UserKey) LoadExistClient()
func (*UserKey) ResetSecret ¶ added in v1.6.0
Click to show internal directories.
Click to hide internal directories.