Class LDAPDataConnector
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin<Map<String,IdPAttribute>>
net.shibboleth.idp.attribute.resolver.AbstractDataConnector
net.shibboleth.idp.attribute.resolver.dc.impl.AbstractSearchDataConnector<ExecutableSearchFilter,SearchResultMappingStrategy>
net.shibboleth.idp.attribute.resolver.dc.ldap.impl.LDAPDataConnector
- All Implemented Interfaces:
DataConnector,ResolverPlugin<Map<String,,IdPAttribute>> Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,UnmodifiableComponent,DisposableBean
public class LDAPDataConnector
extends AbstractSearchDataConnector<ExecutableSearchFilter,SearchResultMappingStrategy>
A
DataConnector that queries an LDAP in order to retrieve attribute
data.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConnectionFactoryFactory for retrieving LDAP connections.private booleanWhether the default mapping strategy is being used.private booleanWhether the default validator is being used.private final org.slf4j.LoggerClass logger.private SearchOperationFor executing LDAP searches. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGets the connection factory for retrievingConnections.Gets the search operation for executing searches.private voidPolice TLS for JVM trust.protected Map<String,IdPAttribute> Attempts to retrieve attributes from the LDAP.voidsetConnectionFactory(ConnectionFactory factory) Sets the connection factory for retrievingConnections.voidSets the strategy for mapping from search results to a collection ofIdPAttributes.voidsetSearchOperation(SearchOperation operation) Sets the search executor for executing searches.voidsetValidator(Validator validator) Sets the validator used to validate this connector.Methods inherited from class net.shibboleth.idp.attribute.resolver.dc.impl.AbstractSearchDataConnector
doDataConnectorResolve, getExecutableSearchBuilder, getMappingStrategy, getResultsCache, getValidator, isFailFastInitialize, setExecutableSearchBuilder, setFailFastInitialize, setResultsCacheMethods inherited from class net.shibboleth.idp.attribute.resolver.AbstractDataConnector
doResolve, getExportAttributes, getFailoverDataConnectorId, getLastFail, getLastSuccess, getLogPrefix, getNoRetryDelay, setExportAttributes, setFailoverDataConnectorId, setLastFail, setLastSuccess, setNoRetryDelayMethods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin
doDestroy, equals, getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, hashCode, isPropagateResolutionExceptions, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependencies, setPropagateResolutionExceptionsMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface org.springframework.beans.factory.DisposableBean
destroyMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitializedMethods inherited from interface net.shibboleth.idp.attribute.resolver.ResolverPlugin
getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, isPropagateResolutionExceptions, resolve
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
connectionFactory
Factory for retrieving LDAP connections. -
searchOperation
For executing LDAP searches. -
defaultValidator
private boolean defaultValidatorWhether the default validator is being used. -
defaultMappingStrategy
private boolean defaultMappingStrategyWhether the default mapping strategy is being used.
-
-
Constructor Details
-
LDAPDataConnector
public LDAPDataConnector()
-
-
Method Details
-
getConnectionFactory
Gets the connection factory for retrievingConnections.- Returns:
- connection factory for retrieving
Connections
-
setConnectionFactory
Sets the connection factory for retrievingConnections.- Parameters:
factory- connection factory for retrievingConnections
-
getSearchOperation
Gets the search operation for executing searches.- Returns:
- search operation for executing searches
-
setSearchOperation
Sets the search executor for executing searches.- Parameters:
operation- for executing searches
-
setValidator
Sets the validator used to validate this connector.- Overrides:
setValidatorin classAbstractSearchDataConnector<ExecutableSearchFilter,SearchResultMappingStrategy> - Parameters:
validator- used to validate this connector
-
setMappingStrategy
Sets the strategy for mapping from search results to a collection ofIdPAttributes.- Overrides:
setMappingStrategyin classAbstractSearchDataConnector<ExecutableSearchFilter,SearchResultMappingStrategy> - Parameters:
strategy- strategy for mapping from search results to a collection ofIdPAttributes
-
doInitialize
- Overrides:
doInitializein classAbstractSearchDataConnector<ExecutableSearchFilter,SearchResultMappingStrategy> - Throws:
ComponentInitializationException
-
policeForJVMTrust
Police TLS for JVM trust.- Throws:
ComponentInitializationException- if we detect an SSL issue
-
retrieveAttributes
@Nullable @Unmodifiable @NotLive protected Map<String,IdPAttribute> retrieveAttributes(@Nullable ExecutableSearchFilter filter) throws ResolutionException Attempts to retrieve attributes from the LDAP.- Specified by:
retrieveAttributesin classAbstractSearchDataConnector<ExecutableSearchFilter,SearchResultMappingStrategy> - Parameters:
filter- search filter used to retrieve data from the LDAP- Returns:
- search result from the LDAP
- Throws:
ResolutionException- thrown if there is a problem retrieving data from the LDAP
-