Module org.apache.logging.log4j
Class SelfTokenRestInterceptor
- java.lang.Object
-
- io.mosip.kernel.auth.defaultadapter.config.SelfTokenRestInterceptor
-
- All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor
public class SelfTokenRestInterceptor extends Object implements org.springframework.http.client.ClientHttpRequestInterceptor
This class intercepts and renew client token.- Author:
- Urvil Joshi
-
-
Constructor Summary
Constructors Constructor Description SelfTokenRestInterceptor(org.springframework.core.env.Environment environment, org.springframework.web.client.RestTemplate restTemplate, TokenHolder<String> cachedToken, TokenHelper tokenHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.client.ClientHttpResponseintercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution)
-
-
-
Constructor Detail
-
SelfTokenRestInterceptor
public SelfTokenRestInterceptor(org.springframework.core.env.Environment environment, org.springframework.web.client.RestTemplate restTemplate, TokenHolder<String> cachedToken, TokenHelper tokenHelper)
-
-
Method Detail
-
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
-
-