Package net.shibboleth.idp.attribute.resolver.dc.saml.impl

# Class SAMLDataConnector

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<ExecutableQuery,ResponseMappingStrategy>
net.shibboleth.idp.attribute.resolver.dc.saml.impl.SAMLDataConnector

All Implemented Interfaces:
  `DataConnector`, `ResolverPlugin<Map<String,IdPAttribute>>`, `Component`, `DestructableComponent`, `IdentifiableComponent`, `IdentifiedComponent`, `InitializableComponent`, `UnmodifiableComponent`, `DisposableBean`

public class SAMLDataConnector extends AbstractSearchDataConnector<ExecutableQuery,ResponseMappingStrategy>
A `DataConnector` implementation which queries a SAML attribute authority for attribute data.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`private final class`
`SAMLDataConnector.NullValidator`
Because we are a SearchDataConnector we need to have a validator, so this plugs the gap.

## Field Summary

Fields
Modifier and Type
Field
Description
`private AssertionValidationProcessor`
`assertionValidationProcessor`
Assertion validation processor.
`private DecryptionProcessor`
`decryptionProcessor`
Decryption processor.
`private final org.slf4j.Logger`
`log`
Logger.
`private SOAPClient`
`soapClient`
SOAP client.
`private boolean`
`subjectMatch`
Flag indicating whether to perform matching of Assertion subjects against the value in the query.
`private SubjectMatchProcessor`
`subjectMatchProcessor`
Assertion validation processor.

## Constructor Summary

Constructors
Constructor
Description
`SAMLDataConnector()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doInitialize()`
`AssertionValidationProcessor`
`getAssertionValidationProcessor()`
Get the Assertion validation processor.
`DecryptionProcessor`
`getDecryptionProcessor()`
Get the decryption processor.
`SOAPClient`
`getSOAPClient()`
Get the SOAP client instance.
`SubjectMatchProcessor`
`getSubjectMatchProcessor()`
Get the Subject match processor.
`boolean`
`isSubjectMatch()`
Get the flag indicating whether to perform matching of Assertion subjects against the value in the query.
`protected void`
`processResponse(ResponseData responseData)`
Process the SAML response message.
`protected Map<String,IdPAttribute>`
`retrieveAttributes(ExecutableQuery executable)`
Attempts to retrieve attributes from the data source.
`void`
`setAssertionValidationProcessor(AssertionValidationProcessor processor)`
Set the Assertion validation processor.
`void`
`setDecryptionProcessor(DecryptionProcessor processor)`
Set the decryption processor.
`void`
`setSOAPClient(SOAPClient client)`
Set the SOAP client instance.
`void`
`setSubjectMatch(boolean flag)`
Set the flag indicating whether to perform matching of Assertion subjects against the value in the query.
`void`
`setSubjectMatchProcessor(SubjectMatchProcessor processor)`
Set the Subject match processor.

### Methods inherited from class net.shibboleth.idp.attribute.resolver.dc.impl.AbstractSearchDataConnector

`doDataConnectorResolve, getExecutableSearchBuilder, getMappingStrategy, getResultsCache, getValidator, isFailFastInitialize, retrieveAttributes, setExecutableSearchBuilder, setFailFastInitialize, setMappingStrategy, setResultsCache, setValidator`

### Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractDataConnector

`doResolve, getExportAttributes, getFailoverDataConnectorId, getLastFail, getLastSuccess, getLogPrefix, getNoRetryDelay, setExportAttributes, setFailoverDataConnectorId, setLastFail, setLastSuccess, setNoRetryDelay`

### Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin

`doDestroy, equals, getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, hashCode, isPropagateResolutionExceptions, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependencies, setPropagateResolutionExceptions`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

`setId`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

`ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, initialize, isDestroyed, isInitialized`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface net.shibboleth.shared.component.DestructableComponent

`destroy, isDestroyed`

### Methods inherited from interface org.springframework.beans.factory.DisposableBean

`destroy`

### Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

`getId`

### Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

`initialize, isInitialized`

### Methods inherited from interface net.shibboleth.idp.attribute.resolver.ResolverPlugin

`getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, isPropagateResolutionExceptions, resolve`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Logger.

### soapClient

@NonnullAfterInit private SOAPClient soapClient
SOAP client.

### decryptionProcessor

@NonnullAfterInit private DecryptionProcessor decryptionProcessor
Decryption processor.

### assertionValidationProcessor

@NonnullAfterInit private AssertionValidationProcessor assertionValidationProcessor
Assertion validation processor.

### subjectMatchProcessor

@NonnullAfterInit private SubjectMatchProcessor subjectMatchProcessor
Assertion validation processor.

### subjectMatch

private boolean subjectMatch
Flag indicating whether to perform matching of Assertion subjects against the value in the query.

## Constructor Details

### SAMLDataConnector

public SAMLDataConnector()
Constructor.

## Method Details

### getSOAPClient

@NonnullAfterInit public SOAPClient getSOAPClient()
Get the SOAP client instance.

Returns:
  the SOAP client

### setSOAPClient

public void setSOAPClient(@Nullable SOAPClient client)
Set the SOAP client instance.

Parameters:
  `client` - the SOAP client

### getDecryptionProcessor

@NonnullAfterInit public DecryptionProcessor getDecryptionProcessor()
Get the decryption processor.

Returns:
  the decryption processor

### setDecryptionProcessor

public void setDecryptionProcessor(@Nullable DecryptionProcessor processor)
Set the decryption processor.

Parameters:
  `processor` - the Decryption processor

### getAssertionValidationProcessor

@NonnullAfterInit public AssertionValidationProcessor getAssertionValidationProcessor()
Get the Assertion validation processor.

Returns:
  the Assertion validation processor

### setAssertionValidationProcessor

public void setAssertionValidationProcessor(@Nullable AssertionValidationProcessor processor)
Set the Assertion validation processor.

Parameters:
  `processor` - the Assertion validation processor

### getSubjectMatchProcessor

@NonnullAfterInit public SubjectMatchProcessor getSubjectMatchProcessor()
Get the Subject match processor.

Returns:
  the Subject match processor

### setSubjectMatchProcessor

public void setSubjectMatchProcessor(@Nullable SubjectMatchProcessor processor)
Set the Subject match processor.

Parameters:
  `processor` - the Subject match processor

### isSubjectMatch

public boolean isSubjectMatch()
Get the flag indicating whether to perform matching of Assertion subjects against the value in the query.

Default is `false`.

Returns:
  returns the flag value

### setSubjectMatch

public void setSubjectMatch(boolean flag)
Set the flag indicating whether to perform matching of Assertion subjects against the value in the query.

Default is `false`.

Parameters:
  `flag` - the flag value

### doInitialize

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `AbstractSearchDataConnector<ExecutableQuery,ResponseMappingStrategy>`
Throws:
  `ComponentInitializationException`

### retrieveAttributes

@Nullable protected Map<String,IdPAttribute> retrieveAttributes(@Nonnull ExecutableQuery executable) throws ResolutionException
Attempts to retrieve attributes from the data source.

Specified by:
  `retrieveAttributes` in class `AbstractSearchDataConnector<ExecutableQuery,ResponseMappingStrategy>`
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

### processResponse

protected void processResponse(@Nonnull ResponseData responseData) throws ResolutionException
Process the SAML response message.

Parameters:
  `responseData` - the response data
Throws:
  `ResolutionException` - if there is a fatal error during processing