Class RetryingOAuth
java.lang.Object
org.wso2.am.integration.clients.admin.auth.OAuth
org.wso2.am.integration.clients.admin.auth.RetryingOAuth
- All Implemented Interfaces:
okhttp3.Interceptor,Authentication
-
Nested Class Summary
Nested classes/interfaces inherited from interface okhttp3.Interceptor
okhttp3.Interceptor.Chain, okhttp3.Interceptor.Companion -
Field Summary
Fields inherited from interface okhttp3.Interceptor
Companion -
Constructor Summary
ConstructorsConstructorDescriptionRetryingOAuth(String tokenUrl, String clientId, OAuthFlow flow, String clientSecret, Map<String, String> parameters) RetryingOAuth(okhttp3.OkHttpClient client, org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder) RetryingOAuth(org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToParams(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.TokenRequestBuilderokhttp3.Responseintercept(okhttp3.Interceptor.Chain chain) voidvoidsetTokenRequestBuilder(org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder) booleanupdateAccessToken(String requestAccessToken) Methods inherited from class org.wso2.am.integration.clients.admin.auth.OAuth
getAccessToken, setAccessToken
-
Constructor Details
-
RetryingOAuth
public RetryingOAuth(okhttp3.OkHttpClient client, org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder) -
RetryingOAuth
public RetryingOAuth(org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder) -
RetryingOAuth
public RetryingOAuth(String tokenUrl, String clientId, OAuthFlow flow, String clientSecret, Map<String, String> parameters) - 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.
-
-
Method Details
-
setFlow
-
intercept
- Specified by:
interceptin interfaceokhttp3.Interceptor- Throws:
IOException
-
updateAccessToken
- Throws:
IOException
-
getTokenRequestBuilder
public org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder getTokenRequestBuilder() -
setTokenRequestBuilder
public void setTokenRequestBuilder(org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder) -
applyToParams
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) Description copied from interface:AuthenticationApply authentication settings to header and query params.- Specified by:
applyToParamsin interfaceAuthentication- Overrides:
applyToParamsin classOAuth- Parameters:
queryParams- List of query parametersheaderParams- Map of header parameterscookieParams- Map of cookie parameters
-