From 8fbc3d93b1ed3b81c43c6c3c1b298a6995550e98 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Mon, 22 Jan 2007 06:14:20 +0000 Subject: [PATCH] Add assertion indicator to base class. --- saml/RootObject.h | 9 +++++++++ saml/saml1/core/Assertions.h | 3 +++ saml/saml2/core/Assertions.h | 3 +++ 3 files changed, 15 insertions(+) diff --git a/saml/RootObject.h b/saml/RootObject.h index 5ce98ec..45103d3 100644 --- a/saml/RootObject.h +++ b/saml/RootObject.h @@ -38,6 +38,15 @@ namespace opensaml { virtual ~RootObject() {} /** + * Indicates whether the object is an assertion. + * + * @return true iff the object is an assertion + */ + virtual bool isAssertion() const { + return false; + } + + /** * Returns the unique SAML ID of the object. * * @return the unique SAML ID diff --git a/saml/saml1/core/Assertions.h b/saml/saml1/core/Assertions.h index 56afa7c..85e821f 100644 --- a/saml/saml1/core/Assertions.h +++ b/saml/saml1/core/Assertions.h @@ -216,6 +216,9 @@ namespace opensaml { END_XMLOBJECT; BEGIN_XMLOBJECT(SAML_API,Assertion,RootObject,SAML 1.x Assertion element); + bool isAssertion() const { + return true; + } DECL_INTEGER_ATTRIB(MinorVersion,MINORVERSION); DECL_STRING_ATTRIB(AssertionID,ASSERTIONID); DECL_STRING_ATTRIB(Issuer,ISSUER); diff --git a/saml/saml2/core/Assertions.h b/saml/saml2/core/Assertions.h index ba4b816..80e526c 100644 --- a/saml/saml2/core/Assertions.h +++ b/saml/saml2/core/Assertions.h @@ -321,6 +321,9 @@ namespace opensaml { }; BEGIN_XMLOBJECT(SAML_API,Assertion,saml2::RootObject,SAML 2.0 Assertion element); + bool isAssertion() const { + return true; + } DECL_INHERITED_STRING_ATTRIB(Version,VER); DECL_INHERITED_STRING_ATTRIB(ID,ID); DECL_INHERITED_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT); -- 2.1.4