This commit is contained in:
suyl
2021-08-02 11:13:10 +08:00
parent e6ea1adef7
commit 6f5644325d
12 changed files with 151 additions and 17 deletions

View File

@@ -20,14 +20,14 @@ func (a *API) UserInfoAuth(scopes []string, state string) (retVal map[string]int
retVal, err = a.AccessAPI("alipay.user.info.auth", nil, map[string]interface{}{
"scopes": scopes,
"state": state,
})
}, false)
return retVal, err
}
func (a *API) AuthTokenAppQuery(appAuthToken string) (retVal map[string]interface{}, err error) {
retVal, err = a.AccessAPI("alipay.open.auth.token.app.query", nil, map[string]interface{}{
"app_auth_token": appAuthToken,
})
}, false)
return retVal, err
}
@@ -41,7 +41,7 @@ func (a *API) SystemAuthToken(grantType, code, refreshToken string) (tokenInfo *
if refreshToken != "" {
params["refresh_token"] = refreshToken
}
retVal, err := a.AccessAPI("alipay.system.oauth.token", params, nil)
retVal, err := a.AccessAPI("alipay.system.oauth.token", params, nil, false)
if err == nil {
err = utils.Map2StructByJson(retVal, &tokenInfo, false)
}