public class AuthWeChatOpenRequest extends AuthDefaultRequest
authStateCache, config, source| Constructor and Description | 
|---|
| AuthWeChatOpenRequest(AuthConfig config) | 
| AuthWeChatOpenRequest(AuthConfig config,
                     AuthStateCache authStateCache) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected String | accessTokenUrl(String code)返回获取accessToken的url | 
| String | authorize(String state)返回带 state参数的授权url,授权回调时会带上这个state | 
| protected AuthToken | getAccessToken(AuthCallback authCallback)微信的特殊性,此时返回的信息同时包含 openid 和 access_token | 
| protected AuthUser | getUserInfo(AuthToken authToken)使用token换取用户信息 | 
| AuthResponse | refresh(AuthToken oldToken)刷新access token (续期) | 
| protected String | refreshTokenUrl(String refreshToken)返回获取userInfo的url | 
| protected String | userInfoUrl(AuthToken authToken)返回获取userInfo的url | 
authorize, doGetAuthorizationCode, doGetRevoke, doGetUserInfo, doPostAuthorizationCode, doPostRevoke, doPostUserInfo, getRealState, getScopes, login, revokeUrlclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrevokepublic AuthWeChatOpenRequest(AuthConfig config)
public AuthWeChatOpenRequest(AuthConfig config, AuthStateCache authStateCache)
protected AuthToken getAccessToken(AuthCallback authCallback)
getAccessToken in class AuthDefaultRequestauthCallback - 回调返回的参数AuthDefaultRequest.authorize(), 
AuthDefaultRequest.authorize(String)protected AuthUser getUserInfo(AuthToken authToken)
AuthDefaultRequestgetUserInfo in class AuthDefaultRequestauthToken - token信息AuthDefaultRequest.getAccessToken(AuthCallback)public AuthResponse refresh(AuthToken oldToken)
AuthRequestoldToken - 登录成功后返回的Token信息public String authorize(String state)
state参数的授权url,授权回调时会带上这个stateauthorize in interface AuthRequestauthorize in class AuthDefaultRequeststate - state 验证授权流程的参数,可以防止csrfprotected String accessTokenUrl(String code)
accessTokenUrl in class AuthDefaultRequestcode - 授权码protected String userInfoUrl(AuthToken authToken)
userInfoUrl in class AuthDefaultRequestauthToken - 用户授权后的tokenprotected String refreshTokenUrl(String refreshToken)
refreshTokenUrl in class AuthDefaultRequestrefreshToken - getAccessToken方法返回的refreshTokenCopyright © 2021. All rights reserved.