public abstract class BaseSAML2MessageDecoder extends BaseSAMLMessageDecoder
Constructor and Description |
---|
BaseSAML2MessageDecoder()
Constructor.
|
BaseSAML2MessageDecoder(ParserPool pool)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(MessageContext messageContext)
Decodes a message in a binding specific manner.
|
protected String |
extractEntityId(Issuer issuer)
Extracts the entity ID from the SAML 2 Issuer.
|
protected void |
extractRequestInfo(SAMLMessageContext messageContext,
RequestAbstractType request)
Extract information from a SAML RequestAbstractType message.
|
protected void |
extractResponseInfo(SAMLMessageContext messageContext,
StatusResponseType statusResponse)
Extract information from a SAML StatusResponse message.
|
protected String |
getIntendedDestinationEndpointURI(SAMLMessageContext samlMsgCtx)
Extract the message information which indicates to what receiver endpoint URI the
SAML message was intended to be delivered.
|
protected void |
populateMessageContext(SAMLMessageContext messageContext)
Populates the message context with the message ID, issue instant, and issuer as well as the peer's entity
descriptor if a metadata provider is present in the message context and the peer's role descriptor if its entity
descriptor was retrieved and the message context has a populated peer role name.
|
protected void |
populateMessageIdIssueInstantIssuer(SAMLMessageContext messageContext)
Extracts the message ID, issue instant, and issuer from the incoming SAML message and populates the message
context with it.
|
protected void |
populateRelyingPartyMetadata(SAMLMessageContext messageContext)
Populates the peer's entity metadata if a metadata provide is present in the message context.
|
checkEndpointURI, compareEndpointURIs, getActualReceiverEndpointURI, getURIComparator, isIntendedDestinationEndpointURIRequired, isMessageSigned, setURIComparator
doDecode, getParserPool, logDecodedMessage, processSecurityPolicy, setParserPool, unmarshallMessage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBindingURI
public BaseSAML2MessageDecoder()
public BaseSAML2MessageDecoder(ParserPool pool)
pool
- parser pool used to deserialize messagespublic void decode(MessageContext messageContext) throws MessageDecodingException, SecurityException
decode
in interface MessageDecoder
decode
in class BaseMessageDecoder
messageContext
- current message contextMessageDecodingException
- thrown if the message can not be decodedSecurityException
- thrown if the decoded message does not meet the required security constraintsprotected void populateMessageContext(SAMLMessageContext messageContext) throws MessageDecodingException
messageContext
- message context to populateMessageDecodingException
- thrown if there is a problem populating the message contextprotected void populateMessageIdIssueInstantIssuer(SAMLMessageContext messageContext) throws MessageDecodingException
messageContext
- current message contextMessageDecodingException
- thrown if there is a problem populating the message contextprotected void extractResponseInfo(SAMLMessageContext messageContext, StatusResponseType statusResponse) throws MessageDecodingException
messageContext
- current message contextstatusResponse
- the SAML message to processMessageDecodingException
- thrown if the response issuer has a format other than NameIDType.ENTITY
or, if the response does not contain an issuer, if the contained assertions contain issuers that are
not of NameIDType.ENTITY
format or if the assertions contain different issuersprotected void extractRequestInfo(SAMLMessageContext messageContext, RequestAbstractType request) throws MessageDecodingException
messageContext
- current message contextrequest
- the SAML message to processMessageDecodingException
- thrown if the request issuer has a format other than NameIDType.ENTITY
protected String extractEntityId(Issuer issuer) throws MessageDecodingException
issuer
- issuer to extract the entityID fromMessageDecodingException
- thrown if the given issuer has a format other than NameIDType.ENTITY
protected void populateRelyingPartyMetadata(SAMLMessageContext messageContext) throws MessageDecodingException
messageContext
- current message contextMessageDecodingException
- thrown if there is a problem populating the message contextprotected String getIntendedDestinationEndpointURI(SAMLMessageContext samlMsgCtx) throws MessageDecodingException
This SAML 2-specific implementation extracts the value of the protocol message Destination attribute.
getIntendedDestinationEndpointURI
in class BaseSAMLMessageDecoder
samlMsgCtx
- the SAML message context being processedMessageDecodingException
- thrown if the message is not an instance of SAML message that
could be processed by the decoderCopyright © 2018 JBoss by Red Hat. All rights reserved.