Documentation ¶
Index ¶
- func ValidateToken(fun func(w http.ResponseWriter, r *http.Request), f interface{}, ...) func(w http.ResponseWriter, r *http.Request)
- type OAuth2
- func (slf *OAuth2) AddAuthClient(id string, secret string, domain string, userid string)
- func (slf *OAuth2) Initial()
- func (slf *OAuth2) OnRequestAuth(w http.ResponseWriter, r *http.Request)
- func (slf *OAuth2) OnRequestAuthorization(w http.ResponseWriter, r *http.Request) error
- func (slf *OAuth2) SetKey(v string)
- func (slf *OAuth2) SetRefresh(v bool)
- func (slf *OAuth2) SetRefreshTokenExp(v int)
- func (slf *OAuth2) SetTokenExp(v int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateToken ¶
func ValidateToken(fun func(w http.ResponseWriter, r *http.Request), f interface{}, srv *server.Server) func(w http.ResponseWriter, r *http.Request)
ValidateToken doc
Types ¶
type OAuth2 ¶
type OAuth2 struct {
// contains filtered or unexported fields
}
OAuth2 doc @Summary @Struct OAuth2
func (*OAuth2) AddAuthClient ¶
AddAuthClient doc @Summary append authorization client @Method AddAuthClient @Param (string) client id @Param (string) secret @Param (string) domain @Param (string) user id
func (*OAuth2) OnRequestAuth ¶ added in v1.1.0
func (slf *OAuth2) OnRequestAuth(w http.ResponseWriter, r *http.Request)
OnRequestAuth doc @Summary http request method @Method onRequestAuth @Param (http.ResponseWriter) @Param (http.Request)
func (*OAuth2) OnRequestAuthorization ¶ added in v1.1.0
func (*OAuth2) SetKey ¶
SetKey doc @Summary Setting oauth2 token s256 key @Method SetKey @Param (string) key
func (*OAuth2) SetRefresh ¶
SetRefresh doc @Summary Setting oauth2 token reset refresh @Method SetRefresh @Param (bool) is refresh
func (*OAuth2) SetRefreshTokenExp ¶
SetRefreshTokenExp doc @Summary Setting oauth2 refresh token exp time @Method SetRefreshTokenExp @Param (int) refresh token exp time sec
func (*OAuth2) SetTokenExp ¶
SetTokenExp doc @Summary Setting oauth2 token exp time @Method SetTokenExp @Param (int) token exp time sec