public class AuthAmazonRequest extends AuthDefaultRequest
authStateCache, config, source
Constructor and Description |
---|
AuthAmazonRequest(AuthConfig config) |
AuthAmazonRequest(AuthConfig config,
AuthStateCache authStateCache) |
Modifier and Type | Method and Description |
---|---|
String |
authorize(String state)
https://developer.amazon.com/zh/docs/login-with-amazon/authorization-code-grant.html#authorization-request
|
protected AuthToken |
getAccessToken(AuthCallback authCallback)
https://developer.amazon.com/zh/docs/login-with-amazon/authorization-code-grant.html#access-token-request
|
protected AuthUser |
getUserInfo(AuthToken authToken)
https://developer.amazon.com/zh/docs/login-with-amazon/obtain-customer-profile.html#call-profile-endpoint
|
AuthResponse |
refresh(AuthToken authToken)
刷新access token (续期)
|
protected String |
userInfoUrl(AuthToken authToken)
返回获取userInfo的url
|
accessTokenUrl, authorize, doGetAuthorizationCode, doGetRevoke, doGetUserInfo, doPostAuthorizationCode, doPostRevoke, doPostUserInfo, getRealState, getScopes, login, refreshTokenUrl, revokeUrl
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
revoke
public AuthAmazonRequest(AuthConfig config)
public AuthAmazonRequest(AuthConfig config, AuthStateCache authStateCache)
public String authorize(String state)
authorize
in interface AuthRequest
authorize
in class AuthDefaultRequest
state
- state 验证授权流程的参数,可以防止csrfprotected AuthToken getAccessToken(AuthCallback authCallback)
getAccessToken
in class AuthDefaultRequest
authCallback
- 授权成功后的回调参数AuthDefaultRequest.authorize()
,
AuthDefaultRequest.authorize(String)
public AuthResponse refresh(AuthToken authToken)
AuthRequest
authToken
- 登录成功后返回的Token信息protected AuthUser getUserInfo(AuthToken authToken)
getUserInfo
in class AuthDefaultRequest
authToken
- token信息AuthDefaultRequest.getAccessToken(AuthCallback)
protected String userInfoUrl(AuthToken authToken)
AuthDefaultRequest
userInfoUrl
in class AuthDefaultRequest
authToken
- tokenCopyright © 2021. All rights reserved.