Documentation ¶
Index ¶
- Variables
- type Controller
- func (x *Controller) ForgetReset(ctx context.Context, c *app.RequestContext)
- func (x *Controller) GetForgetCode(ctx context.Context, c *app.RequestContext)
- func (x *Controller) GetLoginSms(ctx context.Context, c *app.RequestContext)
- func (x *Controller) GetRefreshCode(ctx context.Context, c *app.RequestContext)
- func (x *Controller) GetUser(ctx context.Context, c *app.RequestContext)
- func (x *Controller) GetUserPhoneCode(ctx context.Context, c *app.RequestContext)
- func (x *Controller) GetUserTotp(ctx context.Context, c *app.RequestContext)
- func (x *Controller) Login(ctx context.Context, c *app.RequestContext)
- func (x *Controller) LoginSms(ctx context.Context, c *app.RequestContext)
- func (x *Controller) LoginTotp(ctx context.Context, c *app.RequestContext)
- func (x *Controller) Logout(ctx context.Context, c *app.RequestContext)
- func (x *Controller) Options(_ context.Context, c *app.RequestContext)
- func (x *Controller) Ping(_ context.Context, c *app.RequestContext)
- func (x *Controller) RefreshToken(ctx context.Context, c *app.RequestContext)
- func (x *Controller) SetUser(ctx context.Context, c *app.RequestContext)
- func (x *Controller) SetUserPassword(ctx context.Context, c *app.RequestContext)
- func (x *Controller) SetUserPhone(ctx context.Context, c *app.RequestContext)
- func (x *Controller) SetUserTotp(ctx context.Context, c *app.RequestContext)
- func (x *Controller) UnsetUser(ctx context.Context, c *app.RequestContext)
- func (x *Controller) Verify(ctx context.Context, c *app.RequestContext)
- type ForgetResetDto
- type GetForgetCodeDto
- type GetLoginSmsDto
- type GetUserPhone
- type LoginDto
- type LoginResult
- type LoginSmsDto
- type LoginTotpDto
- type M
- type OptionsDto
- type RefreshTokenDto
- type Service
- func (x *Service) CreateAccessToken(ctx context.Context, userId string) (ts string, err error)
- func (x *Service) ForgetReset(ctx context.Context, dto ForgetResetDto) (err error)
- func (x *Service) GetForgetCode(ctx context.Context, username string) (err error)
- func (x *Service) GetLoginSms(ctx context.Context, phone string) (code string, err error)
- func (x *Service) GetRefreshCode(ctx context.Context, userId string) (code string, err error)
- func (x *Service) GetUser(ctx context.Context, userId string) (data M, err error)
- func (x *Service) GetUserPhoneCode(ctx context.Context, phone string) (code string, err error)
- func (x *Service) GetUserTotp(ctx context.Context, userId string) (uri string, err error)
- func (x *Service) Login(ctx context.Context, username string, password string) (r *LoginResult, err error)
- func (x *Service) LoginSms(ctx context.Context, phone string, code string) (r *LoginResult, err error)
- func (x *Service) LoginTotp(ctx context.Context, email string, code string) (r *LoginResult, err error)
- func (x *Service) Logining(ctx context.Context, filter bson.M) (u model.User, err error)
- func (x *Service) Logout(ctx context.Context, userId string)
- func (x *Service) RefreshToken(ctx context.Context, claims passport.Claims, code string) (ts string, err error)
- func (x *Service) SetUser(ctx context.Context, userId string, update bson.M) (result interface{}, err error)
- func (x *Service) SetUserPassword(ctx context.Context, userId string, old string, password string) (r interface{}, err error)
- func (x *Service) SetUserPhone(ctx context.Context, userId string, phone string, code string) (r interface{}, err error)
- func (x *Service) SetUserTotp(ctx context.Context, userId string, uri string, tss [2]string) (r interface{}, err error)
- func (x *Service) Verify(ctx context.Context, ts string) (claims passport.Claims, err error)
- func (x *Service) WriteLogsetLogin(ctx context.Context, data *model.LogsetLogin) (err error)
- type SetUserDto
- type SetUserPassword
- type SetUserPhone
- type SetUserTotp
- type UnsetUserDto
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Controller ¶
func (*Controller) ForgetReset ¶ added in v0.1.0
func (x *Controller) ForgetReset(ctx context.Context, c *app.RequestContext)
func (*Controller) GetForgetCode ¶ added in v0.1.0
func (x *Controller) GetForgetCode(ctx context.Context, c *app.RequestContext)
func (*Controller) GetLoginSms ¶ added in v0.1.0
func (x *Controller) GetLoginSms(ctx context.Context, c *app.RequestContext)
func (*Controller) GetRefreshCode ¶
func (x *Controller) GetRefreshCode(ctx context.Context, c *app.RequestContext)
func (*Controller) GetUser ¶
func (x *Controller) GetUser(ctx context.Context, c *app.RequestContext)
func (*Controller) GetUserPhoneCode ¶ added in v0.1.0
func (x *Controller) GetUserPhoneCode(ctx context.Context, c *app.RequestContext)
func (*Controller) GetUserTotp ¶ added in v0.1.0
func (x *Controller) GetUserTotp(ctx context.Context, c *app.RequestContext)
func (*Controller) Login ¶ added in v0.0.29
func (x *Controller) Login(ctx context.Context, c *app.RequestContext)
func (*Controller) LoginSms ¶ added in v0.1.0
func (x *Controller) LoginSms(ctx context.Context, c *app.RequestContext)
func (*Controller) LoginTotp ¶ added in v0.1.0
func (x *Controller) LoginTotp(ctx context.Context, c *app.RequestContext)
func (*Controller) Logout ¶ added in v0.0.29
func (x *Controller) Logout(ctx context.Context, c *app.RequestContext)
func (*Controller) Options ¶ added in v0.0.29
func (x *Controller) Options(_ context.Context, c *app.RequestContext)
func (*Controller) Ping ¶ added in v0.0.29
func (x *Controller) Ping(_ context.Context, c *app.RequestContext)
func (*Controller) RefreshToken ¶ added in v0.0.29
func (x *Controller) RefreshToken(ctx context.Context, c *app.RequestContext)
func (*Controller) SetUser ¶
func (x *Controller) SetUser(ctx context.Context, c *app.RequestContext)
func (*Controller) SetUserPassword ¶ added in v0.1.0
func (x *Controller) SetUserPassword(ctx context.Context, c *app.RequestContext)
func (*Controller) SetUserPhone ¶ added in v0.1.0
func (x *Controller) SetUserPhone(ctx context.Context, c *app.RequestContext)
func (*Controller) SetUserTotp ¶ added in v0.1.0
func (x *Controller) SetUserTotp(ctx context.Context, c *app.RequestContext)
func (*Controller) UnsetUser ¶
func (x *Controller) UnsetUser(ctx context.Context, c *app.RequestContext)
func (*Controller) Verify ¶ added in v0.0.29
func (x *Controller) Verify(ctx context.Context, c *app.RequestContext)
type ForgetResetDto ¶ added in v0.1.0
type GetForgetCodeDto ¶ added in v0.1.0
type GetForgetCodeDto struct {
Email string `query:"email" vd:"email"`
}
type GetLoginSmsDto ¶ added in v0.1.0
type GetLoginSmsDto struct {
Phone string `query:"phone" vd:"required"`
}
type GetUserPhone ¶ added in v0.1.0
type GetUserPhone struct {
Phone string `query:"phone" vd:"required"`
}
type LoginResult ¶ added in v0.1.0
type LoginSmsDto ¶ added in v0.1.0
type LoginTotpDto ¶ added in v0.1.0
type OptionsDto ¶ added in v0.0.29
type OptionsDto struct {
Type string `query:"type"`
}
type RefreshTokenDto ¶ added in v0.0.29
type RefreshTokenDto struct {
Code string `json:"code" vd:"required"`
}
type Service ¶
type Service struct { *common.Inject Sessions *sessions.Service Passport *common.APIPassport TencentX *tencent.Service }
func (*Service) CreateAccessToken ¶ added in v0.1.0
func (*Service) ForgetReset ¶ added in v0.1.0
func (x *Service) ForgetReset(ctx context.Context, dto ForgetResetDto) (err error)
func (*Service) GetForgetCode ¶ added in v0.1.0
func (*Service) GetLoginSms ¶ added in v0.1.0
func (*Service) GetRefreshCode ¶
func (*Service) GetUserPhoneCode ¶ added in v0.1.0
func (*Service) GetUserTotp ¶ added in v0.1.0
func (*Service) RefreshToken ¶ added in v0.0.29
func (*Service) SetUserPassword ¶ added in v0.1.0
func (*Service) SetUserPhone ¶ added in v0.1.0
func (*Service) SetUserTotp ¶ added in v0.1.0
func (*Service) WriteLogsetLogin ¶ added in v0.1.16
type SetUserDto ¶ added in v0.0.29
type SetUserPassword ¶ added in v0.1.0
type SetUserPhone ¶ added in v0.1.0
type SetUserTotp ¶ added in v0.1.0
type UnsetUserDto ¶ added in v0.0.29
type UnsetUserDto struct {
Key string `path:"key" vd:"oneof='phone' 'totp' 'lark'"`
}
Click to show internal directories.
Click to hide internal directories.