Class SandboxOriginalAuthorContextInfoCustomizer

java.lang.Object
com.broadleafcommerce.sandbox.service.context.SandboxOriginalAuthorContextInfoCustomizer
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.context.ContextInfoCustomizer, org.springframework.core.Ordered

public class SandboxOriginalAuthorContextInfoCustomizer 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

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
    SandboxOriginalAuthorContextInfoCustomizer(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils, com.broadleafcommerce.common.extension.data.DataRouteSupporting route)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    customize(@NotNull 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
     
    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

  • Constructor Details

    • SandboxOriginalAuthorContextInfoCustomizer

      public SandboxOriginalAuthorContextInfoCustomizer(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils, com.broadleafcommerce.common.extension.data.DataRouteSupporting route)
  • Method Details

    • customize

      public void customize(@NotNull @NotNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, String routeKey, org.springframework.core.MethodParameter endpoint, org.springframework.web.context.request.NativeWebRequest webRequest)
      Specified by:
      customize in interface com.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()