Versions in this module Expand all Collapse all v0 v0.0.1 Nov 2, 2021 Changes in this version + type CommonError struct + ErrCode int64 + ErrMsg string + type Oauth struct + func NewOauth(appid, appsecret string) *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