Class ExternalTenantUrlResolver

java.lang.Object
com.broadleafcommerce.auth.tenant.service.ExternalTenantUrlResolver
All Implemented Interfaces:
TenantUrlResolver

public class ExternalTenantUrlResolver extends Object implements TenantUrlResolver
The default implementation of TenantUrlResolver, which makes external calls to the tenant service for URL resolution of applications and tenant admins.
  • Constructor Details

    • ExternalTenantUrlResolver

      public ExternalTenantUrlResolver(org.springframework.web.reactive.function.client.WebClient webClient, ExternalTenantUrlResolverProperties properties)
  • Method Details

    • getApplicationUrl

      @Cacheable(cacheNames="authCacheApplicationUrlByApplicationId") public Optional<String> getApplicationUrl(String applicationId)
      Description copied from interface: TenantUrlResolver
      Resolves the full url for the provided application. This is used for discovery of the location where an application is served.
      Specified by:
      getApplicationUrl in interface TenantUrlResolver
      Parameters:
      applicationId - the application ID for which to fetch the full url string
      Returns:
      the full url string for the application
    • performUrlResolutionRequest

      protected Optional<String> performUrlResolutionRequest(@NonNull @NonNull String urlResolutionUrl, Supplier<String> errorLogMessage)
    • getApplicationUrlResolverUrl

      protected String getApplicationUrlResolverUrl(@NonNull @NonNull String applicationId)
    • getAdminUrl

      @Cacheable(cacheNames="authCacheAdminUrlByTenantId") public Optional<String> getAdminUrl(String tenantId)
      Description copied from interface: TenantUrlResolver
      Resolves the full url of the admin for the provided tenant. This is used for discovery of the location where the admin is served.
      Specified by:
      getAdminUrl in interface TenantUrlResolver
      Parameters:
      tenantId - the tenant ID for which to fetch the full url string
      Returns:
      the full url string for the tenant
    • getAdminUrlResolverUrl

      protected String getAdminUrlResolverUrl(@NonNull @NonNull String tenantId)
    • getWebClient

      protected org.springframework.web.reactive.function.client.WebClient getWebClient()
    • getProperties

      protected ExternalTenantUrlResolverProperties getProperties()