Versions in this module Expand all Collapse all v1 v1.0.0 Jan 13, 2020 Changes in this version + type Oauth struct + func NewOauth(context *context.Context) *Oauth + func (oauth *Oauth) CheckAccessToken(accessToken, openID string) (b bool, err error) + func (oauth *Oauth) GetRedirectURL(redirectURI, scope, state string) (string, error) + func (oauth *Oauth) GetUserAccessToken(code string) (result ResAccessToken, err error) + func (oauth *Oauth) GetUserInfo(accessToken, openID string) (result UserInfo, err error) + func (oauth *Oauth) Redirect(writer http.ResponseWriter, req *http.Request, ...) error + func (oauth *Oauth) RefreshAccessToken(refreshToken string) (result ResAccessToken, err error) + type ResAccessToken struct + AccessToken string + ExpiresIn int64 + OpenID string + RefreshToken string + Scope string + type UserInfo struct + City string + Country string + HeadImgURL string + Nickname string + OpenID string + Privilege []string + Province string + Sex int32 + Unionid string