public class SAMLProcessorImpl extends Object implements SAMLProcessor
| Modifier and Type | Field and Description |
|---|---|
protected Collection<SAMLBinding> |
bindings
Bindings supported by this processor.
|
| Constructor and Description |
|---|
SAMLProcessorImpl(Collection<SAMLBinding> bindings)
Creates a processor supporting multiple bindings.
|
SAMLProcessorImpl(SAMLBinding binding)
Creates a processor supporting a single binding.
|
| Modifier and Type | Method and Description |
|---|---|
protected SAMLBinding |
getBinding(org.opensaml.saml2.metadata.Endpoint endpoint)
Determines binding to be used for the given endpoint.
|
protected SAMLBinding |
getBinding(org.opensaml.ws.transport.InTransport transport)
Analyzes the transport object and returns the first binding capable of sending/extracting a SAML message from to/from it.
|
protected SAMLBinding |
getBinding(String bindingName)
Finds binding with the given name.
|
protected void |
populateSecurityPolicy(SAMLMessageContext samlContext,
SAMLBinding binding)
Populates security policy to use for the incoming message and sets it in the samlContext as securityPolicyResolver.
|
SAMLMessageContext |
retrieveMessage(SAMLMessageContext samlContext)
Loads incoming SAML message using one of the configured bindings and populates the SAMLMessageContext object with it.
|
SAMLMessageContext |
retrieveMessage(SAMLMessageContext samlContext,
SAMLBinding binding)
Loads incoming SAML message using one of the configured bindings and populates the SAMLMessageContext object with it.
|
SAMLMessageContext |
retrieveMessage(SAMLMessageContext samlContext,
String binding)
Loads incoming SAML message using one of the configured bindings and populates the SAMLMessageContext object with it.
|
SAMLMessageContext |
sendMessage(SAMLMessageContext samlContext,
boolean sign)
Method sends SAML message contained in the context to the specified peerEntityEnpoint.
|
protected SAMLMessageContext |
sendMessage(SAMLMessageContext samlContext,
boolean sign,
SAMLBinding binding)
Sends SAML message using the given binding.
|
SAMLMessageContext |
sendMessage(SAMLMessageContext samlContext,
boolean sign,
String bindingName) |
protected void |
verifyContext(SAMLMessageContext samlContext)
Verifies that context contains all the required information related to the local entity.
|
protected Collection<SAMLBinding> bindings
public SAMLProcessorImpl(SAMLBinding binding)
binding - bindingpublic SAMLProcessorImpl(Collection<SAMLBinding> bindings)
bindings - bindingspublic SAMLMessageContext retrieveMessage(SAMLMessageContext samlContext, SAMLBinding binding) throws org.opensaml.common.SAMLException, org.opensaml.saml2.metadata.provider.MetadataProviderException, org.opensaml.ws.message.decoder.MessageDecodingException, org.opensaml.xml.security.SecurityException
samlContext - contextbinding - to use for message extractionorg.opensaml.common.SAMLException - error retrieving the message from the requestorg.opensaml.saml2.metadata.provider.MetadataProviderException - error retrieving metadataorg.opensaml.ws.message.decoder.MessageDecodingException - error decoding the messageorg.opensaml.xml.security.SecurityException - error verifying messageprotected void populateSecurityPolicy(SAMLMessageContext samlContext, SAMLBinding binding)
samlContext - saml context to set the policy tobinding - binding used to retrieve the messagepublic SAMLMessageContext retrieveMessage(SAMLMessageContext samlContext, String binding) throws org.opensaml.common.SAMLException, org.opensaml.saml2.metadata.provider.MetadataProviderException, org.opensaml.ws.message.decoder.MessageDecodingException, org.opensaml.xml.security.SecurityException
retrieveMessage in interface SAMLProcessorsamlContext - saml contextbinding - to use for message extractionorg.opensaml.common.SAMLException - error retrieving the message from the requestorg.opensaml.saml2.metadata.provider.MetadataProviderException - error retrieving metadatorg.opensaml.ws.message.decoder.MessageDecodingException - error decoding the messageorg.opensaml.xml.security.SecurityException - error verifying messagepublic SAMLMessageContext retrieveMessage(SAMLMessageContext samlContext) throws org.opensaml.common.SAMLException, org.opensaml.saml2.metadata.provider.MetadataProviderException, org.opensaml.ws.message.decoder.MessageDecodingException, org.opensaml.xml.security.SecurityException
retrieveMessage in interface SAMLProcessorsamlContext - saml contextorg.opensaml.common.SAMLException - error retrieving the message from the requestorg.opensaml.saml2.metadata.provider.MetadataProviderException - error retrieving metadatorg.opensaml.ws.message.decoder.MessageDecodingException - error decoding the messageorg.opensaml.xml.security.SecurityException - error verifying messagepublic SAMLMessageContext sendMessage(SAMLMessageContext samlContext, boolean sign) throws org.opensaml.common.SAMLException, org.opensaml.saml2.metadata.provider.MetadataProviderException, org.opensaml.ws.message.encoder.MessageEncodingException
sendMessage in interface SAMLProcessorsamlContext - contextsign - true when sent message should be signedorg.opensaml.common.SAMLExceptionorg.opensaml.saml2.metadata.provider.MetadataProviderExceptionorg.opensaml.ws.message.encoder.MessageEncodingExceptionpublic SAMLMessageContext sendMessage(SAMLMessageContext samlContext, boolean sign, String bindingName) throws org.opensaml.common.SAMLException, org.opensaml.saml2.metadata.provider.MetadataProviderException, org.opensaml.ws.message.encoder.MessageEncodingException
sendMessage in interface SAMLProcessororg.opensaml.common.SAMLExceptionorg.opensaml.saml2.metadata.provider.MetadataProviderExceptionorg.opensaml.ws.message.encoder.MessageEncodingExceptionprotected SAMLMessageContext sendMessage(SAMLMessageContext samlContext, boolean sign, SAMLBinding binding) throws org.opensaml.common.SAMLException, org.opensaml.saml2.metadata.provider.MetadataProviderException, org.opensaml.ws.message.encoder.MessageEncodingException
samlContext - contextsign - if true sent message is signedbinding - binding to useorg.opensaml.common.SAMLException - in case message can't be sentorg.opensaml.ws.message.encoder.MessageEncodingException - in case message encoding failsorg.opensaml.saml2.metadata.provider.MetadataProviderException - in case metadata for required entities is not foundprotected void verifyContext(SAMLMessageContext samlContext) throws org.opensaml.saml2.metadata.provider.MetadataProviderException
samlContext - context to populateorg.opensaml.saml2.metadata.provider.MetadataProviderException - in case metadata do not contain expected entitiesprotected SAMLBinding getBinding(org.opensaml.ws.transport.InTransport transport) throws org.opensaml.common.SAMLException
transport - transport type to get binding fororg.opensaml.common.SAMLException - in case no suitable decoder is found for given requestprotected SAMLBinding getBinding(org.opensaml.saml2.metadata.Endpoint endpoint) throws org.opensaml.common.SAMLException, org.opensaml.saml2.metadata.provider.MetadataProviderException
endpoint - endpoint torg.opensaml.common.SAMLException - in case binding can't be foundorg.opensaml.saml2.metadata.provider.MetadataProviderException - in case binding of the endpoint can't be determinedSAMLUtil.getBindingForEndpoint(org.opensaml.saml2.metadata.Endpoint)protected SAMLBinding getBinding(String bindingName) throws org.opensaml.common.SAMLException
bindingName - nameorg.opensaml.common.SAMLException - in case binding can't be found