Class PublicSuffixListSubdomainTenantResolver
java.lang.Object
io.micronaut.multitenancy.tenantresolver.AbstractSubdomainTenantResolver
io.micronaut.multitenancy.tenantresolver.PublicSuffixListSubdomainTenantResolver
- All Implemented Interfaces:
HttpRequestTenantResolver
,TenantResolver
@Singleton
@Requires(classes=de.malkusch.whoisServerList.publicSuffixList.PublicSuffixList.class) @Requires(bean=io.micronaut.http.server.util.HttpHostResolver.class) @Requires(property="micronaut.multitenancy.tenantresolver.subdomain.publicsuffixlist.enabled",value="true",defaultValue="true") @Requires(property="micronaut.multitenancy.tenantresolver.subdomain.enabled",value="true",defaultValue="false")
public class PublicSuffixListSubdomainTenantResolver
extends AbstractSubdomainTenantResolver
A tenant resolver that resolves the tenant from the subdomain. To resolve the subdomain it uses the Public Suffix Library class
PublicSuffixList
.- Since:
- 5.1.0
- Author:
- Sergio del Amo
-
Field Summary
Fields inherited from class io.micronaut.multitenancy.tenantresolver.AbstractSubdomainTenantResolver
httpHostResolver
Fields inherited from interface io.micronaut.multitenancy.tenantresolver.TenantResolver
ALL, DEFAULT, PREFIX
-
Method Summary
Modifier and TypeMethodDescriptionprotected @NonNull Serializable
resolveSubdomain
(@NonNull String host) Methods inherited from class io.micronaut.multitenancy.tenantresolver.AbstractSubdomainTenantResolver
resolveTenantId, resolveTenantId, resolveTenantIdentifier, resolveTenantIdentifier
-
Method Details
-
resolveSubdomain
- Specified by:
resolveSubdomain
in classAbstractSubdomainTenantResolver
- Parameters:
host
- Host- Returns:
- The subdomain.
-