Versions in this module Expand all Collapse all v1 v1.0.0 Nov 10, 2022 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, lang string) (result UserInfo, err error) + func (oauth *Oauth) GetWebAppRedirectURL(redirectURI, scope, state string) (string, 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 + UnionID string + type UserInfo struct + City string + Country string + HeadImgURL string + Nickname string + OpenID string + Privilege []string + Province string + Sex int32 + Unionid string