Package org.ldaptive.auth
Class AggregateEntryResolver
- java.lang.Object
-
- org.ldaptive.auth.AggregateEntryResolver
-
- All Implemented Interfaces:
EntryResolver
public class AggregateEntryResolver extends java.lang.Object implements EntryResolver
Used in conjunction with anAggregateDnResolverto 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.- Author:
- Middleware Services
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAggregateEntryResolver.Builder
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.LoggerloggerLogger for this class.
-
Constructor Summary
Constructors Constructor Description AggregateEntryResolver()Default constructor.AggregateEntryResolver(java.util.Map<java.lang.String,EntryResolver> resolvers)Creates a new aggregate entry resolver.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEntryResolver(java.lang.String label, EntryResolver resolver)Adds an entry resolver with the supplied label.static AggregateEntryResolver.Builderbuilder()Creates a builder for this class.java.util.Map<java.lang.String,EntryResolver>getEntryResolvers()Returns the entry resolvers to aggregate over.LdapEntryresolve(AuthenticationCriteria criteria, AuthenticationHandlerResponse response)Attempts to find the LDAP entry for the supplied authentication criteria and authentication handler response.voidsetEntryResolvers(java.util.Map<java.lang.String,EntryResolver> resolvers)Sets the entry resolvers to aggregate over.
-
-
-
Constructor Detail
-
AggregateEntryResolver
public AggregateEntryResolver()
Default constructor.
-
AggregateEntryResolver
public AggregateEntryResolver(java.util.Map<java.lang.String,EntryResolver> resolvers)
Creates a new aggregate entry resolver.- Parameters:
resolvers- entry resolvers
-
-
Method Detail
-
getEntryResolvers
public java.util.Map<java.lang.String,EntryResolver> getEntryResolvers()
Returns the entry resolvers to aggregate over.- Returns:
- map of label to entry resolver
-
setEntryResolvers
public void setEntryResolvers(java.util.Map<java.lang.String,EntryResolver> resolvers)
Sets the entry resolvers to aggregate over.- Parameters:
resolvers- to set
-
addEntryResolver
public void addEntryResolver(java.lang.String label, EntryResolver resolver)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
public static AggregateEntryResolver.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-