Package de.xima.fc.ldap
Class LDAPFilters
- java.lang.Object
-
- de.xima.fc.ldap.LDAPFilters
-
public class LDAPFilters extends Object
-
-
Constructor Summary
Constructors Constructor Description LDAPFilters()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
clearFilter(String orgFilter)
static com.unboundid.ldap.sdk.Filter
create(String filter)
static com.unboundid.ldap.sdk.Filter
getActiveUserFilter(String loginname)
static com.unboundid.ldap.sdk.Filter
getGroupFilter()
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
getUserFilter()
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)
-
-
-
Method Detail
-
getObjectIDFilter
public static com.unboundid.ldap.sdk.Filter getObjectIDFilter(byte[] objectID)
-
getObjectIDFilter
public static com.unboundid.ldap.sdk.Filter getObjectIDFilter(String objectID)
-
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
-
-