public class HTTPArtifactDecoder extends org.opensaml.messaging.decoder.servlet.BaseHttpServletRequestXMLMessageDecoder<SAMLObject> implements SAMLMessageDecoder
| Modifier and Type | Field and Description |
|---|---|
private SAML2ArtifactBuilderFactory |
artifactBuilderFactory
SAML 2 artifact builder factory.
|
private EndpointResolver<ArtifactResolutionService> |
artifactEndpointResolver
Resolver for ArtifactResolutionService endpoints.
|
private BindingDescriptor |
bindingDescriptor
Optional
BindingDescriptor to inject into SAMLBindingContext created. |
private IdentifierGenerationStrategy |
idStrategy
Identifier generation strategy.
|
private org.slf4j.Logger |
log
Class logger.
|
private QName |
peerEntityRole
The peer entity role QName.
|
private RoleDescriptorResolver |
roleDescriptorResolver
Role descriptor resolver.
|
private Resolver<String,CriteriaSet> |
selfEntityIDResolver
Resolver for the self entityID, based on the peer entity data.
|
private org.opensaml.soap.client.SOAPClient |
soapClient
SOAP client.
|
private String |
soapClientSecurityConfigurationProfileId
SOAP client security configuration profile ID.
|
private String |
soapPipelineName
The SOAP client message pipeline name.
|
| Constructor and Description |
|---|
HTTPArtifactDecoder() |
| Modifier and Type | Method and Description |
|---|---|
private ArtifactResolve |
buildArtifactResolveRequestMessage(SAML2Artifact artifact,
String endpoint,
RoleDescriptor peerRoleDescriptor,
String selfEntityID)
Build the SAML protocol message for artifact resolution.
|
private Issuer |
buildIssuer(String selfEntityID)
Build the SAML protocol message Issuer element.
|
private SAMLObject |
dereferenceArtifact(SAML2Artifact artifact,
RoleDescriptor peerRoleDescriptor,
ArtifactResolutionService ars)
De-reference the supplied artifact into the corresponding SAML protocol message.
|
protected void |
doDecode() |
protected void |
doDestroy() |
protected void |
doInitialize() |
SAML2ArtifactBuilderFactory |
getArtifactBuilderFactory()
Get the SAML 2 artifact builder factory.
|
EndpointResolver<ArtifactResolutionService> |
getArtifactEndpointResolver()
Get the artifact endpoint resolver.
|
BindingDescriptor |
getBindingDescriptor()
Get an optional
BindingDescriptor to inject into SAMLBindingContext created. |
String |
getBindingURI() |
IdentifierGenerationStrategy |
getIdentifierGenerationStrategy()
Get the identifier generation strategy.
|
QName |
getPeerEntityRole()
Get the peer entity role
QName. |
RoleDescriptorResolver |
getRoleDescriptorResolver()
Get the role descriptor resolver.
|
Resolver<String,CriteriaSet> |
getSelfEntityIDResolver()
Get the resolver for the self entityID.
|
org.opensaml.soap.client.SOAPClient |
getSOAPClient()
Get the SOAP client instance.
|
String |
getSOAPClientSecurityConfigurationProfileId()
Get the SOAP client security configuration profile ID to use.
|
String |
getSOAPPipelineName()
Get the name of the specific SOAP client message pipeline to use,
for example with
PipelineFactoryHttpSOAPClient. |
private SAML2Artifact |
parseArtifact(String encodedArtifact)
Parse and decode the supplied encoded artifact string into a
SAML2Artifact instance. |
protected void |
populateBindingContext(org.opensaml.messaging.context.MessageContext<SAMLObject> messageContext)
Populate the context which carries information specific to this binding.
|
private void |
processArtifact(org.opensaml.messaging.context.MessageContext messageContext,
javax.servlet.http.HttpServletRequest request)
Process the incoming artifact by decoding the artifacts, dereferencing it from the artifact issuer and
storing the resulting protocol message in the message context.
|
private ArtifactResolutionService |
resolveArtifactEndpoint(SAML2Artifact artifact,
RoleDescriptor peerRoleDescriptor)
Resolve the artifact resolution endpoint of the peer who issued the artifact.
|
private RoleDescriptor |
resolvePeerRoleDescriptor(SAML2Artifact artifact)
Resolve the role descriptor of the SAML peer who issued the supplied artifact.
|
private String |
resolveSelfEntityID(RoleDescriptor peerRoleDescriptor)
Resolve the self entityID, used as the issuer of the protocol message by this entity.
|
void |
setArtifactBuilderFactory(SAML2ArtifactBuilderFactory factory)
Set the SAML 2 artifact builder factory.
|
void |
setArtifactEndpointResolver(EndpointResolver<ArtifactResolutionService> resolver)
Set the artifact endpoint resolver.
|
void |
setBindingDescriptor(BindingDescriptor descriptor)
Set an optional
BindingDescriptor to inject into SAMLBindingContext created. |
void |
setIdentifierGenerationStrategy(IdentifierGenerationStrategy strategy)
Set the identifier generation strategy.
|
void |
setPeerEntityRole(QName role)
Set the peer entity role
QName. |
void |
setRoleDescriptorResolver(RoleDescriptorResolver resolver)
Set the role descriptor resolver.
|
void |
setSelfEntityIDResolver(Resolver<String,CriteriaSet> resolver)
Set the resolver for the self entityID.
|
void |
setSOAPClient(org.opensaml.soap.client.SOAPClient client)
Set the SOAP client instance.
|
void |
setSOAPClientSecurityConfigurationProfileId(String profileId)
Set the SOAP client security configuration profile ID to use.
|
void |
setSOAPPipelineName(String name)
Set the name of the specific SOAP client message pipeline to use,
for example with
PipelineFactoryHttpSOAPClient. |
private SAMLObject |
validateAndExtractResponseMessage(ArtifactResponse artifactResponse)
Validate and extract the SAML protocol message from the artifact response.
|
decode, getMessageToLog, getParserPool, logDecodedMessage, setParserPool, unmarshallMessage, validateHttpRequestgetHttpServletRequest, setHttpServletRequestgetMessageContext, setMessageContextdestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecode, getMessageContextinitialize, isInitializeddestroy, isDestroyed@Nonnull private final org.slf4j.Logger log
@Nullable private BindingDescriptor bindingDescriptor
BindingDescriptor to inject into SAMLBindingContext created.@NonnullAfterInit private SAML2ArtifactBuilderFactory artifactBuilderFactory
@NonnullAfterInit private EndpointResolver<ArtifactResolutionService> artifactEndpointResolver
@NonnullAfterInit private RoleDescriptorResolver roleDescriptorResolver
@NonnullAfterInit private QName peerEntityRole
@NonnullAfterInit private Resolver<String,CriteriaSet> selfEntityIDResolver
private org.opensaml.soap.client.SOAPClient soapClient
private String soapPipelineName
private String soapClientSecurityConfigurationProfileId
private IdentifierGenerationStrategy idStrategy
protected void doInitialize()
throws ComponentInitializationException
doInitialize in class org.opensaml.messaging.decoder.servlet.BaseHttpServletRequestXMLMessageDecoder<SAMLObject>ComponentInitializationExceptionprotected void doDestroy()
doDestroy in class org.opensaml.messaging.decoder.servlet.BaseHttpServletRequestXMLMessageDecoder<SAMLObject>@NonnullAfterInit public IdentifierGenerationStrategy getIdentifierGenerationStrategy()
public void setIdentifierGenerationStrategy(@Nullable IdentifierGenerationStrategy strategy)
strategy - the identifier generation strategy@NonnullAfterInit public Resolver<String,CriteriaSet> getSelfEntityIDResolver()
public void setSelfEntityIDResolver(@Nonnull Resolver<String,CriteriaSet> resolver)
resolver - the resolver instance@NonnullAfterInit public QName getPeerEntityRole()
QName.public void setPeerEntityRole(@Nonnull QName role)
QName.role - the peer entity role@NonnullAfterInit public EndpointResolver<ArtifactResolutionService> getArtifactEndpointResolver()
public void setArtifactEndpointResolver(@Nullable EndpointResolver<ArtifactResolutionService> resolver)
resolver - the new resolver@NonnullAfterInit public RoleDescriptorResolver getRoleDescriptorResolver()
Must be capable of resolving descriptors based on ArtifactCriterion.
public void setRoleDescriptorResolver(@Nullable RoleDescriptorResolver resolver)
Must be capable of resolving descriptors based on ArtifactCriterion.
resolver - the role descriptor resolver@NonnullAfterInit public SAML2ArtifactBuilderFactory getArtifactBuilderFactory()
public void setArtifactBuilderFactory(@Nullable SAML2ArtifactBuilderFactory factory)
factory - the artifact builder factory@NonnullAfterInit public org.opensaml.soap.client.SOAPClient getSOAPClient()
public void setSOAPClient(@Nonnull org.opensaml.soap.client.SOAPClient client)
client - the SOAP client@Nullable public String getSOAPPipelineName()
PipelineFactoryHttpSOAPClient.public void setSOAPPipelineName(@Nullable String name)
PipelineFactoryHttpSOAPClient.name - the pipeline name, or null@Nullable public String getSOAPClientSecurityConfigurationProfileId()
@Nonnull public void setSOAPClientSecurityConfigurationProfileId(@Nullable String profileId)
profileId - the profile ID, or null@Nonnull @NotEmpty public String getBindingURI()
getBindingURI in interface SAMLMessageDecoder@Nullable public BindingDescriptor getBindingDescriptor()
BindingDescriptor to inject into SAMLBindingContext created.public void setBindingDescriptor(@Nullable BindingDescriptor descriptor)
BindingDescriptor to inject into SAMLBindingContext created.descriptor - a binding descriptorprotected void doDecode()
throws org.opensaml.messaging.decoder.MessageDecodingException
doDecode in class org.opensaml.messaging.decoder.AbstractMessageDecoder<SAMLObject>org.opensaml.messaging.decoder.MessageDecodingExceptionprivate void processArtifact(org.opensaml.messaging.context.MessageContext messageContext,
javax.servlet.http.HttpServletRequest request)
throws org.opensaml.messaging.decoder.MessageDecodingException
messageContext - the message context being processedrequest - the HTTP servlet requestorg.opensaml.messaging.decoder.MessageDecodingException - thrown if there is a problem decoding or dereferencing the artifact@Nonnull private SAMLObject dereferenceArtifact(@Nonnull SAML2Artifact artifact, @Nonnull RoleDescriptor peerRoleDescriptor, @Nonnull ArtifactResolutionService ars) throws org.opensaml.messaging.decoder.MessageDecodingException
artifact - the artifact to de-referencepeerRoleDescriptor - the peer RoleDescriptorars - the peer's artifact resolution service endpointorg.opensaml.messaging.decoder.MessageDecodingException - if there is fatal error, or if the artifact was not successfully resolved@Nonnull private SAMLObject validateAndExtractResponseMessage(@Nonnull ArtifactResponse artifactResponse) throws org.opensaml.messaging.decoder.MessageDecodingException
artifactResponse - the response to processorg.opensaml.messaging.decoder.MessageDecodingException - if the protocol message was not sent or there was a non-success status response@Nonnull private ArtifactResolve buildArtifactResolveRequestMessage(@Nonnull SAML2Artifact artifact, @Nonnull String endpoint, @Nonnull RoleDescriptor peerRoleDescriptor, @Nonnull String selfEntityID)
artifact - the artifact being de-referencedendpoint - the peer artifact resolution service endpointpeerRoleDescriptor - the peer RoleDescriptorselfEntityID - the entityID of this party, the issuer of the protocol request message@Nonnull private String resolveSelfEntityID(@Nonnull RoleDescriptor peerRoleDescriptor) throws org.opensaml.messaging.decoder.MessageDecodingException
peerRoleDescriptor - the peer RoleDescriptororg.opensaml.messaging.decoder.MessageDecodingException - if there was a fatal error during resolution,
or the entityID could not be resolved@Nonnull private Issuer buildIssuer(@Nonnull String selfEntityID)
selfEntityID - the entity ID of the protocol message issuer (this entity)@Nonnull private ArtifactResolutionService resolveArtifactEndpoint(@Nonnull SAML2Artifact artifact, @Nonnull RoleDescriptor peerRoleDescriptor) throws org.opensaml.messaging.decoder.MessageDecodingException
artifact - the artifactpeerRoleDescriptor - the peer RoleDescriptororg.opensaml.messaging.decoder.MessageDecodingException - if there is a fatal error resolving the endpoint,
or the endpoint could not be resolved@Nonnull private RoleDescriptor resolvePeerRoleDescriptor(@Nonnull SAML2Artifact artifact) throws org.opensaml.messaging.decoder.MessageDecodingException
artifact - the artifact to processorg.opensaml.messaging.decoder.MessageDecodingException - if there was a fatal error resolving the role descriptor,
or the descriptor could not be resolved@Nonnull private SAML2Artifact parseArtifact(@Nonnull String encodedArtifact) throws org.opensaml.messaging.decoder.MessageDecodingException
SAML2Artifact instance.encodedArtifact - the encoded artifact which was receivedorg.opensaml.messaging.decoder.MessageDecodingException - if the encoded artifact could not be decodedprotected void populateBindingContext(org.opensaml.messaging.context.MessageContext<SAMLObject> messageContext)
messageContext - the current message contextCopyright © 1999–2019 Shibboleth Consortium. All rights reserved.