[cpp-opensaml COMMIT] in /branches/REL_2: saml/Assertion.h saml/RootObject.h saml/SAMLConfig.cpp saml/exceptions.h sa...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Jan 31 16:51:28 GMT 2012
Author: scantor
Date: Tue Jan 31 16:51:28 2012
New Revision: 700
URL: http://svn.shibboleth.net/view/cpp-opensaml?rev=700&view=rev
Log:
Add Status base class.
Modified:
branches/REL_2/saml/Assertion.h
branches/REL_2/saml/RootObject.h
branches/REL_2/saml/SAMLConfig.cpp
branches/REL_2/saml/exceptions.h
branches/REL_2/saml/saml1/binding/impl/SAML1SOAPClient.cpp
branches/REL_2/saml/saml1/core/Protocols.h
branches/REL_2/saml/saml1/core/impl/ProtocolsImpl.cpp
branches/REL_2/saml/saml2/binding/impl/SAML2SOAPClient.cpp
branches/REL_2/saml/saml2/core/Protocols.h
branches/REL_2/saml/saml2/core/impl/Protocols20Impl.cpp
branches/REL_2/samltest/saml2/binding/SAML2ArtifactTest.h
Modified: branches/REL_2/saml/Assertion.h
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/Assertion.h?rev=700&r1=699&r2=700&view=diff
==============================================================================
--- branches/REL_2/saml/Assertion.h (original)
+++ branches/REL_2/saml/Assertion.h Tue Jan 31 16:51:28 2012
@@ -29,20 +29,6 @@
#include <saml/RootObject.h>
-namespace opensaml {
-
- /**
- * Base class for SAML assertions.
- * Currently just a marker interface.
- */
- class SAML_API Assertion : public virtual RootObject
- {
- public:
- virtual ~Assertion();
- protected:
- Assertion();
- };
-
-};
+// Moved declaration into RootObject.h header.
#endif /* __saml_assertion_h__ */
Modified: branches/REL_2/saml/RootObject.h
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/RootObject.h?rev=700&r1=699&r2=700&view=diff
==============================================================================
--- branches/REL_2/saml/RootObject.h (original)
+++ branches/REL_2/saml/RootObject.h Tue Jan 31 16:51:28 2012
@@ -69,6 +69,58 @@
RootObject();
};
+ /**
+ * Base class for SAML assertions.
+ * Currently just a marker interface.
+ */
+ class SAML_API Assertion : public virtual RootObject
+ {
+ public:
+ virtual ~Assertion();
+ protected:
+ Assertion();
+ };
+
+ /**
+ * Base class for SAML status codes.
+ */
+ class SAML_API Status : public virtual xmltooling::XMLObject
+ {
+ public:
+ virtual ~Status();
+
+ /**
+ * Returns a string representation of the top-level status code.
+ *
+ * @return string representation of top-level status code
+ */
+ virtual const XMLCh* getTopStatus() const=0;
+
+ /**
+ * Returns a string representation of the second-level status code, if any.
+ *
+ * @return string representation of second-level status code, or nullptr
+ */
+ virtual const XMLCh* getSubStatus() const=0;
+
+ /**
+ * Returns true iff status information beyond the second level exists.
+ *
+ * @return indicator of three or more status codes
+ */
+ virtual bool hasAdditionalStatus() const=0;
+
+ /**
+ * Returns the message contained in the status, if any.
+ *
+ * @return status message, or nullptr
+ */
+ virtual const XMLCh* getMessage() const=0;
+
+ protected:
+ Status();
+ };
+
};
#endif /* __saml_root_h__ */
Modified: branches/REL_2/saml/SAMLConfig.cpp
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/SAMLConfig.cpp?rev=700&r1=699&r2=700&view=diff
==============================================================================
--- branches/REL_2/saml/SAMLConfig.cpp (original)
+++ branches/REL_2/saml/SAMLConfig.cpp Tue Jan 31 16:51:28 2012
@@ -285,6 +285,14 @@
}
Assertion::~Assertion()
+{
+}
+
+Status::Status()
+{
+}
+
+Status::~Status()
{
}
@@ -348,18 +356,18 @@
e->addProperty("errorURL",eurl.get());
}
}
-
+
if (status) {
- auto_ptr_char sc(status->getStatusCode() ? status->getStatusCode()->getValue() : nullptr);
+ auto_ptr_char sc(status->getTopStatus());
if (sc.get() && *sc.get())
e->addProperty("statusCode", sc.get());
- if (status->getStatusCode()->getStatusCode()) {
- auto_ptr_char sc2(status->getStatusCode()->getStatusCode()->getValue());
+ if (status->getSubStatus()) {
+ auto_ptr_char sc2(status->getSubStatus());
if (sc2.get() && *sc.get())
e->addProperty("statusCode2", sc2.get());
}
- if (status->getStatusMessage()) {
- auto_ptr_char msg(status->getStatusMessage()->getMessage());
+ if (status->getMessage()) {
+ auto_ptr_char msg(status->getMessage());
if (msg.get() && *msg.get())
e->addProperty("statusMessage", msg.get());
}
Modified: branches/REL_2/saml/exceptions.h
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/exceptions.h?rev=700&r1=699&r2=700&view=diff
==============================================================================
--- branches/REL_2/saml/exceptions.h (original)
[... 178 lines stripped ...]
More information about the commits
mailing list