Class LDAPFilters

java.lang.Object
de.xima.fc.ldap.LDAPFilters

public class LDAPFilters extends Object
  • Constructor Details

    • LDAPFilters

      public LDAPFilters()
  • Method Details

    • 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 filter
      userName - 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 filter
      userIdAttribute - 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 filter
      userIdAttributes - 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

      public static String clearFilter(String orgFilter)