|
Spring Security SAML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.security.saml.processor.SAMLProcessorImpl
public class SAMLProcessorImpl
Processor is capable of parsing SAML message from HttpServletRequest and populate the SAMLMessageContext for further validations.
Field Summary | |
---|---|
protected Collection<SAMLBinding> |
bindings
Bindings supported by this processor. |
Constructor Summary | |
---|---|
SAMLProcessorImpl(Collection<SAMLBinding> bindings)
Creates a processor supporting multiple bindings. |
|
SAMLProcessorImpl(SAMLBinding binding)
Creates a processor supporting a single binding. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Collection<SAMLBinding> bindings
Constructor Detail |
---|
public SAMLProcessorImpl(SAMLBinding binding)
binding
- bindingpublic SAMLProcessorImpl(Collection<SAMLBinding> bindings)
bindings
- bindingsMethod Detail |
---|
public 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 extraction
org.opensaml.common.SAMLException
- error retrieving the message from the request
org.opensaml.saml2.metadata.provider.MetadataProviderException
- error retrieving metadata
org.opensaml.ws.message.decoder.MessageDecodingException
- error decoding the message
org.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 SAMLProcessor
samlContext
- saml contextbinding
- to use for message extraction
org.opensaml.common.SAMLException
- error retrieving the message from the request
org.opensaml.saml2.metadata.provider.MetadataProviderException
- error retrieving metadat
org.opensaml.ws.message.decoder.MessageDecodingException
- error decoding the message
org.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 SAMLProcessor
samlContext
- saml context
org.opensaml.common.SAMLException
- error retrieving the message from the request
org.opensaml.saml2.metadata.provider.MetadataProviderException
- error retrieving metadat
org.opensaml.ws.message.decoder.MessageDecodingException
- error decoding the message
org.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 SAMLProcessor
samlContext
- contextsign
- true when sent message should be signed
org.opensaml.common.SAMLException
org.opensaml.saml2.metadata.provider.MetadataProviderException
org.opensaml.ws.message.encoder.MessageEncodingException
public 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 SAMLProcessor
org.opensaml.common.SAMLException
org.opensaml.saml2.metadata.provider.MetadataProviderException
org.opensaml.ws.message.encoder.MessageEncodingException
protected 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 use
org.opensaml.common.SAMLException
- in case message can't be sent
org.opensaml.ws.message.encoder.MessageEncodingException
- in case message encoding fails
org.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 populate
org.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 for
org.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 t
org.opensaml.common.SAMLException
- in case binding can't be found
org.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
- name
org.opensaml.common.SAMLException
- in case binding can't be found
|
Spring Security SAML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |