Package de.xima.fc.ldap
Class LDAPFilters
java.lang.Object
de.xima.fc.ldap.LDAPFilters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
clearFilter
(String orgFilter) static com.unboundid.ldap.sdk.Filter
static com.unboundid.ldap.sdk.Filter
getActiveUserFilter
(String loginname) static com.unboundid.ldap.sdk.Filter
static com.unboundid.ldap.sdk.Filter
getKerberosLoginFilter
(String kerberosLogin, String filter) static com.unboundid.ldap.sdk.Filter
getObjectIDFilter
(byte[] objectID) static com.unboundid.ldap.sdk.Filter
getObjectIDFilter
(String objectID) static com.unboundid.ldap.sdk.Filter
static com.unboundid.ldap.sdk.Filter
getUserFilter
(String userIdAttrName, String userName) static com.unboundid.ldap.sdk.Filter
getUserFilter
(List<String> userIdAttrName, String userName) static com.unboundid.ldap.sdk.Filter
getUserLoginFilter
(String loginname) static com.unboundid.ldap.sdk.Filter
getUserLoginFilter
(org.pac4j.core.profile.UserProfile profile, String userIdAttribute) static com.unboundid.ldap.sdk.Filter
getUserLoginFilter
(org.pac4j.core.profile.UserProfile profile, String... userIdAttributes)
-
Constructor Details
-
LDAPFilters
public LDAPFilters()
-
-
Method Details
-
getObjectIDFilter
public static com.unboundid.ldap.sdk.Filter getObjectIDFilter(byte[] objectID) -
getObjectIDFilter
-
getUserFilter
public static com.unboundid.ldap.sdk.Filter getUserFilter() throws com.unboundid.ldap.sdk.LDAPException- Throws:
com.unboundid.ldap.sdk.LDAPException
-
getGroupFilter
public static com.unboundid.ldap.sdk.Filter getGroupFilter() throws com.unboundid.ldap.sdk.LDAPException- Throws:
com.unboundid.ldap.sdk.LDAPException
-
getUserFilter
public static com.unboundid.ldap.sdk.Filter getUserFilter(String userIdAttrName, String userName) throws com.unboundid.ldap.sdk.LDAPException - Throws:
com.unboundid.ldap.sdk.LDAPException
-
getUserFilter
public static com.unboundid.ldap.sdk.Filter getUserFilter(List<String> userIdAttrName, String userName) throws com.unboundid.ldap.sdk.LDAPException - Parameters:
userIdAttrName
- list of user id attributes to create a user filteruserName
- name of the user for the filter- Returns:
- filter for the given user name and user id attributes. The user id attributes are OR-linked.
- Throws:
com.unboundid.ldap.sdk.LDAPException
- If the created filter string cannot be decoded as a valid LDAP search filter.
-
getUserLoginFilter
public static com.unboundid.ldap.sdk.Filter getUserLoginFilter(org.pac4j.core.profile.UserProfile profile, String userIdAttribute) throws com.unboundid.ldap.sdk.LDAPException - Parameters:
profile
- user profile for the filteruserIdAttribute
- attribute to filter for- Returns:
- AND filter with the given userIdAttribute
- Throws:
com.unboundid.ldap.sdk.LDAPException
- If the created filter string cannot be decoded as a valid LDAP search filter.
-
getUserLoginFilter
public static com.unboundid.ldap.sdk.Filter getUserLoginFilter(org.pac4j.core.profile.UserProfile profile, String... userIdAttributes) throws com.unboundid.ldap.sdk.LDAPException - Parameters:
profile
- user profile for the filteruserIdAttributes
- attributes for the OR filter- Returns:
- filter for all users with the given userIdAttribute
- Throws:
com.unboundid.ldap.sdk.LDAPException
- If the created filter string cannot be decoded as a valid LDAP search filter.
-
getUserLoginFilter
public static com.unboundid.ldap.sdk.Filter getUserLoginFilter(String loginname) throws com.unboundid.ldap.sdk.LDAPException - Throws:
com.unboundid.ldap.sdk.LDAPException
-
getKerberosLoginFilter
public static com.unboundid.ldap.sdk.Filter getKerberosLoginFilter(String kerberosLogin, String filter) throws com.unboundid.ldap.sdk.LDAPException - Throws:
com.unboundid.ldap.sdk.LDAPException
-
getActiveUserFilter
public static com.unboundid.ldap.sdk.Filter getActiveUserFilter(String loginname) throws com.unboundid.ldap.sdk.LDAPException - Throws:
com.unboundid.ldap.sdk.LDAPException
-
create
public static com.unboundid.ldap.sdk.Filter create(String filter) throws com.unboundid.ldap.sdk.LDAPException - Throws:
com.unboundid.ldap.sdk.LDAPException
-
clearFilter
-