Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthorizeCode ¶
func GetUserByToken ¶ added in v1.9.1
func InitAuthRouter ¶
Types ¶
type GetAuthorizeCodeReq ¶
type GetAuthorizeCodeResp ¶
type GetAuthorizeCodeResp struct {
Code string `json:"code"`
}
type GetTokenReq ¶
type GetTokenReq struct { GrantType string `json:"grant_type"` // 授权类型 ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` Code string `json:"code"` // grant type为authorization_code时使用 AccountName string `json:"account_name"` // 密码授权模式 Password string `json:"password"` // 密码授权模式 RefreshToken string `json:"refresh_token"` // 刷新token AreaID uint64 `json:"area_id"` Scopes []string `json:"scopes"` }
func (*GetTokenReq) HandleTokenRequest ¶
func (req *GetTokenReq) HandleTokenRequest(c *gin.Context) (oauth2.GrantType, *oauth2.TokenGenerateRequest, error)
HandleTokenRequest 处理token请求
type GetTokenResp ¶
Click to show internal directories.
Click to hide internal directories.