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 net.shibboleth.utilities.java.support.security.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 org.opensaml.soap.client.SOAPClient |
soapClient
SOAP client.
|
Constructor and Description |
---|
HTTPArtifactDecoder() |
Modifier and Type | Method and Description |
---|---|
private ArtifactResolve |
buildArtifactResolveRequestMessage(SAML2Artifact artifact,
String endpoint,
RoleDescriptor peerRoleDescriptor) |
private Issuer |
buildIssuer(RoleDescriptor peerRoleDescriptor) |
private SAMLObject |
dereferenceArtifact(SAML2Artifact artifact,
RoleDescriptor peerRoleDescriptor,
ArtifactResolutionService ars) |
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() |
net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy |
getIdentifierGenerationStrategy()
Get the identifier generation strategy.
|
QName |
getPeerEntityRole()
Get the peer entity role
QName . |
RoleDescriptorResolver |
getRoleDescriptorResolver()
Get the role descriptor resolver.
|
org.opensaml.soap.client.SOAPClient |
getSOAPClient()
Get the SOAP client instance.
|
private SAML2Artifact |
parseArtifact(String encodedArtifact) |
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) |
private RoleDescriptor |
resolvePeerRoleDescriptor(SAML2Artifact artifact) |
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(net.shibboleth.utilities.java.support.security.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 |
setSOAPClient(org.opensaml.soap.client.SOAPClient client)
Set the SOAP client instance.
|
decode, getMessageToLog, getParserPool, logDecodedMessage, setParserPool, unmarshallMessage, validateHttpRequest
getHttpServletRequest, setHttpServletRequest
getMessageContext, setMessageContext
destroy, initialize, isDestroyed, isInitialized
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decode, getMessageContext
@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
private org.opensaml.soap.client.SOAPClient soapClient
private net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy idStrategy
protected void doInitialize() throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize
in class org.opensaml.messaging.decoder.servlet.BaseHttpServletRequestXMLMessageDecoder<SAMLObject>
net.shibboleth.utilities.java.support.component.ComponentInitializationException
protected void doDestroy()
doDestroy
in class org.opensaml.messaging.decoder.servlet.BaseHttpServletRequestXMLMessageDecoder<SAMLObject>
@NonnullAfterInit public net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy getIdentifierGenerationStrategy()
public void setIdentifierGenerationStrategy(@Nullable net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy strategy)
strategy
- the identifier generation strategy@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@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.MessageDecodingException
private 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 artifactprivate SAMLObject dereferenceArtifact(SAML2Artifact artifact, RoleDescriptor peerRoleDescriptor, ArtifactResolutionService ars) throws org.opensaml.messaging.decoder.MessageDecodingException
artifact
- peerRoleDescriptor
- artifactResolveEndpointURL
- org.opensaml.messaging.decoder.MessageDecodingException
private ArtifactResolve buildArtifactResolveRequestMessage(SAML2Artifact artifact, String endpoint, RoleDescriptor peerRoleDescriptor)
artifact
- endpoint
- peerRoleDescriptor
- private Issuer buildIssuer(RoleDescriptor peerRoleDescriptor)
peerRoleDescriptor
- private ArtifactResolutionService resolveArtifactEndpoint(SAML2Artifact artifact, RoleDescriptor peerRoleDescriptor) throws org.opensaml.messaging.decoder.MessageDecodingException
artifact
- peerRoleDescriptor
- org.opensaml.messaging.decoder.MessageDecodingException
private RoleDescriptor resolvePeerRoleDescriptor(SAML2Artifact artifact) throws org.opensaml.messaging.decoder.MessageDecodingException
artifact
- org.opensaml.messaging.decoder.MessageDecodingException
private SAML2Artifact parseArtifact(String encodedArtifact) throws org.opensaml.messaging.decoder.MessageDecodingException
encodedArtifact
- org.opensaml.messaging.decoder.MessageDecodingException
protected void populateBindingContext(org.opensaml.messaging.context.MessageContext<SAMLObject> messageContext)
messageContext
- the current message contextCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.