Interface TenantProvider

All Known Implementing Classes:
TenantProviderImpl

public interface TenantProvider
Provides the tenant id for user.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Constant to be returned by getCurrentUserTenantId() if tenant is currently not determined.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the current tenant id, or NO_TENANT constant if tenant is currently not determined.
    default String
    getTenantIdForUser(org.springframework.security.core.userdetails.UserDetails userDetails)
    Returns tenant id for provided user, or NO_TENANT constant if tenant is currently not determined.
  • Field Details

  • Method Details

    • getCurrentUserTenantId

      String getCurrentUserTenantId()
      Returns the current tenant id, or NO_TENANT constant if tenant is currently not determined.
    • getTenantIdForUser

      default String getTenantIdForUser(org.springframework.security.core.userdetails.UserDetails userDetails)
      Returns tenant id for provided user, or NO_TENANT constant if tenant is currently not determined.
      Parameters:
      userDetails - user
      Returns:
      tenant id