Class HeaderInterceptor
java.lang.Object
de.hybris.platform.unifieduibackofficeservices.interceptors.HeaderInterceptor
- All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor
public class HeaderInterceptor
extends Object
implements org.springframework.http.client.ClientHttpRequestInterceptor
This Interceptor add content type and auth header to each request to pros and remove the configured headers from each request
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringThis method returns the authPassword as Configuredprotected StringThis method returns the authUserName as configuredprotected de.hybris.platform.servicelayer.config.ConfigurationServiceGets not allowed headers.org.springframework.http.client.ClientHttpResponseintercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution) voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) voidsetNotAllowedHeaders(List<String> notAllowedHeaders) Sets not allowed headers.
-
Constructor Details
-
HeaderInterceptor
public HeaderInterceptor()
-
-
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
-
getAuthUserName
This method returns the authUserName as configured- Returns:
- authUserName
-
getAuthPassword
This method returns the authPassword as Configured- Returns:
- authPassword
-
getNotAllowedHeaders
Gets not allowed headers.- Returns:
- the not allowed headers
-
setNotAllowedHeaders
Sets not allowed headers.- Parameters:
notAllowedHeaders- the not allowed headers
-
getConfigurationService
protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()- Returns:
- the configurationService
-
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) - Parameters:
configurationService- the configurationService to set
-