Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OauthServer ¶
type OauthServer struct { base.BaseHandler // contains filtered or unexported fields }
func NewOauthServer ¶
func NewOauthServer(opts *kjwt.Options, base base.BaseHandler) *OauthServer
func (*OauthServer) DeleteToken ¶
func (s *OauthServer) DeleteToken(c *gin.Context)
@Tags Oauth @Summary 删除用户token @Description 删除用户token @Accept json @Produce json @Param token_id path int true "token id" @Success 200 {object} string "resp" @Router /v1/oauth/token/{token_id} [delete] @Security JWT
func (*OauthServer) ListToken ¶
func (s *OauthServer) ListToken(c *gin.Context)
@Tags Oauth @Summary 用户token列表 @Description 用户token列表 @Accept json @Produce json @Param page query int false "page" @Param size query int false "size" @Success 200 {object} handlers.ResponseStruct{Data=handlers.PageData{List=[]kmodels.UserToken}} "resp" @Router /v1/oauth/token [get] @Security JWT
func (*OauthServer) RegistRouter ¶
func (s *OauthServer) RegistRouter(rg *gin.RouterGroup)
func (*OauthServer) Token ¶
func (s *OauthServer) Token(c *gin.Context)
@Tags Oauth @Summary 签发oauth jwt token @Description 签发oauth jwt token @Accept json @Produce json @Param grant_type query string true "授权方式,目前只支持client_credentials" @Param scope query string true "授权范围,目前只支持validate" @Param expire query int true "授权时长,单位秒" @Success 200 {object} handlers.ResponseStruct{Data=object} "resp" @Router /v1/oauth/token [post] @Security JWT
func (*OauthServer) Validate ¶
func (s *OauthServer) Validate(c *gin.Context)
@Tags Oauth @Summary 检验oauth jwt token @Description 检验oauth jwt token @Accept json @Produce json @Success 200 {object} object "resp" @Router /v1/oauth/validate [get]