Class ExternalTenantUrlResolver
java.lang.Object
com.broadleafcommerce.auth.tenant.service.ExternalTenantUrlResolver
- All Implemented Interfaces:
TenantUrlResolver
The default implementation of
TenantUrlResolver
, which makes external calls to the tenant
service for URL resolution of applications and tenant admins.-
Field Summary
Fields inherited from interface com.broadleafcommerce.auth.tenant.service.TenantUrlResolver
CACHE_ADMIN_URL_BY_TENANT_ID, CACHE_APPLICATION_BY_APPLICATION_ID, CACHE_APPLICATION_URL_BY_APPLICATION_ID
-
Constructor Summary
ConstructorDescriptionExternalTenantUrlResolver
(org.springframework.web.reactive.function.client.WebClient webClient, ExternalTenantUrlResolverProperties properties) -
Method Summary
Modifier and TypeMethodDescriptiongetAdminUrl
(String tenantId) Resolves the full url of the admin for the provided tenant.protected String
getAdminUrlResolverUrl
(@NonNull String tenantId) getApplicationUrl
(String applicationId) Resolves the full url for the provided application.protected String
getApplicationUrlResolverUrl
(@NonNull String applicationId) protected ExternalTenantUrlResolverProperties
protected org.springframework.web.reactive.function.client.WebClient
performUrlResolutionRequest
(@NonNull String urlResolutionUrl, Supplier<String> errorLogMessage)
-
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 interfaceTenantUrlResolver
- Parameters:
applicationId
- the application ID for which to fetch the full url string- Returns:
- the full url string for the application
-
performUrlResolutionRequest
-
getApplicationUrlResolverUrl
-
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 interfaceTenantUrlResolver
- Parameters:
tenantId
- the tenant ID for which to fetch the full url string- Returns:
- the full url string for the tenant
-
getAdminUrlResolverUrl
-
getWebClient
protected org.springframework.web.reactive.function.client.WebClient getWebClient() -
getProperties
-