[cpp-sp COMMIT] in /branches/REL_2: adfs/adfs.cpp shibsp/handler/SessionInitiator.h shibsp/handler/impl/ChainingSessi...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Jun 5 20:33:42 BST 2012
Author: scantor
Date: Tue Jun 5 20:33:42 2012
New Revision: 3692
URL: http://svn.shibboleth.net/view/cpp-sp?rev=3692&view=rev
Log:
https://issues.shibboleth.net/jira/browse/SSPCPP-445
Modified:
branches/REL_2/adfs/adfs.cpp
branches/REL_2/shibsp/handler/SessionInitiator.h
branches/REL_2/shibsp/handler/impl/ChainingSessionInitiator.cpp
branches/REL_2/shibsp/handler/impl/SAML2SessionInitiator.cpp
branches/REL_2/shibsp/handler/impl/SessionInitiator.cpp
branches/REL_2/shibsp/handler/impl/Shib1SessionInitiator.cpp
Modified: branches/REL_2/adfs/adfs.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/adfs/adfs.cpp?rev=3692&r1=3691&r2=3692&view=diff
==============================================================================
--- branches/REL_2/adfs/adfs.cpp (original)
+++ branches/REL_2/adfs/adfs.cpp Tue Jun 5 20:33:42 2012
@@ -154,6 +154,12 @@
return m_binding.get();
}
+#ifndef SHIBSP_LITE
+ void generateMetadata(saml2md::SPSSODescriptor& role, const char* handlerURL) const {
+ doGenerateMetadata(role, handlerURL);
+ }
+#endif
+
private:
pair<bool,long> doRequest(
const Application& application,
Modified: branches/REL_2/shibsp/handler/SessionInitiator.h
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/handler/SessionInitiator.h?rev=3692&r1=3691&r2=3692&view=diff
==============================================================================
--- branches/REL_2/shibsp/handler/SessionInitiator.h (original)
+++ branches/REL_2/shibsp/handler/SessionInitiator.h Tue Jun 5 20:33:42 2012
@@ -108,6 +108,15 @@
#ifndef SHIBSP_LITE
const char* getType() const;
void generateMetadata(opensaml::saml2md::SPSSODescriptor& role, const char* handlerURL) const;
+
+ /**
+ * Generates RequestInitiator metadata when instructed. Allows subclasses to decide whether it's
+ * appropriate to do so instead of requiring them to override the method to stop it.
+ *
+ * @param role role object to inject metadata into
+ * @param handlerURL base of endpoint to generate metadata with
+ */
+ void doGenerateMetadata(opensaml::saml2md::SPSSODescriptor& role, const char* handlerURL) const;
#endif
};
Modified: branches/REL_2/shibsp/handler/impl/ChainingSessionInitiator.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/handler/impl/ChainingSessionInitiator.cpp?rev=3692&r1=3691&r2=3692&view=diff
==============================================================================
--- branches/REL_2/shibsp/handler/impl/ChainingSessionInitiator.cpp (original)
+++ branches/REL_2/shibsp/handler/impl/ChainingSessionInitiator.cpp Tue Jun 5 20:33:42 2012
@@ -57,7 +57,7 @@
#ifndef SHIBSP_LITE
void generateMetadata(opensaml::saml2md::SPSSODescriptor& role, const char* handlerURL) const {
- SessionInitiator::generateMetadata(role, handlerURL);
+ doGenerateMetadata(role, handlerURL); // assumes all chains support the RequestInitiator protocol
for_each(m_handlers.begin(), m_handlers.end(), boost::bind(&SessionInitiator::generateMetadata, _1, boost::ref(role), handlerURL));
}
#endif
Modified: branches/REL_2/shibsp/handler/impl/SAML2SessionInitiator.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/handler/impl/SAML2SessionInitiator.cpp?rev=3692&r1=3691&r2=3692&view=diff
==============================================================================
--- branches/REL_2/shibsp/handler/impl/SAML2SessionInitiator.cpp (original)
+++ branches/REL_2/shibsp/handler/impl/SAML2SessionInitiator.cpp Tue Jun 5 20:33:42 2012
@@ -83,6 +83,12 @@
const XMLCh* getProtocolFamily() const {
return samlconstants::SAML20P_NS;
}
+
+#ifndef SHIBSP_LITE
+ void generateMetadata(saml2md::SPSSODescriptor& role, const char* handlerURL) const {
+ doGenerateMetadata(role, handlerURL);
+ }
+#endif
private:
pair<bool,long> doRequest(
Modified: branches/REL_2/shibsp/handler/impl/SessionInitiator.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/handler/impl/SessionInitiator.cpp?rev=3692&r1=3691&r2=3692&view=diff
==============================================================================
--- branches/REL_2/shibsp/handler/impl/SessionInitiator.cpp (original)
+++ branches/REL_2/shibsp/handler/impl/SessionInitiator.cpp Tue Jun 5 20:33:42 2012
@@ -81,6 +81,11 @@
}
void SessionInitiator::generateMetadata(SPSSODescriptor& role, const char* handlerURL) const
+{
+ // In case any plugins were directly calling this before, we stub it out.
+}
+
+void SessionInitiator::doGenerateMetadata(SPSSODescriptor& role, const char* handlerURL) const
{
if (getParent())
return;
Modified: branches/REL_2/shibsp/handler/impl/Shib1SessionInitiator.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/handler/impl/Shib1SessionInitiator.cpp?rev=3692&r1=3691&r2=3692&view=diff
[... 17 lines stripped ...]
More information about the commits
mailing list