Class HTTPDataConnector
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<HTTPSearch,HTTPResponseMappingStrategy>
net.shibboleth.idp.attribute.resolver.dc.http.impl.HTTPDataConnector
- All Implemented Interfaces:
DataConnector,ResolverPlugin<Map<String,,IdPAttribute>> Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,UnmodifiableComponent,DisposableBean
public class HTTPDataConnector
extends AbstractSearchDataConnector<HTTPSearch,HTTPResponseMappingStrategy>
This class implements a
DataConnector
that obtains data from an HTTP service.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hc.client5.http.classic.HttpClientTheHttpClientto use.private HttpClientSecurityParametersHTTP client security parameters. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected Map<String,IdPAttribute> retrieveAttributes(HTTPSearch executable) Attempts to retrieve attributes from the data source.voidsetHttpClient(org.apache.hc.client5.http.classic.HttpClient client) Set theHttpClientto use.voidSet the optional client security parameters.Methods inherited from class net.shibboleth.idp.attribute.resolver.dc.impl.AbstractSearchDataConnector
doDataConnectorResolve, getExecutableSearchBuilder, getMappingStrategy, getResultsCache, getValidator, isFailFastInitialize, setExecutableSearchBuilder, setFailFastInitialize, setMappingStrategy, setResultsCache, setValidatorMethods 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
-
httpClient
TheHttpClientto use. -
httpClientSecurityParameters
HTTP client security parameters.
-
-
Constructor Details
-
HTTPDataConnector
public HTTPDataConnector()Constructor.
-
-
Method Details
-
setHttpClient
public void setHttpClient(@Nonnull org.apache.hc.client5.http.classic.HttpClient client) Set theHttpClientto use.- Parameters:
client- client to use
-
setHttpClientSecurityParameters
Set the optional client security parameters.- Parameters:
params- the new client security parameters
-
doInitialize
- Overrides:
doInitializein classAbstractSearchDataConnector<HTTPSearch,HTTPResponseMappingStrategy> - Throws:
ComponentInitializationException
-
retrieveAttributes
@Nullable @Unmodifiable @NotLive protected Map<String,IdPAttribute> retrieveAttributes(@Nonnull HTTPSearch executable) throws ResolutionException Attempts to retrieve attributes from the data source.- Specified by:
retrieveAttributesin classAbstractSearchDataConnector<HTTPSearch,HTTPResponseMappingStrategy> - Parameters:
executable- used to retrieve data from the data source- Returns:
- attributes
- Throws:
ResolutionException- thrown if there is a problem retrieving data from the data source
-