Documentation
¶
Index ¶
- Variables
- type Controller
- func (x *Controller) GetNavs(ctx context.Context, c *app.RequestContext)
- func (x *Controller) GetOptions(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) Index(ctx context.Context, c *app.RequestContext)
- func (x *Controller) SetUser(ctx context.Context, c *app.RequestContext)
- func (x *Controller) UnsetUser(ctx context.Context, c *app.RequestContext)
- func (x *Controller) VerifyRefreshCode(ctx context.Context, c *app.RequestContext)
- type Service
- func (x *Service) AuthVerify(ctx context.Context, uid string, jti string) (err error)
- func (x *Service) GetOptions(v string) utils.H
- func (x *Service) GetRefreshCode(ctx context.Context, uid string) (code string, err error)
- func (x *Service) GetUser(ctx context.Context, uid string) (data map[string]interface{}, err error)
- func (x *Service) Login(ctx context.Context, identity string, password string) (_ common.Active, err error)
- func (x *Service) LoginSession(ctx context.Context, uid string, jti string) (err error)
- func (x *Service) LogoutSession(ctx context.Context, uid string) (err error)
- func (x *Service) SetUser(ctx context.Context, id string, data interface{}) (interface{}, error)
- func (x *Service) UnsetUser(ctx context.Context, id string, mate string) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
IndexService *Service
}
func (*Controller) GetNavs ¶
func (x *Controller) GetNavs(ctx context.Context, c *app.RequestContext)
GetNavs 导航数据 @router /navs [GET]
func (*Controller) GetOptions ¶
func (x *Controller) GetOptions(ctx context.Context, c *app.RequestContext)
GetOptions 返回通用配置 @router /options [GET]
func (*Controller) GetRefreshCode ¶
func (x *Controller) GetRefreshCode(ctx context.Context, c *app.RequestContext)
GetRefreshCode 获取刷新令牌验证码 @router /code [GET]
func (*Controller) GetUser ¶
func (x *Controller) GetUser(ctx context.Context, c *app.RequestContext)
GetUser 获取授权用户信息 @router /user [GET]
func (*Controller) Index ¶
func (x *Controller) Index(ctx context.Context, c *app.RequestContext)
Index 入口 @router / [GET]
func (*Controller) SetUser ¶
func (x *Controller) SetUser(ctx context.Context, c *app.RequestContext)
SetUser 设置授权用户信息 @router /user [PATCH]
func (*Controller) UnsetUser ¶
func (x *Controller) UnsetUser(ctx context.Context, c *app.RequestContext)
UnsetUser 取消授权用户信息 @router /unset-user [POST]
func (*Controller) VerifyRefreshCode ¶
func (x *Controller) VerifyRefreshCode(ctx context.Context, c *app.RequestContext)
VerifyRefreshCode 校验刷新令牌验证码 @router /refresh_token [POST]
type Service ¶
type Service struct {
Values *common.Values
SessionService *sessions.Service
UsersService *users.Service
RolesService *roles.Service
DepartmentsService *departments.Service
Captcha *captcha.Captcha
Locker *locker.Locker
}
func (*Service) AuthVerify ¶
AuthVerify 认证鉴权、权限验证、会话续约
func (*Service) GetRefreshCode ¶
GetRefreshCode 获取刷新令牌验证码
func (*Service) Login ¶
func (x *Service) Login(ctx context.Context, identity string, password string) (_ common.Active, err error)
Login 登录
func (*Service) LoginSession ¶
LoginSession 建立登录会话,移除锁定
func (*Service) LogoutSession ¶
LogoutSession 注销登录会话
Click to show internal directories.
Click to hide internal directories.