Interface HttpRequestTenantResolver
- All Known Implementing Classes:
AbstractSubdomainTenantResolver
,CookieTenantResolver
,HttpHeaderTenantResolver
,InternetDomainNameSubdomainTenantResolver
,PrincipalTenantResolver
,PublicSuffixListSubdomainTenantResolver
,SessionTenantResolver
,SubdomainTenantResolver
public interface HttpRequestTenantResolver
An interface for multi-tenant aware applications which resolve the current identifier for the current request.
- Since:
- 2.1.2
- Author:
- Sergio del Amo
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NonNull String
resolveTenantId
(@NonNull io.micronaut.http.HttpRequest<?> request) Resolves the current tenant identifier.@NonNull Serializable
resolveTenantIdentifier
(@NonNull io.micronaut.http.HttpRequest<?> request) Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
resolveTenantIdentifier
@Deprecated(forRemoval=true, since="5.5.0") @NonNull @NonNull Serializable resolveTenantIdentifier(@NonNull @NonNull io.micronaut.http.HttpRequest<?> request) throws TenantNotFoundException Deprecated, for removal: This API element is subject to removal in a future version.UseresolveTenantId(HttpRequest)
insteadResolves the current tenant identifier.- Parameters:
request
- The HTTP request- Returns:
- The tenant identifier
- Throws:
TenantNotFoundException
- if tenant not found
-
resolveTenantId
@NonNull default @NonNull String resolveTenantId(@NonNull @NonNull io.micronaut.http.HttpRequest<?> request) throws TenantNotFoundException Resolves the current tenant identifier.- Parameters:
request
- The HTTP request- Returns:
- The tenant identifier
- Throws:
TenantNotFoundException
- if tenant not found
-
resolveTenantId(HttpRequest)
instead