Package org.ldaptive.auth
Class AggregateAuthenticationResponseHandler
- java.lang.Object
-
- org.ldaptive.auth.AggregateAuthenticationResponseHandler
-
- All Implemented Interfaces:
AuthenticationResponseHandler
public class AggregateAuthenticationResponseHandler extends java.lang.Object implements AuthenticationResponseHandler
Used in conjunction with anAggregateDnResolverto execute a list of response handlers. In particular, the resolved DN is expected to be of the form: label:DN where the label indicates the response handler to use. This class only invokes the response handlers that matches the label found on the DN.- Author:
- Middleware Services
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAggregateAuthenticationResponseHandler.Builder
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.LoggerloggerLogger for this class.
-
Constructor Summary
Constructors Constructor Description AggregateAuthenticationResponseHandler()Default constructor.AggregateAuthenticationResponseHandler(java.util.Map<java.lang.String,AuthenticationResponseHandler[]> handlers)Creates a new aggregate authentication response handler.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAuthenticationResponseHandlers(java.lang.String label, AuthenticationResponseHandler... handlers)Adds an authentication response handler with the supplied label.static AggregateAuthenticationResponseHandler.Builderbuilder()Creates a builder for this class.java.util.Map<java.lang.String,AuthenticationResponseHandler[]>getAuthenticationResponseHandlers()Returns the response handlers to aggregate over.voidhandle(AuthenticationResponse response)Handle the response from an ldap authentication.voidsetAuthenticationResponseHandlers(java.util.Map<java.lang.String,AuthenticationResponseHandler[]> handlers)Sets the response handlers to aggregate over.
-
-
-
Constructor Detail
-
AggregateAuthenticationResponseHandler
public AggregateAuthenticationResponseHandler()
Default constructor.
-
AggregateAuthenticationResponseHandler
public AggregateAuthenticationResponseHandler(java.util.Map<java.lang.String,AuthenticationResponseHandler[]> handlers)
Creates a new aggregate authentication response handler.- Parameters:
handlers- authentication response handlers
-
-
Method Detail
-
getAuthenticationResponseHandlers
public java.util.Map<java.lang.String,AuthenticationResponseHandler[]> getAuthenticationResponseHandlers()
Returns the response handlers to aggregate over.- Returns:
- map of label to response handlers
-
setAuthenticationResponseHandlers
public void setAuthenticationResponseHandlers(java.util.Map<java.lang.String,AuthenticationResponseHandler[]> handlers)
Sets the response handlers to aggregate over.- Parameters:
handlers- to set
-
addAuthenticationResponseHandlers
public void addAuthenticationResponseHandlers(java.lang.String label, AuthenticationResponseHandler... handlers)Adds an authentication response handler with the supplied label.- Parameters:
label- of the resolverhandlers- authentication response handler
-
handle
public void handle(AuthenticationResponse response) throws LdapException
Description copied from interface:AuthenticationResponseHandlerHandle the response from an ldap authentication.- Specified by:
handlein interfaceAuthenticationResponseHandler- Parameters:
response- produced from an authentication- Throws:
LdapException- if an error occurs handling an authentication response
-
builder
public static AggregateAuthenticationResponseHandler.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-