public class AuthOktaRequest extends AuthDefaultRequest
https://{domainPrefix}.okta.com/oauth2/default/.well-known/oauth-authorization-server
authStateCache, config, source
Constructor and Description |
---|
AuthOktaRequest(AuthConfig config) |
AuthOktaRequest(AuthConfig config,
AuthStateCache authStateCache) |
Modifier and Type | Method and Description |
---|---|
String |
accessTokenUrl(String code)
返回获取accessToken的url
|
String |
authorize(String state)
返回带
state 参数的授权url,授权回调时会带上这个state |
protected AuthToken |
getAccessToken(AuthCallback authCallback)
获取access token
|
protected AuthUser |
getUserInfo(AuthToken authToken)
使用token换取用户信息
|
AuthResponse |
refresh(AuthToken authToken)
刷新access token (续期)
|
protected String |
refreshTokenUrl(String refreshToken)
返回获取accessToken的url
|
AuthResponse |
revoke(AuthToken authToken)
撤销授权
|
protected String |
revokeUrl(AuthToken authToken)
返回获取revoke authorization的url
|
String |
userInfoUrl(AuthToken authToken)
返回获取userInfo的url
|
authorize, doGetAuthorizationCode, doGetRevoke, doGetUserInfo, doPostAuthorizationCode, doPostRevoke, doPostUserInfo, getRealState, getScopes, login
public AuthOktaRequest(AuthConfig config)
public AuthOktaRequest(AuthConfig config, AuthStateCache authStateCache)
protected AuthToken getAccessToken(AuthCallback authCallback)
AuthDefaultRequest
getAccessToken
in class AuthDefaultRequest
authCallback
- 授权成功后的回调参数AuthDefaultRequest.authorize()
,
AuthDefaultRequest.authorize(String)
public AuthResponse refresh(AuthToken authToken)
AuthRequest
authToken
- 登录成功后返回的Token信息protected AuthUser getUserInfo(AuthToken authToken)
AuthDefaultRequest
getUserInfo
in class AuthDefaultRequest
authToken
- token信息AuthDefaultRequest.getAccessToken(AuthCallback)
public AuthResponse revoke(AuthToken authToken)
AuthRequest
authToken
- 登录成功后返回的Token信息public String authorize(String state)
AuthDefaultRequest
state
参数的授权url,授权回调时会带上这个state
authorize
in interface AuthRequest
authorize
in class AuthDefaultRequest
state
- state 验证授权流程的参数,可以防止csrfpublic String accessTokenUrl(String code)
AuthDefaultRequest
accessTokenUrl
in class AuthDefaultRequest
code
- 授权码protected String refreshTokenUrl(String refreshToken)
AuthDefaultRequest
refreshTokenUrl
in class AuthDefaultRequest
refreshToken
- refreshTokenprotected String revokeUrl(AuthToken authToken)
AuthDefaultRequest
revokeUrl
in class AuthDefaultRequest
authToken
- tokenpublic String userInfoUrl(AuthToken authToken)
AuthDefaultRequest
userInfoUrl
in class AuthDefaultRequest
authToken
- tokenCopyright © 2021. All rights reserved.