public class AuthKujialeRequest extends AuthDefaultRequest
authStateCache, config, source
Constructor and Description |
---|
AuthKujialeRequest(AuthConfig config) |
AuthKujialeRequest(AuthConfig config,
AuthStateCache authStateCache) |
Modifier and Type | Method and Description |
---|---|
String |
authorize(String state)
返回带
state 参数的授权url,授权回调时会带上这个state
默认只向用户请求用户信息授权 |
AuthToken |
getAccessToken(AuthCallback authCallback)
获取access token
|
AuthUser |
getUserInfo(AuthToken authToken)
使用token换取用户信息
|
AuthResponse |
refresh(AuthToken authToken)
刷新access token (续期)
|
accessTokenUrl, authorize, doGetAuthorizationCode, doGetRevoke, doGetUserInfo, doPostAuthorizationCode, doPostRevoke, doPostUserInfo, getRealState, getScopes, login, refreshTokenUrl, revokeUrl, userInfoUrl
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
revoke
public AuthKujialeRequest(AuthConfig config)
public AuthKujialeRequest(AuthConfig config, AuthStateCache authStateCache)
public String authorize(String state)
state
参数的授权url,授权回调时会带上这个state
默认只向用户请求用户信息授权authorize
in interface AuthRequest
authorize
in class AuthDefaultRequest
state
- state 验证授权流程的参数,可以防止csrfpublic AuthToken getAccessToken(AuthCallback authCallback)
AuthDefaultRequest
getAccessToken
in class AuthDefaultRequest
authCallback
- 授权成功后的回调参数AuthDefaultRequest.authorize()
,
AuthDefaultRequest.authorize(String)
public AuthUser getUserInfo(AuthToken authToken)
AuthDefaultRequest
getUserInfo
in class AuthDefaultRequest
authToken
- token信息AuthDefaultRequest.getAccessToken(AuthCallback)
public AuthResponse refresh(AuthToken authToken)
AuthRequest
authToken
- 登录成功后返回的Token信息Copyright © 2021. All rights reserved.