Documentation
¶
Index ¶
- type AccessTokenResponse
- type OAuth
- func (auth *OAuth) AuthUrl() string
- func (auth *OAuth) Redirect(writer http.ResponseWriter, request *http.Request)
- func (auth *OAuth) TokenFromCode(code string) (*AccessTokenResponse, error)
- func (auth *OAuth) UserFromCode(code string) (*user.User, error)
- func (auth *OAuth) WithRedirectUrl(redirectUrl string) *OAuth
- func (auth *OAuth) WithScope(scope string) *OAuth
- func (auth *OAuth) WithState(state string) *OAuth
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokenResponse ¶
type OAuth ¶
type OAuth struct {
// contains filtered or unexported fields
}
OAuth 公众号用户授权
func New ¶
func New(account contracts.AccountInterface) *OAuth
func (*OAuth) Redirect ¶
func (auth *OAuth) Redirect(writer http.ResponseWriter, request *http.Request)
func (*OAuth) TokenFromCode ¶
func (auth *OAuth) TokenFromCode(code string) (*AccessTokenResponse, error)
func (*OAuth) WithRedirectUrl ¶
Click to show internal directories.
Click to hide internal directories.