From 2d05f4d1935e7b79e70f2775a14c10964a04164e Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Tue, 3 Jul 2007 19:38:08 +0000 Subject: [PATCH] Expose a "user agent present" property. --- saml/binding/MessageDecoder.h | 9 +++++++++ saml/binding/MessageEncoder.h | 9 +++++++++ saml/saml1/binding/impl/SAML1SOAPDecoder.cpp | 6 +++++- saml/saml1/binding/impl/SAML1SOAPEncoder.cpp | 6 +++++- saml/saml2/binding/impl/SAML2SOAPDecoder.cpp | 6 +++++- saml/saml2/binding/impl/SAML2SOAPEncoder.cpp | 6 +++++- 6 files changed, 38 insertions(+), 4 deletions(-) diff --git a/saml/binding/MessageDecoder.h b/saml/binding/MessageDecoder.h index 31649cc..d3fcc9e 100644 --- a/saml/binding/MessageDecoder.h +++ b/saml/binding/MessageDecoder.h @@ -54,6 +54,15 @@ namespace opensaml { virtual ~MessageDecoder() {} /** + * Indicates whether a web browser or similar user agent delivered the message. + * + * @return true iff the message was delivered by a user agent + */ + virtual bool isUserAgentPresent() const { + return true; + } + + /** * Interface to caller-supplied artifact resolution mechanism. * * Resolving artifacts requires internally performing a SOAP-based diff --git a/saml/binding/MessageEncoder.h b/saml/binding/MessageEncoder.h index fa8218d..dcbd86d 100644 --- a/saml/binding/MessageEncoder.h +++ b/saml/binding/MessageEncoder.h @@ -59,6 +59,15 @@ namespace opensaml { } /** + * Indicates whether a web browser or similar user agent will receive the message. + * + * @return true iff the message will be handled by a user agent + */ + virtual bool isUserAgentPresent() const { + return true; + } + + /** * Interface to caller-supplied artifact generation mechanism. * * Generating an artifact for storage and retrieval requires knowledge of diff --git a/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp b/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp index d759507..eff4034 100644 --- a/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp +++ b/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp @@ -44,7 +44,11 @@ namespace opensaml { public: SAML1SOAPDecoder(const DOMElement* e) {} virtual ~SAML1SOAPDecoder() {} - + + bool isUserAgentPresent() const { + return false; + } + xmltooling::XMLObject* decode( std::string& relayState, const GenericRequest& genericRequest, diff --git a/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp b/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp index e031adf..7dc59a1 100644 --- a/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp +++ b/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp @@ -48,7 +48,11 @@ namespace opensaml { public: SAML1SOAPEncoder(const DOMElement* e) {} virtual ~SAML1SOAPEncoder() {} - + + bool isUserAgentPresent() const { + return false; + } + long encode( GenericResponse& genericResponse, XMLObject* xmlObject, diff --git a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp index c48c2f9..3757039 100644 --- a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp @@ -44,7 +44,11 @@ namespace opensaml { public: SAML2SOAPDecoder(const DOMElement* e); virtual ~SAML2SOAPDecoder() {} - + + bool isUserAgentPresent() const { + return false; + } + xmltooling::XMLObject* decode( std::string& relayState, const GenericRequest& genericRequest, diff --git a/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp b/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp index 65e135b..bd82eeb 100644 --- a/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp +++ b/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp @@ -48,7 +48,11 @@ namespace opensaml { public: SAML2SOAPEncoder(const DOMElement* e); virtual ~SAML2SOAPEncoder() {} - + + bool isUserAgentPresent() const { + return false; + } + long encode( GenericResponse& genericResponse, XMLObject* xmlObject, -- 2.1.4