namespace {
+ vector<const Handler*> g_noHandlers;
+
// Application configuration wrapper
class XMLApplication : public virtual IApplication, public DOMPropertySet, public DOMNodeFilter
{
const Handler* getSessionInitiatorById(const char* id) const;
const Handler* getDefaultAssertionConsumerService() const;
const Handler* getAssertionConsumerServiceByIndex(unsigned short index) const;
- Iterator<const Handler*> getAssertionConsumerServicesByBinding(const XMLCh* binding) const;
+ const vector<const Handler*>& getAssertionConsumerServicesByBinding(const XMLCh* binding) const;
const Handler* getHandler(const char* path) const;
// Provides filter to exclude special config elements.
return m_base ? m_base->getAssertionConsumerServiceByIndex(index) : NULL;
}
-Iterator<const Handler*> XMLApplication::getAssertionConsumerServicesByBinding(const XMLCh* binding) const
+const vector<const Handler*>& XMLApplication::getAssertionConsumerServicesByBinding(const XMLCh* binding) const
{
#ifdef HAVE_GOOD_STL
ACSBindingMap::const_iterator i=m_acsBindingMap.find(binding);
#endif
if (i!=m_acsBindingMap.end())
return i->second;
- return m_base ? m_base->getAssertionConsumerServicesByBinding(binding) : EMPTY(const Handler*);
+ return m_base ? m_base->getAssertionConsumerServicesByBinding(binding) : g_noHandlers;
}
const Handler* XMLApplication::getHandler(const char* path) const
const xmltooling::TrustEngine* trust=NULL
) const=0;
- // Used to locate a default or designated session initiator for automatic sessions
- virtual const shibsp::Handler* getDefaultSessionInitiator() const=0;
- virtual const shibsp::Handler* getSessionInitiatorById(const char* id) const=0;
-
- // Used by session initiators to get endpoint to forward to IdP/WAYF
- virtual const shibsp::Handler* getDefaultAssertionConsumerService() const=0;
- virtual const shibsp::Handler* getAssertionConsumerServiceByIndex(unsigned short index) const=0;
- virtual saml::Iterator<const shibsp::Handler*> getAssertionConsumerServicesByBinding(const XMLCh* binding) const=0;
-
- // Used by dispatcher to locate the handler for a request
- virtual const shibsp::Handler* getHandler(const char* path) const=0;
-
virtual ~IApplication() {}
};
#include <xmltooling/security/TrustEngine.h>
namespace shibsp {
+
+ class SHIBSP_API Handler;
/**
* Interface to a Shibboleth Application instance.
* @param provider a peer entity's metadata
* @return the applicable PropertySet
*/
- virtual const shibsp::PropertySet* getCredentialUse(const opensaml::saml2md::EntityDescriptor* provider) const=0;
+ virtual const PropertySet* getCredentialUse(const opensaml::saml2md::EntityDescriptor* provider) const=0;
+
+ /**
+ * Returns the default SessionInitiator Handler when automatically
+ * requesting a session.
+ *
+ * @return the default SessionInitiator, or NULL
+ */
+ virtual const Handler* getDefaultSessionInitiator() const=0;
+
+ /**
+ * Returns a SessionInitiator Handler with a particular ID when automatically
+ * requesting a session.
+ *
+ * @param id an identifier unique to an application
+ * @return the designated SessionInitiator, or NULL
+ */
+ virtual const Handler* getSessionInitiatorById(const char* id) const=0;
+
+ /**
+ * Returns the default AssertionConsumerService Handler
+ * for use in AuthnRequest messages.
+ *
+ * @return the default AssertionConsumerService, or NULL
+ */
+ virtual const Handler* getDefaultAssertionConsumerService() const=0;
+
+ /**
+ * Returns an AssertionConsumerService Handler with a particular index
+ * for use in AuthnRequest messages.
+ *
+ * @param index an index unique to an application
+ * @return the designated AssertionConsumerService, or NULL
+ */
+ virtual const Handler* getAssertionConsumerServiceByIndex(unsigned short index) const=0;
+
+ /**
+ * Returns one or more AssertionConsumerService Handlers that support
+ * a particular protocol binding.
+ *
+ * @param binding a protocol binding identifier
+ * @return a set of qualifying AssertionConsumerServices
+ */
+ virtual const std::vector<const Handler*>& getAssertionConsumerServicesByBinding(const XMLCh* binding) const=0;
+
+ /**
+ * Returns the Handler associated with a particular path/location.
+ *
+ * @param path the PATH_INFO appended to the end of a base Handler location
+ * that invokes the Handler
+ * @return the mapped Handler, or NULL
+ */
+ virtual const Handler* getHandler(const char* path) const=0;
+
};
};