Package org.ldaptive.auth
Class AggregateAuthenticationHandler
- java.lang.Object
-
- org.ldaptive.auth.AggregateAuthenticationHandler
-
- All Implemented Interfaces:
AuthenticationHandler
public class AggregateAuthenticationHandler extends java.lang.Object implements AuthenticationHandler
Used in conjunction with anAggregateDnResolverto authenticate the resolved DN. In particular, the resolved DN is expected to be of the form: label:DN where the label indicates the authentication handler to use. This class only invokes one authentication handler that matches the label found on the DN.- Author:
- Middleware Services
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAggregateAuthenticationHandler.Builder
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.LoggerloggerLogger for this class.
-
Constructor Summary
Constructors Constructor Description AggregateAuthenticationHandler()Default constructor.AggregateAuthenticationHandler(java.util.Map<java.lang.String,AuthenticationHandler> handlers)Creates a new aggregate authentication handler.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAuthenticationHandler(java.lang.String label, AuthenticationHandler handler)Adds an authentication handler with the supplied label.AuthenticationHandlerResponseauthenticate(AuthenticationCriteria criteria)Perform an ldap authentication.static AggregateAuthenticationHandler.Builderbuilder()Creates a builder for this class.java.util.Map<java.lang.String,AuthenticationHandler>getAuthenticationHandlers()Returns the authentication handlers to aggregate over.voidsetAuthenticationHandlers(java.util.Map<java.lang.String,AuthenticationHandler> handlers)Sets the authentication handlers to aggregate over.
-
-
-
Constructor Detail
-
AggregateAuthenticationHandler
public AggregateAuthenticationHandler()
Default constructor.
-
AggregateAuthenticationHandler
public AggregateAuthenticationHandler(java.util.Map<java.lang.String,AuthenticationHandler> handlers)
Creates a new aggregate authentication handler.- Parameters:
handlers- authentication handlers
-
-
Method Detail
-
getAuthenticationHandlers
public java.util.Map<java.lang.String,AuthenticationHandler> getAuthenticationHandlers()
Returns the authentication handlers to aggregate over.- Returns:
- map of label to authentication handler
-
setAuthenticationHandlers
public void setAuthenticationHandlers(java.util.Map<java.lang.String,AuthenticationHandler> handlers)
Sets the authentication handlers to aggregate over.- Parameters:
handlers- to set
-
addAuthenticationHandler
public void addAuthenticationHandler(java.lang.String label, AuthenticationHandler handler)Adds an authentication handler with the supplied label.- Parameters:
label- of the resolverhandler- authentication handler
-
authenticate
public AuthenticationHandlerResponse authenticate(AuthenticationCriteria criteria) throws LdapException
Description copied from interface:AuthenticationHandlerPerform an ldap authentication.- Specified by:
authenticatein interfaceAuthenticationHandler- Parameters:
criteria- to perform the authentication with- Returns:
- authentication handler response
- Throws:
LdapException- if ldap operation fails
-
builder
public static AggregateAuthenticationHandler.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-