Package org.ldaptive.auth
Class AggregateAuthenticationResponseHandler
java.lang.Object
org.ldaptive.auth.AggregateAuthenticationResponseHandler
- All Implemented Interfaces:
AuthenticationResponseHandler
public class AggregateAuthenticationResponseHandler
extends Object
implements AuthenticationResponseHandler
Used in conjunction with an
AggregateDnResolver to 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.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.slf4j.LoggerLogger for this class.private Map<String,AuthenticationResponseHandler[]> Labeled entry resolvers. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.Creates a new aggregate authentication response handler. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAuthenticationResponseHandlers(String label, AuthenticationResponseHandler... handlers) Adds an authentication response handler with the supplied label.builder()Creates a builder for this class.Returns the response handlers to aggregate over.voidhandle(AuthenticationResponse response) Handle the response from an ldap authentication.voidSets the response handlers to aggregate over.
-
Field Details
-
logger
protected final org.slf4j.Logger loggerLogger for this class. -
responseHandlers
Labeled entry resolvers.
-
-
Constructor Details
-
AggregateAuthenticationResponseHandler
public AggregateAuthenticationResponseHandler()Default constructor. -
AggregateAuthenticationResponseHandler
Creates a new aggregate authentication response handler.- Parameters:
handlers- authentication response handlers
-
-
Method Details
-
getAuthenticationResponseHandlers
Returns the response handlers to aggregate over.- Returns:
- map of label to response handlers
-
setAuthenticationResponseHandlers
Sets the response handlers to aggregate over.- Parameters:
handlers- to set
-
addAuthenticationResponseHandlers
public void addAuthenticationResponseHandlers(String label, AuthenticationResponseHandler... handlers) Adds an authentication response handler with the supplied label.- Parameters:
label- of the resolverhandlers- authentication response handler
-
handle
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
Creates a builder for this class.- Returns:
- new builder
-