Class CatalogOriginalAuthorContextInfoCustomizer
java.lang.Object
com.broadleafcommerce.catalog.service.context.CatalogOriginalAuthorContextInfoCustomizer
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.context.ContextInfoCustomizer
,org.springframework.core.Ordered
public class CatalogOriginalAuthorContextInfoCustomizer
extends Object
implements com.broadleafcommerce.data.tracking.core.context.ContextInfoCustomizer
Customizes the
ContextInfo
with the original author of the request if the request is
coming from an admin-scoped service client.
This is useful for tracking the original author of a request when it is being proxied by an admin-scoped service client.
The original author is determined by the "X-Original-Author" header in the request.
- Author:
- Jon Fleschler (jfleschler)
-
Field Summary
FieldsFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorsConstructorDescriptionCatalogOriginalAuthorContextInfoCustomizer
(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils, com.broadleafcommerce.common.extension.data.DataRouteSupporting route) -
Method Summary
Modifier and TypeMethodDescriptionvoid
customize
(@NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, String routeKey, org.springframework.core.MethodParameter endpoint, org.springframework.web.context.request.NativeWebRequest webRequest) protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils
protected com.broadleafcommerce.common.extension.data.DataRouteSupporting
getRoute()
protected boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.data.tracking.core.context.ContextInfoCustomizer
getOrder
-
Field Details
-
ORIGINAL_AUTHOR_HEADER
- See Also:
-
-
Constructor Details
-
CatalogOriginalAuthorContextInfoCustomizer
public CatalogOriginalAuthorContextInfoCustomizer(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils, com.broadleafcommerce.common.extension.data.DataRouteSupporting route)
-
-
Method Details
-
customize
public void customize(@NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @Nullable String routeKey, @Nullable org.springframework.core.MethodParameter endpoint, @Nullable org.springframework.web.context.request.NativeWebRequest webRequest) - Specified by:
customize
in interfacecom.broadleafcommerce.data.tracking.core.context.ContextInfoCustomizer
-
isAdminScopedServiceClient
protected boolean isAdminScopedServiceClient() -
getAuthenticationUtils
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthenticationUtils() -
getRoute
protected com.broadleafcommerce.common.extension.data.DataRouteSupporting getRoute()
-