Class HttpHeaderTenantWriter

java.lang.Object
io.micronaut.multitenancy.writer.HttpHeaderTenantWriter
All Implemented Interfaces:
TenantWriter

@Singleton @Requires(property="micronaut.multitenancy.tenantwriter.httpheader.enabled") @Requires(beans=HttpHeaderTenantWriterConfiguration.class) public class HttpHeaderTenantWriter extends Object implements TenantWriter
Write the tenant id in an HTTP header.
Since:
1.0
Author:
Sergio del Amo
  • Field Details

  • Constructor Details

  • Method Details

    • getHeaderName

      protected String getHeaderName()
      Returns:
      the HTTP Header name where the token will be written to
    • writeTenant

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