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
FieldsModifier and TypeFieldDescriptionprotected final CookieTenantWriterConfigurationTheCookieTenantWriterconfiguration.Fields inherited from interface io.micronaut.multitenancy.writer.TenantWriter
PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionCookieTenantWriter(CookieTenantWriterConfiguration cookieTenantWriterConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionvoidwriteTenant(io.micronaut.http.MutableHttpRequest<?> request, Serializable tenant) Writes the Tenant Id in a cookie of the request.
-
Field Details
-
cookieTenantWriterConfiguration
TheCookieTenantWriterconfiguration.
-
-
Constructor Details
-
CookieTenantWriter
- Parameters:
cookieTenantWriterConfiguration- TheCookieTenantWriterconfiguration
-
-
Method Details
-
writeTenant
Writes the Tenant Id in a cookie of the request.- Specified by:
writeTenantin interfaceTenantWriter- Parameters:
request- TheMutableHttpRequestinstancetenant- Tenant Id
-