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 Details

  • Constructor Details

  • Method Details

    • writeTenant

      public void writeTenant(io.micronaut.http.MutableHttpRequest<?> request, Serializable tenant)
      Writes the Tenant Id in a cookie of the request.
      Specified by:
      writeTenant in interface TenantWriter
      Parameters:
      request - The MutableHttpRequest instance
      tenant - Tenant Id