Class CompareAuthorizationHandler
- java.lang.Object
-
- edu.vt.middleware.ldap.auth.handler.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 Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.LogloggerLog for this class.
-
Constructor Summary
Constructors Constructor Description CompareAuthorizationHandler()Default constructor.CompareAuthorizationHandler(SearchFilter sf)Creates a newCompareAuthorizationHandlerwith the supplied search filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchFiltergetSearchFilter()Returns the search filter.voidprocess(AuthenticationCriteria ac, javax.naming.ldap.LdapContext ctx)Process an authorization after an ldap authentication.voidsetSearchFilter(SearchFilter sf)Sets the search filter.java.lang.StringtoString()Provides a descriptive string representation of this authorization handler.
-
-
-
Constructor Detail
-
CompareAuthorizationHandler
public CompareAuthorizationHandler()
Default constructor.
-
CompareAuthorizationHandler
public CompareAuthorizationHandler(SearchFilter sf)
Creates a newCompareAuthorizationHandlerwith 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 throwAuthorizationExceptionto indicate an authorization failure.- Specified by:
processin interfaceAuthorizationHandler- Parameters:
ac-AuthenticationCriteriaused to perform the authenticationctx-LdapContextauthenticated 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:
toStringin classjava.lang.Object- Returns:
- String of the form $Classname::$filter.
-
-