Class CompareAuthorizationHandler

  • All Implemented Interfaces:
    AuthorizationHandler

    public class CompareAuthorizationHandler
    extends java.lang.Object
    implements AuthorizationHandler
    CompareAuthorizationHandler performs a compare operation with a custom filter. The DN of the authenticated user is automatically provided as the {0} variable in the search filter arguments.
    Version:
    $Revision: 1330 $
    Author:
    Middleware Services
    • Field Detail

      • logger

        protected final org.apache.commons.logging.Log logger
        Log for this class.
    • Constructor Detail

      • CompareAuthorizationHandler

        public CompareAuthorizationHandler()
        Default constructor.
      • CompareAuthorizationHandler

        public CompareAuthorizationHandler​(SearchFilter sf)
        Creates a new CompareAuthorizationHandler with the supplied search filter.
        Parameters:
        sf - SearchFilter
    • Method Detail

      • getSearchFilter

        public SearchFilter getSearchFilter()
        Returns the search filter.
        Returns:
        SearchFilter
      • setSearchFilter

        public void setSearchFilter​(SearchFilter sf)
        Sets the search filter.
        Parameters:
        sf - SearchFilter
      • process

        public void process​(AuthenticationCriteria ac,
                            javax.naming.ldap.LdapContext ctx)
                     throws javax.naming.NamingException
        Process an authorization after an ldap authentication. The supplied LdapContext should not be closed in this method. Implementations should throw AuthorizationException to indicate an authorization failure.
        Specified by:
        process in interface AuthorizationHandler
        Parameters:
        ac - AuthenticationCriteria used to perform the authentication
        ctx - LdapContext authenticated context used to perform the bind
        Throws:
        javax.naming.NamingException - if an LDAP error occurs
      • toString

        public java.lang.String toString()
        Provides a descriptive string representation of this authorization handler.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String of the form $Classname::$filter.