opensaml-3.2.1
opensaml::MessageDecoder Class Referenceabstract

Interface to SAML protocol binding message decoders. More...

#include <saml/binding/MessageDecoder.h>

Inheritance diagram for opensaml::MessageDecoder:
opensaml::saml1p::SAML1MessageDecoder opensaml::saml2p::SAML2MessageDecoder

Classes

class  ArtifactResolver
 Interface to caller-supplied artifact resolution mechanism. More...
 

Public Member Functions

virtual const XMLCh * getProtocolFamily () const
 Returns identifier for the protocol family associated with the decoder. More...
 
virtual bool isUserAgentPresent () const
 Indicates whether a web browser or similar user agent delivered the message. More...
 
void setArtifactResolver (const ArtifactResolver *artifactResolver)
 Provides an ArtifactResolver implementation for the MessageDecoder to use. More...
 
virtual xmltooling::XMLObject * decode (std::string &relayState, const xmltooling::GenericRequest &genericRequest, SecurityPolicy &policy) const
 
virtual xmltooling::XMLObject * decode (std::string &relayState, const xmltooling::GenericRequest &genericRequest, xmltooling::GenericResponse *genericResponse, SecurityPolicy &policy) const
 Decodes a transport request into a SAML protocol message, and evaluates it against a supplied SecurityPolicy. More...
 

Protected Member Functions

virtual void extractMessageDetails (const xmltooling::XMLObject &message, const xmltooling::GenericRequest &request, const XMLCh *protocol, SecurityPolicy &policy) const =0
 Extracts policy-relevant message details. More...
 

Protected Attributes

const ArtifactResolverm_artifactResolver
 Pointer to an ArtifactResolver implementation. More...
 

Detailed Description

Interface to SAML protocol binding message decoders.

Member Function Documentation

◆ decode() [1/2]

virtual xmltooling::XMLObject* opensaml::MessageDecoder::decode ( std::string &  relayState,
const xmltooling::GenericRequest &  genericRequest,
SecurityPolicy policy 
) const
virtual

The future version is the variant below that also takes a response object.

Parameters
relayStatewill be set to RelayState/TARGET value accompanying message
genericRequestreference to interface for accessing transport request to decode
policyreference to policy containing rules, MetadataProvider, TrustEngine, etc.
Returns
the decoded message, or nullptr if the decoder did not recognize the request content

◆ decode() [2/2]

virtual xmltooling::XMLObject* opensaml::MessageDecoder::decode ( std::string &  relayState,
const xmltooling::GenericRequest &  genericRequest,
xmltooling::GenericResponse *  genericResponse,
SecurityPolicy policy 
) const
virtual

Decodes a transport request into a SAML protocol message, and evaluates it against a supplied SecurityPolicy.

If the transport request does not contain the information necessary to decode the request, nullptr will be returned. Errors during the decoding process will be raised as exceptions.

Artifact-based bindings require an ArtifactResolver be set to turn an artifact into the corresponding message.

Parameters
relayStatewill be set to RelayState/TARGET value accompanying message
genericRequestreference to interface for accessing transport request to decode
genericResponseoptional interface for accessing transport response
policyreference to policy containing rules, MetadataProvider, TrustEngine, etc.
Returns
the decoded message, or nullptr if the decoder did not recognize the request content

◆ extractMessageDetails()

virtual void opensaml::MessageDecoder::extractMessageDetails ( const xmltooling::XMLObject &  message,
const xmltooling::GenericRequest &  request,
const XMLCh *  protocol,
SecurityPolicy policy 
) const
protectedpure virtual

Extracts policy-relevant message details.

Parameters
messagethe incoming message
requestthe protocol request
protocolthe protocol family in use
policySecurityPolicy to provide various components and track message data

Implemented in opensaml::saml2p::SAML2MessageDecoder, and opensaml::saml1p::SAML1MessageDecoder.

◆ getProtocolFamily()

virtual const XMLCh* opensaml::MessageDecoder::getProtocolFamily ( ) const
virtual

Returns identifier for the protocol family associated with the decoder.

Returns
a protocol family identifier, or nullptr

Reimplemented in opensaml::saml2p::SAML2MessageDecoder, and opensaml::saml1p::SAML1MessageDecoder.

◆ isUserAgentPresent()

virtual bool opensaml::MessageDecoder::isUserAgentPresent ( ) const
virtual

Indicates whether a web browser or similar user agent delivered the message.

Returns
true iff the message was delivered by a user agent

◆ setArtifactResolver()

void opensaml::MessageDecoder::setArtifactResolver ( const ArtifactResolver artifactResolver)

Provides an ArtifactResolver implementation for the MessageDecoder to use.

The implementation's lifetime must be longer than the lifetime of this object. This method must be externally synchronized.

Parameters
artifactResolveran ArtifactResolver implementation to use

Member Data Documentation

◆ m_artifactResolver

const ArtifactResolver* opensaml::MessageDecoder::m_artifactResolver
protected

Pointer to an ArtifactResolver implementation.


The documentation for this class was generated from the following file: