Class OAuth2ClientHttpRequestInterceptor
java.lang.Object
com.mastercard.developer.oauth2.http.spring.restclient.OAuth2ClientHttpRequestInterceptor
- All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor
public final class OAuth2ClientHttpRequestInterceptor
extends Object
implements org.springframework.http.client.ClientHttpRequestInterceptor
An OAuth2 interceptor for Spring RestClient.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new OAuth2 interceptor for Spring RestClient. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.client.ClientHttpResponseintercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution) Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.http.client.ClientHttpRequestInterceptor
andThen, apply
-
Constructor Details
-
OAuth2ClientHttpRequestInterceptor
Creates a new OAuth2 interceptor for Spring RestClient.- Parameters:
config- A OAuth2 configuration.
-
-
Method Details
-
intercept
public org.springframework.http.client.ClientHttpResponse intercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution) throws IOException - Specified by:
interceptin interfaceorg.springframework.http.client.ClientHttpRequestInterceptor- Throws:
IOException
-