public class RetryingOAuth extends OAuth implements okhttp3.Interceptor
| Constructor and Description |
|---|
RetryingOAuth(org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder) |
RetryingOAuth(okhttp3.OkHttpClient client,
org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder) |
RetryingOAuth(String tokenUrl,
String clientId,
OAuthFlow flow,
String clientSecret,
Map<String,String> parameters) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyToParams(List<Pair> queryParams,
Map<String,String> headerParams,
Map<String,String> cookieParams)
Apply authentication settings to header and query params.
|
org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder |
getTokenRequestBuilder() |
okhttp3.Response |
intercept(okhttp3.Interceptor.Chain chain) |
void |
setFlow(OAuthFlow flow) |
void |
setTokenRequestBuilder(org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder) |
boolean |
updateAccessToken(String requestAccessToken) |
getAccessToken, setAccessTokenpublic RetryingOAuth(okhttp3.OkHttpClient client,
org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder)
public RetryingOAuth(org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder)
public RetryingOAuth(String tokenUrl, String clientId, OAuthFlow flow, String clientSecret, Map<String,String> parameters)
tokenUrl - The token URL to be used for this OAuth2 flow.
Applicable to the following OAuth2 flows: "password", "clientCredentials" and "authorizationCode".
The value must be an absolute URL.clientId - The OAuth2 client ID for the "clientCredentials" flow.clientSecret - The OAuth2 client secret for the "clientCredentials" flow.public void setFlow(OAuthFlow flow)
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain)
throws IOException
intercept in interface okhttp3.InterceptorIOExceptionpublic boolean updateAccessToken(String requestAccessToken) throws IOException
IOExceptionpublic org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder getTokenRequestBuilder()
public void setTokenRequestBuilder(org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder)
public void applyToParams(List<Pair> queryParams, Map<String,String> headerParams, Map<String,String> cookieParams)
AuthenticationapplyToParams in interface AuthenticationapplyToParams in class OAuthqueryParams - List of query parametersheaderParams - Map of header parameterscookieParams - Map of cookie parametersCopyright © 2021 WSO2 Inc. All rights reserved.