Package io.micronaut.multitenancy.writer
Class CookieTenantWriter
java.lang.Object
io.micronaut.multitenancy.writer.CookieTenantWriter
- All Implemented Interfaces:
TenantWriter
@Singleton
@Requires(property="micronaut.multitenancy.tenantwriter.cookie.enabled") @Requires(beans=CookieTenantWriterConfiguration.class)
public class CookieTenantWriter
extends Object
implements TenantWriter
Writes the tenantId to in a cookie.
- Since:
- 1.0
- Author:
- Sergio del Amo
-
Field Summary
Modifier and TypeFieldDescriptionprotected final CookieTenantWriterConfiguration
TheCookieTenantWriter
configuration.Fields inherited from interface io.micronaut.multitenancy.writer.TenantWriter
PREFIX
-
Constructor Summary
ConstructorDescriptionCookieTenantWriter
(CookieTenantWriterConfiguration cookieTenantWriterConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionvoid
writeTenant
(io.micronaut.http.MutableHttpRequest<?> request, Serializable tenant) Writes the Tenant Id in a cookie of the request.
-
Field Details
-
cookieTenantWriterConfiguration
TheCookieTenantWriter
configuration.
-
-
Constructor Details
-
CookieTenantWriter
- Parameters:
cookieTenantWriterConfiguration
- TheCookieTenantWriter
configuration
-
-
Method Details
-
writeTenant
Writes the Tenant Id in a cookie of the request.- Specified by:
writeTenant
in interfaceTenantWriter
- Parameters:
request
- TheMutableHttpRequest
instancetenant
- Tenant Id
-