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,
#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
};
#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
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(
const Application& application,
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;
const char* loc = getString("Location").second;
return samlconstants::SAML11_PROTOCOL_ENUM;
}
+#ifndef SHIBSP_LITE
+ void generateMetadata(saml2md::SPSSODescriptor& role, const char* handlerURL) const {
+ doGenerateMetadata(role, handlerURL);
+ }
+#endif
+
private:
pair<bool,long> doRequest(
const Application& application,