Package io.micronaut.multitenancy.writer
Class HttpHeaderTenantWriterConfigurationProperties
java.lang.Object
io.micronaut.multitenancy.writer.HttpHeaderTenantWriterConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
,HttpHeaderTenantWriterConfiguration
@ConfigurationProperties("micronaut.multitenancy.tenantwriter.httpheader")
public class HttpHeaderTenantWriterConfigurationProperties
extends Object
implements HttpHeaderTenantWriterConfiguration
Tenant Writer Configuration Properties.
- Since:
- 1.0
- Author:
- Sergio del Amo
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
setEnabled
(boolean enabled) EnablesHttpHeaderTenantWriter
.void
setHeaderName
(String headerName) Http Header name.
-
Field Details
-
PREFIX
Configuration Properties Prefix.- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
DEFAULT_HEADERNAME
The default header name.- See Also:
-
-
Constructor Details
-
HttpHeaderTenantWriterConfigurationProperties
public HttpHeaderTenantWriterConfigurationProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) EnablesHttpHeaderTenantWriter
. Default value (false).- Parameters:
enabled
- enabled flag
-
setHeaderName
Http Header name. Default value ("tenantId").- Parameters:
headerName
- HTTP header name
-
getHeaderName
- Specified by:
getHeaderName
in interfaceHttpHeaderTenantWriterConfiguration
- Returns:
- an HTTP Header name. e.g. Authorization
-