public class DefaultLdapUserTenantIdProvider extends Object implements LdapUserTenantIdProvider
Modifier and Type | Field and Description |
---|---|
protected LdapUserProperties |
userProperties |
Constructor and Description |
---|
DefaultLdapUserTenantIdProvider(LdapUserProperties userProperties) |
Modifier and Type | Method and Description |
---|---|
protected OrFilter |
createFilter(Collection<String> tenantIdMappings,
String tenantId) |
Optional<Filter> |
createTenantIdFilter(String queryTenantId)
Method for providing the optional
Filter for the tenant being queried. |
String |
determineTenantId(Attributes attributes)
Method for extracting the tenant id for a user from the provided
Attributes |
LdapUserProperties |
getUserProperties() |
void |
setUserProperties(LdapUserProperties userProperties) |
protected LdapUserProperties userProperties
public DefaultLdapUserTenantIdProvider(LdapUserProperties userProperties)
public String determineTenantId(Attributes attributes)
LdapUserTenantIdProvider
Attributes
determineTenantId
in interface LdapUserTenantIdProvider
attributes
- the attributes that can be used to determine the tenant idpublic Optional<Filter> createTenantIdFilter(String queryTenantId)
LdapUserTenantIdProvider
Filter
for the tenant being queried.
If no filter is provided, then querying on tenant id would be ignored.createTenantIdFilter
in interface LdapUserTenantIdProvider
queryTenantId
- the query tenant id, never null
protected OrFilter createFilter(Collection<String> tenantIdMappings, String tenantId)
public LdapUserProperties getUserProperties()
public void setUserProperties(LdapUserProperties userProperties)