Package org.ldaptive.auth
Class AggregateEntryResolver
java.lang.Object
org.ldaptive.AbstractFreezable
org.ldaptive.auth.AggregateEntryResolver
- All Implemented Interfaces:
EntryResolver,Freezable
Used in conjunction with an
AggregateDnResolver to resolve an entry. In particular, the resolved DN is
expected to be of the form: label:DN where the label indicates the entry resolver to use. This class only invokes
one entry resolver that matches the label found on the DN.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<String,EntryResolver> Labeled entry resolvers.private final LoggerLogger for this class. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.AggregateEntryResolver(Map<String, EntryResolver> resolvers) Creates a new aggregate entry resolver. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntryResolver(String label, EntryResolver resolver) Adds an entry resolver with the supplied label.builder()Creates a builder for this class.voidfreeze()Freezes this object, making it immutable.Returns the entry resolvers to aggregate over.resolve(AuthenticationCriteria criteria, AuthenticationHandlerResponse response) Attempts to find the LDAP entry for the supplied authentication criteria and authentication handler response.voidsetEntryResolvers(Map<String, EntryResolver> resolvers) Sets the entry resolvers to aggregate over.Methods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, isFrozen
-
Field Details
-
logger
Logger for this class. -
entryResolvers
Labeled entry resolvers.
-
-
Constructor Details
-
AggregateEntryResolver
public AggregateEntryResolver()Default constructor. -
AggregateEntryResolver
Creates a new aggregate entry resolver.- Parameters:
resolvers- entry resolvers
-
-
Method Details
-
freeze
public void freeze()Description copied from interface:FreezableFreezes this object, making it immutable.- Specified by:
freezein interfaceFreezable- Overrides:
freezein classAbstractFreezable
-
getEntryResolvers
Returns the entry resolvers to aggregate over.- Returns:
- map of label to entry resolver
-
setEntryResolvers
Sets the entry resolvers to aggregate over.- Parameters:
resolvers- to set
-
addEntryResolver
Adds an entry resolver with the supplied label.- Parameters:
label- of the resolverresolver- entry resolver
-
resolve
public LdapEntry resolve(AuthenticationCriteria criteria, AuthenticationHandlerResponse response) throws LdapException Description copied from interface:EntryResolverAttempts to find the LDAP entry for the supplied authentication criteria and authentication handler response. The connection available in the response should not be closed in this method.- Specified by:
resolvein interfaceEntryResolver- Parameters:
criteria- authentication criteria used to perform the authenticationresponse- produced by the authentication handler- Returns:
- ldap entry
- Throws:
LdapException- if an LDAP error occurs
-
builder
Creates a builder for this class.- Returns:
- new builder
-