Class CookieTenantWriter

  • All Implemented Interfaces:
    TenantWriter

    @Singleton
    @Requires(property="micronaut.multitenancy.tenantwriter.cookie.enabled") @Requires(beans=CookieTenantWriterConfiguration.class)
    public class CookieTenantWriter
    extends java.lang.Object
    implements TenantWriter
    Writes the tenantId to in a cookie.
    Since:
    1.0
    • Method Detail

      • writeTenant

        public void writeTenant​(io.micronaut.http.MutableHttpRequest<?> request,
                                java.io.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