-<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
-<?fileVersion 4.0.0?>\r
-\r
-<cproject>\r
+<?xml version="1.0" encoding="UTF-8"?><?fileVersion 4.0.0?><cproject>\r
<storageModule moduleId="org.eclipse.cdt.core.settings">\r
<cconfiguration id="converted.config.1630818620">\r
\r
</storageModule>\r
<storageModule moduleId="org.eclipse.cdt.core.pathentry">\r
<pathentry include="C:/Program Files/Microsoft Visual Studio 9.0/VC/include" kind="inc" path="" system="true"/>\r
-<pathentry include="C:/log4shib-1.0.2/include" kind="inc" path="" system="true"/>\r
+<pathentry include="C:/log4shib-1.0.3/include" kind="inc" path="" system="true"/>\r
<pathentry include="C:/xerces-c-3.0.1-x86-windows-vc-9.0/include" kind="inc" path="" system="true"/>\r
+<pathentry include="C:/xml-security-c-1.5.1/include" kind="inc" path="" system="true"/>\r
<pathentry base-path="cpp-xmltooling" include="" kind="inc" path="" system="true"/>\r
<pathentry base-path="cpp-opensaml2" include="" kind="inc" path="" system="true"/>\r
<pathentry base-path="cpp-sp" include="shibsp" kind="inc" path="" system="true"/>\r
# define ADFS_EXPORTS
#endif
-#include <memory>
-
#include <shibsp/base.h>
#include <shibsp/exceptions.h>
#include <shibsp/Application.h>
#include <shibsp/ServiceProvider.h>
#include <shibsp/SessionCache.h>
#include <shibsp/SPConfig.h>
+#include <shibsp/SPRequest.h>
#include <shibsp/handler/AssertionConsumerService.h>
#include <shibsp/handler/LogoutHandler.h>
#include <shibsp/handler/SessionInitiator.h>
#include <xmltooling/util/NDC.h>
#include <xmltooling/util/URLEncoder.h>
#include <xmltooling/util/XMLHelper.h>
-#include <xercesc/util/XMLUniDefs.hpp>
+#include <memory>
#ifndef SHIBSP_LITE
# include <shibsp/attribute/resolver/ResolutionContext.h>
# include <shibsp/metadata/MetadataProviderCriteria.h>
# include <saml/SAMLConfig.h>
+# include <saml/exceptions.h>
# include <saml/binding/SecurityPolicy.h>
# include <saml/saml1/core/Assertions.h>
# include <saml/saml2/core/Assertions.h>
using namespace xmltooling;
using namespace std;
+SPRequest::SPRequest()
+{
+}
+
+SPRequest::~SPRequest()
+{
+}
+
+string SPRequest::getSecureHeader(const char* name) const
+{
+ return getHeader(name);
+}
+
+void SPRequest::setAuthType(const char* authtype)
+{
+}
+
AbstractSPRequest::AbstractSPRequest(const char* category)
: m_sp(NULL), m_mapper(NULL), m_app(NULL), m_sessionTried(false), m_session(NULL),
m_log(&Category::getInstance(category)), m_parser(NULL)
delete m_parser;
}
+const ServiceProvider& AbstractSPRequest::getServiceProvider() const
+{
+ return *m_sp;
+}
+
RequestMapper::Settings AbstractSPRequest::getRequestSettings() const
{
if (!m_mapper) {
}
}
+const char* AbstractSPRequest::getRequestURI() const
+{
+ return m_uri.c_str();
+}
+
const char* AbstractSPRequest::getRequestURL() const
{
if (m_url.empty()) {
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public:
virtual ~AbstractSPRequest();
- const ServiceProvider& getServiceProvider() const {
- return *m_sp;
- }
-
+ const ServiceProvider& getServiceProvider() const;
RequestMapper::Settings getRequestSettings() const;
-
const Application& getApplication() const;
-
Session* getSession(bool checkTimeout=true, bool ignoreAddress=false, bool cache=true);
-
- const char* getRequestURI() const {
- return m_uri.c_str();
- }
-
+ const char* getRequestURI() const;
const char* getRequestURL() const;
-
std::string getRemoteAddr() const;
-
const char* getParameter(const char* name) const;
-
std::vector<const char*>::size_type getParameters(const char* name, std::vector<const char*>& values) const;
-
const char* getHandlerURL(const char* resource=NULL) const;
-
void log(SPLogLevel level, const std::string& msg) const;
-
bool isPriorityEnabled(SPLogLevel level) const;
private:
{
MAKE_NONCOPYABLE(AccessControl);
protected:
- AccessControl() {}
+ AccessControl();
public:
- virtual ~AccessControl() {}
+ virtual ~AccessControl();
/**
* Possible results from an access control decision.
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "remoting/ListenerService.h"
#include <algorithm>
+#include <xmltooling/util/Threads.h>
using namespace shibsp;
using namespace xmltooling;
delete m_lock;
}
+const ServiceProvider& Application::getServiceProvider() const
+{
+ return *m_sp;
+}
+
+const char* Application::getId() const
+{
+ return getString("id").second;
+}
+
pair<string,const char*> Application::getCookieNameProps(const char* prefix, time_t* lifetime) const
{
static const char* defProps="; path=/";
#include <shibsp/util/PropertySet.h>
-#include <set>
+#include <string>
+#include <vector>
#ifndef SHIBSP_LITE
# include <saml/binding/MessageEncoder.h>
-# include <saml/saml2/metadata/MetadataProvider.h>
-# include <xmltooling/security/CredentialResolver.h>
-# include <xmltooling/security/TrustEngine.h>
#endif
-#include <xmltooling/io/HTTPRequest.h>
-#include <xmltooling/util/Threads.h>
+
+namespace xmltooling {
+ class XMLTOOL_API CredentialResolver;
+ class XMLTOOL_API RWLock;
+ class XMLTOOL_API SOAPTransport;
+ class XMLTOOL_API StorageService;
+ class XMLTOOL_API TrustEngine;
+};
+
+#ifndef SHIBSP_LITE
+namespace opensaml {
+ class SAML_API SecurityPolicyRule;
+ namespace saml2md {
+ class SAML_API MetadataProvider;
+ };
+};
+#endif
namespace shibsp {
*
* @return a locked ServiceProvider
*/
- const ServiceProvider& getServiceProvider() const {
- return *m_sp;
- }
+ const ServiceProvider& getServiceProvider() const;
/**
* Returns the Application's ID.
*
* @return the ID
*/
- virtual const char* getId() const {
- return getString("id").second;
- }
+ virtual const char* getId() const;
/**
* Returns a unique hash for the Application.
SPConfig.cpp \
attribute/Attribute.cpp \
attribute/ExtensibleAttribute.cpp \
+ attribute/NameIDAttribute.cpp \
+ attribute/SimpleAttribute.cpp \
+ attribute/ScopedAttribute.cpp \
+ attribute/XMLAttribute.cpp \
handler/impl/AbstractHandler.cpp \
handler/impl/AssertionConsumerService.cpp \
handler/impl/AssertionLookup.cpp \
attribute/filtering/impl/AttributeFilter.cpp \
attribute/filtering/impl/ChainingAttributeFilter.cpp \
attribute/filtering/impl/XMLAttributeFilter.cpp \
+ attribute/filtering/impl/BasicFilteringContext.cpp \
attribute/filtering/impl/MatchFunctor.cpp \
attribute/filtering/impl/AndMatchFunctor.cpp \
attribute/filtering/impl/AnyMatchFunctor.cpp \
metadata/DynamicMetadataProvider.cpp \
metadata/MetadataExtImpl.cpp \
metadata/MetadataExtSchemaValidators.cpp \
+ metadata/MetadataProviderCriteria.cpp \
security/PKIXTrustEngine.cpp \
security/SecurityPolicy.cpp
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <shibsp/base.h>
#include <xmltooling/Lockable.h>
-#include <xmltooling/io/HTTPRequest.h>
+
+namespace xmltooling {
+ class XMLTOOL_API HTTPRequest;
+};
namespace shibsp {
{
MAKE_NONCOPYABLE(RequestMapper);
protected:
- RequestMapper() {}
+ RequestMapper();
public:
- virtual ~RequestMapper() {}
+ virtual ~RequestMapper();
/** Combination of configuration settings and effective access control. */
typedef std::pair<const PropertySet*,AccessControl*> Settings;
#define __shibsp_config_h__
#include <shibsp/base.h>
+
#ifndef SHIBSP_LITE
# include <saml/binding/MessageDecoder.h>
+# include <saml/binding/MessageEncoder.h>
#endif
#include <xmltooling/PluginManager.h>
#include <xmltooling/QName.h>
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* @file shibsp/SPRequest.h
*
- * Interface to server request being processed
+ * Interface to server request being processed.
*/
#ifndef __shibsp_req_h__
class SHIBSP_API SPRequest : public virtual xmltooling::HTTPRequest, public virtual xmltooling::HTTPResponse
{
protected:
- SPRequest() {}
+ SPRequest();
public:
- virtual ~SPRequest() {}
+ virtual ~SPRequest();
/**
* Returns the locked ServiceProvider processing the request.
* @param name the name of the secure header to return
* @return the header's value, or an empty string
*/
- virtual std::string getSecureHeader(const char* name) const {
- return getHeader(name);
- }
+ virtual std::string getSecureHeader(const char* name) const;
/**
* Ensures no value exists for a request header.
*
* @param authtype AUTH_TYPE value to set or NULL to clear
*/
- virtual void setAuthType(const char* authtype) {
- }
+ virtual void setAuthType(const char* authtype);
/** Portable logging levels. */
enum SPLogLevel {
#include <fstream>
#include <sstream>
+#ifndef SHIBSP_LITE
+# include <saml/exceptions.h>
+# include <saml/saml2/metadata/MetadataProvider.h>
+#endif
#include <xmltooling/XMLToolingConfig.h>
#include <xmltooling/util/NDC.h>
#include <xmltooling/util/PathResolver.h>
SPConfig::getConfig().ServiceProviderManager.registerFactory(XML_SERVICE_PROVIDER, XMLServiceProviderFactory);
}
+ServiceProvider::ServiceProvider()
+{
+}
+
+ServiceProvider::~ServiceProvider()
+{
+}
+
pair<bool,long> ServiceProvider::doAuthentication(SPRequest& request, bool handler) const
{
#ifdef _DEBUG
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#define __shibsp_sp_h__
#include <shibsp/util/PropertySet.h>
+
+#include <xmltooling/Lockable.h>
+
+namespace xmltooling {
+ class XMLTOOL_API SOAPTransport;
+ class XMLTOOL_API StorageService;
+};
+
#ifndef SHIBSP_LITE
-# include <saml/binding/SecurityPolicyRule.h>
-# include <xmltooling/soap/SOAPTransport.h>
-# include <xmltooling/util/StorageService.h>
+namespace opensaml {
+ class SAML_API SecurityPolicyRule;
+};
#endif
-#include <xmltooling/Lockable.h>
namespace shibsp {
{
MAKE_NONCOPYABLE(ServiceProvider);
protected:
- ServiceProvider() {}
+ ServiceProvider();
public:
- virtual ~ServiceProvider() {}
+ virtual ~ServiceProvider();
/**
* Loads a configuration and prepares the instance for use.
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* @file shibsp/SessionCache.h
*
- * Caches and manages user sessions
+ * Caches and manages user sessions.
*/
#ifndef __shibsp_sessioncache_h__
#define __shibsp_sessioncache_h__
#include <shibsp/base.h>
+
+#include <vector>
+#include <xmltooling/Lockable.h>
+
+namespace xmltooling {
+ class XMLTOOL_API HTTPRequest;
+ class XMLTOOL_API HTTPResponse;
+};
+
#ifndef SHIBSP_LITE
-# include <saml/saml1/core/Assertions.h>
-# include <saml/saml2/metadata/Metadata.h>
+# include <set>
+namespace opensaml {
+ class SAML_API Assertion;
+ namespace saml2 {
+ class SAML_API NameID;
+ };
+};
#endif
-#include <xmltooling/Lockable.h>
-#include <xmltooling/io/HTTPRequest.h>
-#include <xmltooling/io/HTTPResponse.h>
namespace shibsp {
{
MAKE_NONCOPYABLE(Session);
protected:
- Session() {}
- virtual ~Session() {}
+ Session();
+ virtual ~Session();
public:
/**
* Returns the session key.
{
MAKE_NONCOPYABLE(SessionCache);
protected:
- SessionCache() {}
+ SessionCache();
public:
- virtual ~SessionCache() {}
+ virtual ~SessionCache();
#ifndef SHIBSP_LITE
/**
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
class SHIBSP_API SessionCacheEx : public SessionCache
{
protected:
- SessionCacheEx() {}
+ SessionCacheEx();
public:
- virtual ~SessionCacheEx() {}
+ virtual ~SessionCacheEx();
#ifndef SHIBSP_LITE
/**
*/
#include "internal.h"
+#include "exceptions.h"
#include "SPConfig.h"
#ifndef SHIBSP_LITE
# include "attribute/AttributeDecoder.h"
#include "attribute/XMLAttribute.h"
#include "util/SPConstants.h"
-#include <xercesc/util/Base64.hpp>
#include <xercesc/util/XMLUniDefs.hpp>
-#ifndef SHIBSP_LITE
-# include <xsec/framework/XSECDefs.hpp>
-#endif
-
using namespace shibsp;
using namespace xmltooling;
using namespace std;
namespace shibsp {
-
- SHIBSP_DLLLOCAL Attribute* SimpleAttributeFactory(DDF& in) {
- return new SimpleAttribute(in);
- }
-
- SHIBSP_DLLLOCAL Attribute* ScopedAttributeFactory(DDF& in) {
- return new ScopedAttribute(in);
- }
-
- SHIBSP_DLLLOCAL Attribute* NameIDAttributeFactory(DDF& in) {
- return new NameIDAttribute(in);
- }
-
- SHIBSP_DLLLOCAL Attribute* ExtensibleAttributeFactory(DDF& in) {
- return new ExtensibleAttribute(in);
- }
-
- SHIBSP_DLLLOCAL Attribute* XMLAttributeFactory(DDF& in) {
- return new XMLAttribute(in);
- }
+ SHIBSP_DLLLOCAL Attribute* SimpleAttributeFactory(DDF& in);
+ SHIBSP_DLLLOCAL Attribute* ScopedAttributeFactory(DDF& in);
+ SHIBSP_DLLLOCAL Attribute* NameIDAttributeFactory(DDF& in);
+ SHIBSP_DLLLOCAL Attribute* ExtensibleAttributeFactory(DDF& in);
+ SHIBSP_DLLLOCAL Attribute* XMLAttributeFactory(DDF& in);
#ifndef SHIBSP_LITE
SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,xmltooling::QName,const DOMElement*>::Factory StringAttributeDecoderFactory;
m_internal = true;
}
}
+
+AttributeDecoder::~AttributeDecoder()
+{
+}
+
+Attribute* AttributeDecoder::_decode(Attribute* attr) const
+{
+ attr->setCaseSensitive(m_caseSensitive);
+ attr->setInternal(m_internal);
+ return attr;
+}
#endif
void shibsp::registerAttributeFactories()
map<string,Attribute::AttributeFactory*> Attribute::m_factoryMap;
+void Attribute::registerFactory(const char* type, AttributeFactory* factory)
+{
+ m_factoryMap[type] = factory;
+}
+
+void Attribute::deregisterFactory(const char* type)
+{
+ m_factoryMap.erase(type);
+}
+
+void Attribute::deregisterFactories()
+{
+ m_factoryMap.clear();
+}
+
Attribute::Attribute(DDF& in) : m_caseSensitive(in["case_insensitive"].isnull()), m_internal(!in["internal"].isnull())
{
const char* id = in.first().name();
}
}
+Attribute::~Attribute()
+{
+}
+
+const char* Attribute::getId() const
+{
+ return m_id.front().c_str();
+}
+
+const vector<string>& Attribute::getAliases() const
+{
+ return m_id;
+}
+
+vector<string>& Attribute::getAliases()
+{
+ return m_id;
+}
+
+void Attribute::setCaseSensitive(bool caseSensitive)
+{
+ m_caseSensitive = caseSensitive;
+}
+
+void Attribute::setInternal(bool internal)
+{
+ m_internal = internal;
+}
+
+bool Attribute::isCaseSensitive() const
+{
+ return m_caseSensitive;
+}
+
+bool Attribute::isInternal() const
+{
+ return m_internal;
+}
+
+size_t Attribute::valueCount() const
+{
+ return m_serialized.size();
+}
+
+const vector<string>& Attribute::getSerializedValues() const
+{
+ return m_serialized;
+}
+
+const char* Attribute::getString(size_t index) const
+{
+ return m_serialized[index].c_str();
+}
+
+const char* Attribute::getScope(size_t index) const
+{
+ return NULL;
+}
+
+void Attribute::removeValue(size_t index)
+{
+ if (index < m_serialized.size())
+ m_serialized.erase(m_serialized.begin() + index);
+}
+
DDF Attribute::marshall() const
{
DDF ddf(NULL);
throw AttributeException("No registered factory for Attribute of type ($1).", params(1,in.name()));
return (i->second)(in);
}
-
-const vector<string>& XMLAttribute::getSerializedValues() const
-{
- xsecsize_t len;
- XMLByte *pos, *pos2;
- if (m_serialized.empty()) {
- for (vector<string>::const_iterator i=m_values.begin(); i!=m_values.end(); ++i) {
- XMLByte* enc = Base64::encode(reinterpret_cast<const XMLByte*>(i->data()), i->size(), &len);
- if (enc) {
- for (pos=enc, pos2=enc; *pos2; pos2++)
- if (isgraph(*pos2))
- *pos++=*pos2;
- *pos=0;
- m_serialized.push_back(reinterpret_cast<char*>(enc));
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
- XMLString::release(&enc);
-#else
- XMLString::release((char**)&enc);
-#endif
- }
- }
- }
- return Attribute::getSerializedValues();
-}
#ifndef __shibsp_attribute_h__
#define __shibsp_attribute_h__
-#include <shibsp/exceptions.h>
#include <shibsp/remoting/ddf.h>
#include <map>
mutable std::vector<std::string> m_serialized;
public:
- virtual ~Attribute() {}
+ virtual ~Attribute();
/**
* Returns the Attribute identifier.
*
* @return the Attribute identifier
*/
- const char* getId() const {
- return m_id.front().c_str();
- }
+ const char* getId() const;
/**
* Returns all of the effective names for the Attribute.
*
* @return immutable array of identifiers, with the primary ID in the first position
*/
- const std::vector<std::string>& getAliases() const {
- return m_id;
- }
+ const std::vector<std::string>& getAliases() const;
/**
* Returns all of the effective names for the Attribute.
*
* @return mutable array of identifiers, with the primary ID in the first position
*/
- std::vector<std::string>& getAliases() {
- return m_id;
- }
+ std::vector<std::string>& getAliases();
/**
* Sets whether case sensitivity should apply to basic value comparisons.
*
* @param caseSensitive true iff value comparisons should be case sensitive
*/
- void setCaseSensitive(bool caseSensitive) {
- m_caseSensitive = caseSensitive;
- }
+ void setCaseSensitive(bool caseSensitive);
/**
* Sets whether the attribute should be exported for CGI use.
*
* @param export true iff the attribute should <strong>NOT</strong> be exported
*/
- void setInternal(bool internal) {
- m_internal = internal;
- }
+ void setInternal(bool internal);
/**
* Indicates whether case sensitivity should apply to basic value comparisons.
*
* @return true iff value comparisons should be case sensitive
*/
- bool isCaseSensitive() const {
- return m_caseSensitive;
- }
+ bool isCaseSensitive() const;
/**
* Indicates whether the attribute should be exported for CGI use.
*
* @return true iff the attribute should <strong>NOT</strong> be exported
*/
- bool isInternal() const {
- return m_internal;
- }
+ bool isInternal() const;
/**
* Returns the number of values.
*
* @return number of values
*/
- virtual size_t valueCount() const {
- return m_serialized.size();
- }
+ virtual size_t valueCount() const;
/**
* Returns serialized Attribute values encoded as UTF-8 strings.
*
* @return an immutable vector of values
*/
- virtual const std::vector<std::string>& getSerializedValues() const {
- return m_serialized;
- }
+ virtual const std::vector<std::string>& getSerializedValues() const;
/**
* Informs the Attribute that values have changed and any serializations
* @param index position of value
* @return the specified value in its "string" form, or NULL if undefined
*/
- virtual const char* getString(size_t index) const {
- return m_serialized[index].c_str();
- }
+ virtual const char* getString(size_t index) const;
/**
* Gets the "scope" of the value at the specified position (starting from zero).
* @param index position of value
* @return the specified value's "scope", or NULL if attribute is unscoped
*/
- virtual const char* getScope(size_t index) const {
- return NULL;
- }
+ virtual const char* getScope(size_t index) const;
/**
* Removes the value at the specified position (starting from zero).
*
* @param index position of value to remove
*/
- virtual void removeValue(size_t index) {
- if (index < m_serialized.size())
- m_serialized.erase(m_serialized.begin() + index);
- }
+ virtual void removeValue(size_t index);
/**
* Marshalls an Attribute for remoting.
* @param type string used at the root of remoted Attribute structures
* @param factory factory function
*/
- static void registerFactory(const char* type, AttributeFactory* factory) {
- m_factoryMap[type] = factory;
- }
+ static void registerFactory(const char* type, AttributeFactory* factory);
/**
* Deregisters an AttributeFactory function for a given attribute "type".
*
* @param type string used at the root of remoted Attribute structures
*/
- static void deregisterFactory(const char* type) {
- m_factoryMap.erase(type);
- }
+ static void deregisterFactory(const char* type);
/**
* Clears the map of factories.
*/
- static void deregisterFactories() {
- m_factoryMap.clear();
- }
+ static void deregisterFactories();
private:
static std::map<std::string,AttributeFactory*> m_factoryMap;
#ifndef __shibsp_attrdecoder_h__
#define __shibsp_attrdecoder_h__
-#include <shibsp/attribute/Attribute.h>
-#include <xmltooling/XMLObject.h>
+#include <shibsp/base.h>
+
+#include <string>
+#include <vector>
+
+namespace xmltooling {
+ class XMLTOOL_API QName;
+ class XMLTOOL_API XMLObject;
+};
namespace shibsp {
+ class SHIBSP_API Attribute;
+
/**
* Decodes XML objects into resolved Attributes.
*/
* @param attr the new Attribute object being created
* @return the attr parameter
*/
- virtual Attribute* _decode(Attribute* attr) const {
- attr->setCaseSensitive(m_caseSensitive);
- attr->setInternal(m_internal);
- return attr;
- }
+ virtual Attribute* _decode(Attribute* attr) const;
public:
- virtual ~AttributeDecoder() {}
+ virtual ~AttributeDecoder();
/**
* Decodes an XMLObject into a resolved Attribute.
using namespace xmltooling;
using namespace std;
+namespace shibsp {
+ SHIBSP_DLLLOCAL Attribute* ExtensibleAttributeFactory(DDF& in) {
+ return new ExtensibleAttribute(in);
+ }
+};
+
+ExtensibleAttribute::ExtensibleAttribute(const vector<string>& ids, const char* formatter) : Attribute(ids)
+{
+ m_obj = Attribute::marshall();
+ m_obj.name("Extensible");
+ m_obj.addmember("_formatter").string(formatter);
+}
+
+ExtensibleAttribute::ExtensibleAttribute(DDF& in) : Attribute(in), m_obj(in.copy())
+{
+}
+
+ExtensibleAttribute::~ExtensibleAttribute()
+{
+ m_obj.destroy();
+}
+
+DDF ExtensibleAttribute::getValues()
+{
+ return m_obj.first();
+}
+
+size_t ExtensibleAttribute::valueCount() const
+{
+ return m_obj.first().integer();
+}
+
+void ExtensibleAttribute::clearSerializedValues()
+{
+ m_serialized.clear();
+}
+
+const char* ExtensibleAttribute::getString(size_t index) const
+{
+ return m_obj.first()[static_cast<unsigned long>(index)].string();
+}
+
+const char* ExtensibleAttribute::getScope(size_t index) const
+{
+ return NULL;
+}
+
+void ExtensibleAttribute::removeValue(size_t index)
+{
+ Attribute::removeValue(index);
+ DDF vals = m_obj.first();
+ if (index < static_cast<size_t>(vals.integer()))
+ vals[static_cast<unsigned long>(index)].remove().destroy();
+}
+
const vector<string>& ExtensibleAttribute::getSerializedValues() const
{
if (m_serialized.empty()) {
}
return Attribute::getSerializedValues();
}
+
+DDF ExtensibleAttribute::marshall() const
+{
+ if (!isCaseSensitive())
+ m_obj.addmember("case_insensitive");
+ if (isInternal())
+ m_obj.addmember("internal");
+ return m_obj.copy();
+}
#define __shibsp_extattr_h__
#include <shibsp/attribute/Attribute.h>
-#include <xmltooling/exceptions.h>
namespace shibsp {
* @param ids array with primary identifier in first position, followed by any aliases
* @param formatter template for serialization of values
*/
- ExtensibleAttribute(const std::vector<std::string>& ids, const char* formatter) : Attribute(ids) {
- m_obj = Attribute::marshall();
- m_obj.name("Extensible");
- m_obj.addmember("_formatter").string(formatter);
- }
+ ExtensibleAttribute(const std::vector<std::string>& ids, const char* formatter);
/**
* Constructs based on a remoted ExtensibleAttribute.
*
* @param in input object containing marshalled ExtensibleAttribute
*/
- ExtensibleAttribute(DDF& in) : Attribute(in), m_obj(in.copy()) {
- }
+ ExtensibleAttribute(DDF& in);
- virtual ~ExtensibleAttribute() {
- m_obj.destroy();
- }
+ virtual ~ExtensibleAttribute();
/**
* Returns the set of values in a DDF list.
*
* @return a mutable list object containing the values
*/
- DDF getValues() {
- return m_obj.first();
- }
-
- size_t valueCount() const {
- return m_obj.first().integer();
- }
-
- void clearSerializedValues() {
- m_serialized.clear();
- }
-
- const char* getString(size_t index) const {
- return m_obj.first()[static_cast<unsigned long>(index)].string();
- }
-
- const char* getScope(size_t index) const {
- return NULL;
- }
-
- void removeValue(size_t index) {
- Attribute::removeValue(index);
- DDF vals = m_obj.first();
- if (index < static_cast<size_t>(vals.integer()))
- vals[static_cast<unsigned long>(index)].remove().destroy();
- }
-
+ DDF getValues();
+
+ // Virtual function overrides.
+ size_t valueCount() const;
+ void clearSerializedValues();
+ const char* getString(size_t index) const;
+ const char* getScope(size_t index) const;
+ void removeValue(size_t index);
const std::vector<std::string>& getSerializedValues() const;
-
- DDF marshall() const {
- if (!isCaseSensitive())
- m_obj.addmember("case_insensitive");
- if (isInternal())
- m_obj.addmember("internal");
- return m_obj.copy();
- }
+ DDF marshall() const;
private:
mutable DDF m_obj;
--- /dev/null
+/*
+ * Copyright 2009 Internet2
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * NameIDAttribute.cpp
+ *
+ * An Attribute whose values are derived from or mappable to a SAML NameID.
+ */
+
+#include "internal.h"
+#include "attribute/NameIDAttribute.h"
+
+#include <xmltooling/exceptions.h>
+
+using namespace shibsp;
+using namespace xmltooling;
+using namespace std;
+
+namespace shibsp {
+ SHIBSP_DLLLOCAL Attribute* NameIDAttributeFactory(DDF& in) {
+ return new NameIDAttribute(in);
+ }
+};
+
+NameIDAttribute::NameIDAttribute(const vector<string>& ids, const char* formatter) : Attribute(ids), m_formatter(formatter)
+{
+}
+
+NameIDAttribute::NameIDAttribute(DDF& in) : Attribute(in)
+{
+ DDF val = in["_formatter"];
+ if (val.isstring())
+ m_formatter = val.string();
+ else
+ m_formatter = DEFAULT_NAMEID_FORMATTER;
+ const char* pch;
+ val = in.first().first();
+ while (val.name()) {
+ m_values.push_back(Value());
+ Value& v = m_values.back();
+ v.m_Name = val.name();
+ pch = val["Format"].string();
+ if (pch)
+ v.m_Format = pch;
+ pch = val["NameQualifier"].string();
+ if (pch)
+ v.m_NameQualifier = pch;
+ pch = val["SPNameQualifier"].string();
+ if (pch)
+ v.m_SPNameQualifier = pch;
+ pch = val["SPProvidedID"].string();
+ if (pch)
+ v.m_SPProvidedID = pch;
+ val = in.first().next();
+ }
+}
+
+NameIDAttribute::~NameIDAttribute()
+{
+}
+
+vector<NameIDAttribute::Value>& NameIDAttribute::getValues()
+{
+ return m_values;
+}
+
+const vector<NameIDAttribute::Value>& NameIDAttribute::getValues() const
+{
+ return m_values;
+}
+
+size_t NameIDAttribute::valueCount() const
+{
+ return m_values.size();
+}
+
+void NameIDAttribute::clearSerializedValues()
+{
+ m_serialized.clear();
+}
+
+const char* NameIDAttribute::getString(size_t index) const
+{
+ return m_values[index].m_Name.c_str();
+}
+
+const char* NameIDAttribute::getScope(size_t index) const
+{
+ return m_values[index].m_NameQualifier.c_str();
+}
+
+void NameIDAttribute::removeValue(size_t index)
+{
+ Attribute::removeValue(index);
+ if (index < m_values.size())
+ m_values.erase(m_values.begin() + index);
+}
+
+const vector<string>& NameIDAttribute::getSerializedValues() const
+{
+ if (m_serialized.empty()) {
+ for (vector<Value>::const_iterator i=m_values.begin(); i!=m_values.end(); ++i) {
+ // This is kind of a hack, but it's a good way to reuse some code.
+ XMLToolingException e(
+ m_formatter,
+ namedparams(
+ 5,
+ "Name", i->m_Name.c_str(),
+ "Format", i->m_Format.c_str(),
+ "NameQualifier", i->m_NameQualifier.c_str(),
+ "SPNameQualifier", i->m_SPNameQualifier.c_str(),
+ "SPProvidedID", i->m_SPProvidedID.c_str()
+ )
+ );
+ m_serialized.push_back(e.what());
+ }
+ }
+ return Attribute::getSerializedValues();
+}
+
+DDF NameIDAttribute::marshall() const
+{
+ DDF ddf = Attribute::marshall();
+ ddf.name("NameID");
+ ddf.addmember("_formatter").string(m_formatter.c_str());
+ DDF vlist = ddf.first();
+ for (vector<Value>::const_iterator i=m_values.begin(); i!=m_values.end(); ++i) {
+ DDF val = DDF(i->m_Name.c_str()).structure();
+ if (!i->m_Format.empty())
+ val.addmember("Format").string(i->m_Format.c_str());
+ if (!i->m_NameQualifier.empty())
+ val.addmember("NameQualifier").string(i->m_NameQualifier.c_str());
+ if (!i->m_SPNameQualifier.empty())
+ val.addmember("SPNameQualifier").string(i->m_SPNameQualifier.c_str());
+ if (!i->m_SPProvidedID.empty())
+ val.addmember("SPProvidedID").string(i->m_SPProvidedID.c_str());
+ vlist.add(val);
+ }
+ return ddf;
+}
#define __shibsp_nameidattr_h__
#include <shibsp/attribute/Attribute.h>
-#include <xmltooling/exceptions.h>
namespace shibsp {
* @param ids array with primary identifier in first position, followed by any aliases
* @param formatter template for serialization of tuple
*/
- NameIDAttribute(const std::vector<std::string>& ids, const char* formatter=DEFAULT_NAMEID_FORMATTER)
- : Attribute(ids), m_formatter(formatter) {
- }
+ NameIDAttribute(const std::vector<std::string>& ids, const char* formatter=DEFAULT_NAMEID_FORMATTER);
/**
* Constructs based on a remoted NameIDAttribute.
*
* @param in input object containing marshalled NameIDAttribute
*/
- NameIDAttribute(DDF& in) : Attribute(in) {
- DDF val = in["_formatter"];
- if (val.isstring())
- m_formatter = val.string();
- else
- m_formatter = DEFAULT_NAMEID_FORMATTER;
- const char* pch;
- val = in.first().first();
- while (val.name()) {
- m_values.push_back(Value());
- Value& v = m_values.back();
- v.m_Name = val.name();
- pch = val["Format"].string();
- if (pch)
- v.m_Format = pch;
- pch = val["NameQualifier"].string();
- if (pch)
- v.m_NameQualifier = pch;
- pch = val["SPNameQualifier"].string();
- if (pch)
- v.m_SPNameQualifier = pch;
- pch = val["SPProvidedID"].string();
- if (pch)
- v.m_SPProvidedID = pch;
- val = in.first().next();
- }
- }
+ NameIDAttribute(DDF& in);
- virtual ~NameIDAttribute() {}
+ virtual ~NameIDAttribute();
/**
* Holds all the fields associated with a NameID.
*
* @return a mutable vector of the values
*/
- std::vector<Value>& getValues() {
- return m_values;
- }
+ std::vector<Value>& getValues();
/**
* Returns the set of values encoded as UTF-8 strings.
*
* @return an immutable vector of the values
*/
- const std::vector<Value>& getValues() const {
- return m_values;
- }
-
- size_t valueCount() const {
- return m_values.size();
- }
-
- void clearSerializedValues() {
- m_serialized.clear();
- }
-
- const char* getString(size_t index) const {
- return m_values[index].m_Name.c_str();
- }
-
- const char* getScope(size_t index) const {
- return m_values[index].m_NameQualifier.c_str();
- }
-
- void removeValue(size_t index) {
- Attribute::removeValue(index);
- if (index < m_values.size())
- m_values.erase(m_values.begin() + index);
- }
-
- const std::vector<std::string>& getSerializedValues() const {
- if (m_serialized.empty()) {
- for (std::vector<Value>::const_iterator i=m_values.begin(); i!=m_values.end(); ++i) {
- // This is kind of a hack, but it's a good way to reuse some code.
- xmltooling::XMLToolingException e(
- m_formatter,
- xmltooling::namedparams(
- 5,
- "Name", i->m_Name.c_str(),
- "Format", i->m_Format.c_str(),
- "NameQualifier", i->m_NameQualifier.c_str(),
- "SPNameQualifier", i->m_SPNameQualifier.c_str(),
- "SPProvidedID", i->m_SPProvidedID.c_str()
- )
- );
- m_serialized.push_back(e.what());
- }
- }
- return Attribute::getSerializedValues();
- }
-
- DDF marshall() const {
- DDF ddf = Attribute::marshall();
- ddf.name("NameID");
- ddf.addmember("_formatter").string(m_formatter.c_str());
- DDF vlist = ddf.first();
- for (std::vector<Value>::const_iterator i=m_values.begin(); i!=m_values.end(); ++i) {
- DDF val = DDF(i->m_Name.c_str()).structure();
- if (!i->m_Format.empty())
- val.addmember("Format").string(i->m_Format.c_str());
- if (!i->m_NameQualifier.empty())
- val.addmember("NameQualifier").string(i->m_NameQualifier.c_str());
- if (!i->m_SPNameQualifier.empty())
- val.addmember("SPNameQualifier").string(i->m_SPNameQualifier.c_str());
- if (!i->m_SPProvidedID.empty())
- val.addmember("SPProvidedID").string(i->m_SPProvidedID.c_str());
- vlist.add(val);
- }
- return ddf;
- }
+ const std::vector<Value>& getValues() const;
+
+ // Virtual function overrides.
+ size_t valueCount() const;
+ void clearSerializedValues();
+ const char* getString(size_t index) const;
+ const char* getScope(size_t index) const;
+ void removeValue(size_t index);
+ const std::vector<std::string>& getSerializedValues() const;
+ DDF marshall() const;
private:
std::vector<Value> m_values;
--- /dev/null
+/*
+ * Copyright 2009 Internet2
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * ScopedAttribute.cpp
+ *
+ * An Attribute whose values are relations of a value and a scope.
+ */
+
+#include "internal.h"
+#include "attribute/ScopedAttribute.h"
+
+using namespace shibsp;
+using namespace std;
+
+namespace shibsp {
+ SHIBSP_DLLLOCAL Attribute* ScopedAttributeFactory(DDF& in) {
+ return new ScopedAttribute(in);
+ }
+};
+
+ScopedAttribute::ScopedAttribute(const vector<string>& ids, char delimeter) : Attribute(ids), m_delimeter(delimeter)
+{
+}
+
+ScopedAttribute::ScopedAttribute(DDF& in) : Attribute(in), m_delimeter('@')
+{
+ DDF val = in["_delimeter"];
+ if (val.isint())
+ m_delimeter = static_cast<char>(val.integer());
+ val = in.first().first();
+ while (val.name() && val.string()) {
+ m_values.push_back(make_pair(string(val.name()), string(val.string())));
+ val = in.first().next();
+ }
+}
+
+ScopedAttribute::~ScopedAttribute()
+{
+}
+
+vector< pair<string,string> >& ScopedAttribute::getValues()
+{
+ return m_values;
+}
+
+const vector< pair<string,string> >& ScopedAttribute::getValues() const
+{
+ return m_values;
+}
+
+size_t ScopedAttribute::valueCount() const
+{
+ return m_values.size();
+}
+
+void ScopedAttribute::clearSerializedValues()
+{
+ m_serialized.clear();
+}
+
+const char* ScopedAttribute::getString(size_t index) const
+{
+ return m_values[index].first.c_str();
+}
+
+const char* ScopedAttribute::getScope(size_t index) const
+{
+ return m_values[index].second.c_str();
+}
+
+void ScopedAttribute::removeValue(size_t index)
+{
+ Attribute::removeValue(index);
+ if (index < m_values.size())
+ m_values.erase(m_values.begin() + index);
+}
+
+const vector<string>& ScopedAttribute::getSerializedValues() const
+{
+ if (m_serialized.empty()) {
+ for (vector< pair<string,string> >::const_iterator i=m_values.begin(); i!=m_values.end(); ++i)
+ m_serialized.push_back(i->first + m_delimeter + i->second);
+ }
+ return Attribute::getSerializedValues();
+}
+
+DDF ScopedAttribute::marshall() const
+{
+ DDF ddf = Attribute::marshall();
+ ddf.name("Scoped");
+ if (m_delimeter != '@')
+ ddf.addmember("_delimeter").integer(m_delimeter);
+ DDF vlist = ddf.first();
+ for (vector< pair<string,string> >::const_iterator i=m_values.begin(); i!=m_values.end(); ++i) {
+ DDF val = DDF(i->first.c_str()).string(i->second.c_str());
+ vlist.add(val);
+ }
+ return ddf;
+}
* @param ids array with primary identifier in first position, followed by any aliases
* @param delimeter value/scope delimeter when serializing
*/
- ScopedAttribute(const std::vector<std::string>& ids, char delimeter='@')
- : Attribute(ids), m_delimeter(delimeter) {
- }
+ ScopedAttribute(const std::vector<std::string>& ids, char delimeter='@');
/**
* Constructs based on a remoted ScopedAttribute.
*
* @param in input object containing marshalled ScopedAttribute
*/
- ScopedAttribute(DDF& in) : Attribute(in), m_delimeter('@') {
- DDF val = in["_delimeter"];
- if (val.isint())
- m_delimeter = static_cast<char>(val.integer());
- val = in.first().first();
- while (val.name() && val.string()) {
- m_values.push_back(std::make_pair(std::string(val.name()), std::string(val.string())));
- val = in.first().next();
- }
- }
+ ScopedAttribute(DDF& in);
- virtual ~ScopedAttribute() {}
+ virtual ~ScopedAttribute();
/**
* Returns the set of values encoded as UTF-8 strings.
*
* @return a mutable vector of the values
*/
- std::vector< std::pair<std::string,std::string> >& getValues() {
- return m_values;
- }
+ std::vector< std::pair<std::string,std::string> >& getValues();
/**
* Returns the set of values encoded as UTF-8 strings.
*
* @return an immutable vector of the values
*/
- const std::vector< std::pair<std::string,std::string> >& getValues() const {
- return m_values;
- }
-
- size_t valueCount() const {
- return m_values.size();
- }
-
- void clearSerializedValues() {
- m_serialized.clear();
- }
-
- const char* getString(size_t index) const {
- return m_values[index].first.c_str();
- }
-
- const char* getScope(size_t index) const {
- return m_values[index].second.c_str();
- }
-
- void removeValue(size_t index) {
- Attribute::removeValue(index);
- if (index < m_values.size())
- m_values.erase(m_values.begin() + index);
- }
-
- const std::vector<std::string>& getSerializedValues() const {
- if (m_serialized.empty()) {
- for (std::vector< std::pair<std::string,std::string> >::const_iterator i=m_values.begin(); i!=m_values.end(); ++i)
- m_serialized.push_back(i->first + m_delimeter + i->second);
- }
- return Attribute::getSerializedValues();
- }
-
- DDF marshall() const {
- DDF ddf = Attribute::marshall();
- ddf.name("Scoped");
- if (m_delimeter != '@')
- ddf.addmember("_delimeter").integer(m_delimeter);
- DDF vlist = ddf.first();
- for (std::vector< std::pair<std::string,std::string> >::const_iterator i=m_values.begin(); i!=m_values.end(); ++i) {
- DDF val = DDF(i->first.c_str()).string(i->second.c_str());
- vlist.add(val);
- }
- return ddf;
- }
+ const std::vector< std::pair<std::string,std::string> >& getValues() const;
+
+ // Virtual function overrides.
+ size_t valueCount() const;
+ void clearSerializedValues();
+ const char* getString(size_t index) const;
+ const char* getScope(size_t index) const;
+ void removeValue(size_t index);
+ const std::vector<std::string>& getSerializedValues() const;
+ DDF marshall() const;
private:
char m_delimeter;
--- /dev/null
+/*
+ * Copyright 2009 Internet2
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * SimpleAttribute.cpp
+ *
+ * An Attribute whose values are simple strings.
+ */
+
+#include "internal.h"
+#include "attribute/SimpleAttribute.h"
+
+using namespace shibsp;
+using namespace std;
+
+namespace shibsp {
+ SHIBSP_DLLLOCAL Attribute* SimpleAttributeFactory(DDF& in) {
+ return new SimpleAttribute(in);
+ }
+};
+
+SimpleAttribute::SimpleAttribute(const vector<string>& ids) : Attribute(ids)
+{
+}
+
+SimpleAttribute::SimpleAttribute(DDF& in) : Attribute(in)
+{
+ DDF val = in.first().first();
+ while (val.string()) {
+ m_serialized.push_back(val.string());
+ val = in.first().next();
+ }
+}
+
+SimpleAttribute::~SimpleAttribute()
+{
+}
+
+vector<string>& SimpleAttribute::getValues()
+{
+ return m_serialized;
+}
+
+void SimpleAttribute::clearSerializedValues()
+{
+ // Do nothing, since our values are already serialized.
+}
+
+DDF SimpleAttribute::marshall() const
+{
+ DDF ddf = Attribute::marshall();
+ DDF vlist = ddf.first();
+ for (vector<string>::const_iterator i=m_serialized.begin(); i!=m_serialized.end(); ++i)
+ vlist.add(DDF(NULL).string(i->c_str()));
+ return ddf;
+}
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* @param ids array with primary identifier in first position, followed by any aliases
*/
- SimpleAttribute(const std::vector<std::string>& ids) : Attribute(ids) {}
+ SimpleAttribute(const std::vector<std::string>& ids);
/**
* Constructs based on a remoted SimpleAttribute.
*
* @param in input object containing marshalled SimpleAttribute
*/
- SimpleAttribute(DDF& in) : Attribute(in) {
- DDF val = in.first().first();
- while (val.string()) {
- m_serialized.push_back(val.string());
- val = in.first().next();
- }
- }
+ SimpleAttribute(DDF& in);
- virtual ~SimpleAttribute() {}
+ virtual ~SimpleAttribute();
/**
* Returns the set of values encoded as UTF-8 strings.
*
* @return a mutable vector of the values
*/
- std::vector<std::string>& getValues() {
- return m_serialized;
- }
+ std::vector<std::string>& getValues();
- void clearSerializedValues() {
- // Do nothing, since our values are already serialized.
- }
-
- DDF marshall() const {
- DDF ddf = Attribute::marshall();
- DDF vlist = ddf.first();
- for (std::vector<std::string>::const_iterator i=m_serialized.begin(); i!=m_serialized.end(); ++i)
- vlist.add(DDF(NULL).string(i->c_str()));
- return ddf;
- }
+ // Virtual function overrides.
+ void clearSerializedValues();
+ DDF marshall() const;
};
};
--- /dev/null
+/*
+ * Copyright 2009 Internet2
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * XMLAttribute.cpp
+ *
+ * An Attribute whose values are serialized XML.
+ */
+
+#include "internal.h"
+#include "attribute/XMLAttribute.h"
+
+#include <xercesc/util/Base64.hpp>
+
+#ifndef SHIBSP_LITE
+# include <xsec/framework/XSECDefs.hpp>
+#endif
+
+using namespace shibsp;
+using namespace std;
+
+namespace shibsp {
+ SHIBSP_DLLLOCAL Attribute* XMLAttributeFactory(DDF& in) {
+ return new XMLAttribute(in);
+ }
+};
+
+XMLAttribute::XMLAttribute(const vector<string>& ids) : Attribute(ids)
+{
+}
+
+XMLAttribute::XMLAttribute(DDF& in) : Attribute(in)
+{
+ DDF val = in.first().first();
+ while (val.string()) {
+ m_values.push_back(val.string());
+ val = in.first().next();
+ }
+}
+
+XMLAttribute::~XMLAttribute()
+{
+}
+
+vector<string>& XMLAttribute::getValues()
+{
+ return m_values;
+}
+
+const vector<string>& XMLAttribute::getValues() const
+{
+ return m_values;
+}
+
+size_t XMLAttribute::valueCount() const
+{
+ return m_values.size();
+}
+
+void XMLAttribute::clearSerializedValues()
+{
+ m_serialized.clear();
+}
+
+const char* XMLAttribute::getString(size_t index) const
+{
+ return m_values[index].c_str();
+}
+
+void XMLAttribute::removeValue(size_t index)
+{
+ Attribute::removeValue(index);
+ if (index < m_values.size())
+ m_values.erase(m_values.begin() + index);
+}
+
+const vector<string>& XMLAttribute::getSerializedValues() const
+{
+ xsecsize_t len;
+ XMLByte *pos, *pos2;
+ if (m_serialized.empty()) {
+ for (vector<string>::const_iterator i=m_values.begin(); i!=m_values.end(); ++i) {
+ XMLByte* enc = Base64::encode(reinterpret_cast<const XMLByte*>(i->data()), i->size(), &len);
+ if (enc) {
+ for (pos=enc, pos2=enc; *pos2; pos2++)
+ if (isgraph(*pos2))
+ *pos++=*pos2;
+ *pos=0;
+ m_serialized.push_back(reinterpret_cast<char*>(enc));
+#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
+ XMLString::release(&enc);
+#else
+ XMLString::release((char**)&enc);
+#endif
+ }
+ }
+ }
+ return Attribute::getSerializedValues();
+}
+
+DDF XMLAttribute::marshall() const
+{
+ DDF ddf = Attribute::marshall();
+ ddf.name("XML");
+ DDF vlist = ddf.first();
+ for (vector<string>::const_iterator i=m_values.begin(); i!=m_values.end(); ++i)
+ vlist.add(DDF(NULL).string(i->c_str()));
+ return ddf;
+}
*
* @param ids array with primary identifier in first position, followed by any aliases
*/
- XMLAttribute(const std::vector<std::string>& ids) : Attribute(ids) {}
+ XMLAttribute(const std::vector<std::string>& ids);
/**
* Constructs based on a remoted XMLAttribute.
*
* @param in input object containing marshalled XMLAttribute
*/
- XMLAttribute(DDF& in) : Attribute(in) {
- DDF val = in.first().first();
- while (val.string()) {
- m_values.push_back(val.string());
- val = in.first().next();
- }
- }
+ XMLAttribute(DDF& in);
- virtual ~XMLAttribute() {}
+ virtual ~XMLAttribute();
/**
* Returns the set of values encoded as XML.
*
* @return a mutable vector of the values
*/
- std::vector<std::string>& getValues() {
- return m_values;
- }
+ std::vector<std::string>& getValues();
/**
* Returns the set of values encoded as XML.
*
* @return an immutable vector of the values
*/
- const std::vector<std::string>& getValues() const {
- return m_values;
- }
-
- size_t valueCount() const {
- return m_values.size();
- }
-
- void clearSerializedValues() {
- m_serialized.clear();
- }
-
- const char* getString(size_t index) const {
- return m_values[index].c_str();
- }
-
- void removeValue(size_t index) {
- Attribute::removeValue(index);
- if (index < m_values.size())
- m_values.erase(m_values.begin() + index);
- }
+ const std::vector<std::string>& getValues() const;
+ // Virtual function overrides.
+ size_t valueCount() const;
+ void clearSerializedValues();
+ const char* getString(size_t index) const;
+ void removeValue(size_t index);
const std::vector<std::string>& getSerializedValues() const;
-
- DDF marshall() const {
- DDF ddf = Attribute::marshall();
- ddf.name("XML");
- DDF vlist = ddf.first();
- for (std::vector<std::string>::const_iterator i=m_values.begin(); i!=m_values.end(); ++i)
- vlist.add(DDF(NULL).string(i->c_str()));
- return ddf;
- }
+ DDF marshall() const;
private:
std::vector<std::string> m_values;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef __shibsp_attrfilt_h__
#define __shibsp_attrfilt_h__
-#include <shibsp/attribute/filtering/FilteringContext.h>
+#include <shibsp/base.h>
+#include <vector>
#include <xmltooling/Lockable.h>
namespace shibsp {
+ class SHIBSP_API Attribute;
+ class SHIBSP_API FilteringContext;
+
/**
* Engine for filtering attribute values.
*/
{
MAKE_NONCOPYABLE(AttributeFilter);
protected:
- AttributeFilter() {}
+ AttributeFilter();
public:
- virtual ~AttributeFilter() {}
+ virtual ~AttributeFilter();
/**
* Filters values out of a set of attributes.
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace shibsp {
+ class SHIBSP_API Attribute;
+
class SHIBSP_API BasicFilteringContext : public FilteringContext
{
public:
const opensaml::saml2md::RoleDescriptor* role=NULL,
const XMLCh* authncontext_class=NULL,
const XMLCh* authncontext_decl=NULL
- ) : m_app(app), m_role(role), m_issuer(NULL), m_class(authncontext_class), m_decl(authncontext_decl) {
- if (role)
- m_issuer = dynamic_cast<opensaml::saml2md::EntityDescriptor*>(role->getParent())->getEntityID();
- for (std::vector<Attribute*>::const_iterator a = attributes.begin(); a != attributes.end(); ++a)
- m_attributes.insert(std::multimap<std::string,Attribute*>::value_type((*a)->getId(), *a));
- }
+ );
- virtual ~BasicFilteringContext() {}
+ virtual ~BasicFilteringContext();
- const Application& getApplication() const {
- return m_app;
- }
- const XMLCh* getAuthnContextClassRef() const {
- return m_class;
- }
- const XMLCh* getAuthnContextDeclRef() const {
- return m_decl;
- }
- const XMLCh* getAttributeRequester() const {
- return m_app.getXMLString("entityID").second;
- }
- const XMLCh* getAttributeIssuer() const {
- return m_issuer;
- }
- const opensaml::saml2md::RoleDescriptor* getAttributeRequesterMetadata() const {
- return NULL;
- }
- const opensaml::saml2md::RoleDescriptor* getAttributeIssuerMetadata() const {
- return m_role;
- }
- const std::multimap<std::string,Attribute*>& getAttributes() const {
- return m_attributes;
- }
+ // Virtual function overrides.
+ const Application& getApplication() const;
+ const XMLCh* getAuthnContextClassRef() const;
+ const XMLCh* getAuthnContextDeclRef() const;
+ const XMLCh* getAttributeRequester() const;
+ const XMLCh* getAttributeIssuer() const;
+ const opensaml::saml2md::RoleDescriptor* getAttributeRequesterMetadata() const;
+ const opensaml::saml2md::RoleDescriptor* getAttributeIssuerMetadata() const;
+ const std::multimap<std::string,Attribute*>& getAttributes() const;
private:
const Application& m_app;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef __shibsp_filtpolctx_h__
#define __shibsp_filtpolctx_h__
-#include <shibsp/attribute/filtering/MatchFunctor.h>
+#include <shibsp/base.h>
#include <map>
#include <string>
namespace shibsp {
+ class SHIBSP_API MatchFunctor;
+
/**
* Context for lookup of instantiated MatchFunctor objects.
*/
*
* @param functors reference to a map of id/functor pairs
*/
- FilterPolicyContext(std::multimap<std::string,MatchFunctor*>& functors) : m_functors(functors) {
- }
+ FilterPolicyContext(std::multimap<std::string,MatchFunctor*>& functors);
- virtual ~FilterPolicyContext() {}
+ virtual ~FilterPolicyContext();
/**
* Gets a mutable map to store id/functor pairs.
*
* @return reference to a mutable map containing available MatchFunctors
*/
- std::multimap<std::string,MatchFunctor*>& getMatchFunctors() const {
- return m_functors;
- }
+ std::multimap<std::string,MatchFunctor*>& getMatchFunctors() const;
private:
std::multimap<std::string,MatchFunctor*>& m_functors;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <shibsp/base.h>
-#include <saml/saml2/metadata/Metadata.h>
+#include <map>
+#include <string>
+
+namespace opensaml {
+ namespace saml2md {
+ class SAML_API RoleDescriptor;
+ };
+};
namespace shibsp {
{
MAKE_NONCOPYABLE(FilteringContext);
protected:
- FilteringContext() {}
+ FilteringContext();
public:
- virtual ~FilteringContext() {}
+ virtual ~FilteringContext();
/**
* Gets the Application doing the filtering.
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
MAKE_NONCOPYABLE(MatchFunctor);
protected:
- MatchFunctor() {}
+ MatchFunctor();
public:
- virtual ~MatchFunctor() {}
+ virtual ~MatchFunctor();
/**
* Evaluates this matching criteria. This evaluation is used when a filtering engine determines policy
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "internal.h"
#include "exceptions.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
#include "util/SPConstants.h"
#include <xercesc/util/XMLUniDefs.hpp>
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "internal.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
using namespace shibsp;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
conf.AttributeFilterManager.registerFactory(XML_ATTRIBUTE_FILTER, XMLAttributeFilterFactory);
conf.AttributeFilterManager.registerFactory(CHAINING_ATTRIBUTE_FILTER, ChainingAttributeFilterFactory);
}
+
+AttributeFilter::AttributeFilter()
+{
+}
+
+AttributeFilter::~AttributeFilter()
+{
+}
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "exceptions.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
+
+#include <saml/saml2/metadata/Metadata.h>
using namespace opensaml::saml2md;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "exceptions.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
#include <xercesc/util/regx/RegularExpression.hpp>
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "exceptions.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
namespace shibsp {
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* AttributeRequesterInEntityGroupFunctor.cpp
*
- * A match function that evaluates to true if the attribute requester is found in metadata and is a member\r
+ * A match function that evaluates to true if the attribute requester is found in metadata and is a member
* of the given entity group.
*/
#include "exceptions.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
+
+#include <saml/saml2/metadata/Metadata.h>
using namespace opensaml::saml2md;
static const XMLCh groupID[] = UNICODE_LITERAL_7(g,r,o,u,p,I,D);
/**
- * A match function that evaluates to true if the attribute requester is found in metadata and is a member\r
+ * A match function that evaluates to true if the attribute requester is found in metadata and is a member
* of the given entity group.
*/
class SHIBSP_DLLLOCAL AttributeRequesterInEntityGroupFunctor : public MatchFunctor
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "exceptions.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
#include <xercesc/util/regx/RegularExpression.hpp>
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "exceptions.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
namespace shibsp {
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "attribute/Attribute.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
#include "metadata/MetadataExt.h"
+#include <saml/saml2/metadata/Metadata.h>
#include <xercesc/util/regx/RegularExpression.hpp>
using namespace opensaml::saml2md;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "attribute/Attribute.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
#include <xercesc/util/regx/RegularExpression.hpp>
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "attribute/Attribute.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
using namespace shibsp;
using namespace std;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "attribute/Attribute.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
#include <xercesc/util/regx/RegularExpression.hpp>
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "attribute/Attribute.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
using namespace shibsp;
using namespace std;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "exceptions.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
#include <xercesc/util/regx/RegularExpression.hpp>
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "exceptions.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
namespace shibsp {
--- /dev/null
+/*
+ * Copyright 2001-2009 Internet2
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * BasicFilteringContext.cpp
+ *
+ * A trivial FilteringContext implementation.
+ */
+
+#include "internal.h"
+#include "Application.h"
+#include "attribute/Attribute.h"
+#include "attribute/filtering/BasicFilteringContext.h"
+
+#include <saml/saml2/metadata/Metadata.h>
+
+using namespace shibsp;
+using namespace opensaml::saml2md;
+using namespace std;
+
+FilteringContext::FilteringContext()
+{
+}
+
+FilteringContext::~FilteringContext()
+{
+}
+
+BasicFilteringContext::BasicFilteringContext(
+ const Application& app,
+ const vector<Attribute*>& attributes,
+ const RoleDescriptor* role,
+ const XMLCh* authncontext_class,
+ const XMLCh* authncontext_decl
+ ) : m_app(app), m_role(role), m_issuer(NULL), m_class(authncontext_class), m_decl(authncontext_decl)
+{
+ if (role)
+ m_issuer = dynamic_cast<EntityDescriptor*>(role->getParent())->getEntityID();
+ for (vector<Attribute*>::const_iterator a = attributes.begin(); a != attributes.end(); ++a)
+ m_attributes.insert(multimap<string,Attribute*>::value_type((*a)->getId(), *a));
+}
+
+BasicFilteringContext::~BasicFilteringContext()
+{
+}
+
+const Application& BasicFilteringContext::getApplication() const
+{
+ return m_app;
+}
+
+const XMLCh* BasicFilteringContext::getAuthnContextClassRef() const
+{
+ return m_class;
+}
+
+const XMLCh* BasicFilteringContext::getAuthnContextDeclRef() const
+{
+ return m_decl;
+}
+
+const XMLCh* BasicFilteringContext::getAttributeRequester() const
+{
+ return m_app.getXMLString("entityID").second;
+}
+
+const XMLCh* BasicFilteringContext::getAttributeIssuer() const
+{
+ return m_issuer;
+}
+
+const RoleDescriptor* BasicFilteringContext::getAttributeRequesterMetadata() const
+{
+ return NULL;
+}
+
+const RoleDescriptor* BasicFilteringContext::getAttributeIssuerMetadata() const
+{
+ return m_role;
+}
+
+const multimap<string,Attribute*>& BasicFilteringContext::getAttributes() const
+{
+ return m_attributes;
+}
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
#include "internal.h"
+#include "attribute/filtering/FilterPolicyContext.h"
#include "attribute/filtering/MatchFunctor.h"
#include "util/SPConstants.h"
REGISTER_FACTORY(AttributeRequesterInEntityGroup);
REGISTER_FACTORY(AttributeScopeMatchesShibMDScope);
}
+
+MatchFunctor::MatchFunctor()
+{
+}
+
+MatchFunctor::~MatchFunctor()
+{
+}
+
+FilterPolicyContext::FilterPolicyContext(multimap<string,MatchFunctor*>& functors) : m_functors(functors)
+{
+}
+
+FilterPolicyContext::~FilterPolicyContext()
+{
+}
+
+multimap<string,MatchFunctor*>& FilterPolicyContext::getMatchFunctors() const
+{
+ return m_functors;
+}
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "internal.h"
#include "exceptions.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
#include "util/SPConstants.h"
#include <xercesc/util/XMLUniDefs.hpp>
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "attribute/Attribute.h"
#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
using namespace shibsp;
using namespace std;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "internal.h"
#include "exceptions.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
#include "util/SPConstants.h"
#include <xercesc/util/XMLUniDefs.hpp>
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
#include "internal.h"
+#include "exceptions.h"
#include "Application.h"
#include "ServiceProvider.h"
#include "attribute/Attribute.h"
#include "attribute/filtering/AttributeFilter.h"
+#include "attribute/filtering/FilteringContext.h"
#include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
#include "util/SPConstants.h"
#include <xmltooling/util/NDC.h>
#include <shibsp/base.h>
#include <xmltooling/Lockable.h>
-#include <saml/saml2/metadata/Metadata.h>
+
+namespace opensaml {
+ namespace saml2md {
+ class SAML_API RoleDescriptor;
+ };
+};
namespace shibsp {
{
MAKE_NONCOPYABLE(AttributeExtractor);
protected:
- AttributeExtractor() {}
+ AttributeExtractor();
public:
- virtual ~AttributeExtractor() {}
+ virtual ~AttributeExtractor();
/**
* Extracts the attributes found in an XMLObject.
#include <shibsp/base.h>
-#include <saml/Assertion.h>
-#include <saml/saml2/metadata/Metadata.h>
#include <xmltooling/Lockable.h>
+namespace opensaml {
+ class SAML_API Assertion;
+ namespace saml2 {
+ class SAML_API NameID;
+ };
+ namespace saml2md {
+ class SAML_API EntityDescriptor;
+ };
+};
+
namespace shibsp {
class SHIBSP_API Application;
{
MAKE_NONCOPYABLE(AttributeResolver);
protected:
- AttributeResolver() {}
+ AttributeResolver();
public:
- virtual ~AttributeResolver() {}
+ virtual ~AttributeResolver();
/**
* Creates a ResolutionContext based on session bootstrap material.
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <shibsp/base.h>
-#include <saml/Assertion.h>
+namespace opensaml {
+ class SAML_API Assertion;
+};
namespace shibsp {
{
MAKE_NONCOPYABLE(ResolutionContext);
protected:
- ResolutionContext() {}
+ ResolutionContext();
public:
- virtual ~ResolutionContext() {}
+ virtual ~ResolutionContext();
/**
* Returns the set of Attributes resolved and added to the context.
SPConfig::getConfig().AttributeExtractorManager.registerFactory(CHAINING_ATTRIBUTE_EXTRACTOR, ChainingExtractorFactory);
}
+AttributeExtractor::AttributeExtractor()
+{
+}
+
+AttributeExtractor::~AttributeExtractor()
+{
+}
+
ChainingAttributeExtractor::ChainingAttributeExtractor(const DOMElement* e)
{
SPConfig& conf = SPConfig::getConfig();
#include "attribute/resolver/AttributeResolver.h"
#include "attribute/resolver/ResolutionContext.h"
+#include <saml/Assertion.h>
#include <xercesc/util/XMLUniDefs.hpp>
#include <xmltooling/util/XMLHelper.h>
SPConfig::getConfig().AttributeResolverManager.registerFactory(CHAINING_ATTRIBUTE_RESOLVER, ChainingResolverFactory);
}
+ResolutionContext::ResolutionContext()
+{
+}
+
+ResolutionContext::~ResolutionContext()
+{
+}
+
+AttributeResolver::AttributeResolver()
+{
+}
+
+AttributeResolver::~AttributeResolver()
+{
+}
+
ChainingAttributeResolver::ChainingAttributeResolver(const DOMElement* e)
{
SPConfig& conf = SPConfig::getConfig();
#include "util/SPConstants.h"
#include <saml/saml2/core/Assertions.h>
+#include <saml/saml2/metadata/Metadata.h>
#include <saml/saml2/metadata/MetadataCredentialCriteria.h>
+#include <xmltooling/security/CredentialResolver.h>
#include <xmltooling/util/DateTime.h>
#include <xmltooling/util/XMLHelper.h>
#include <xercesc/util/XMLUniDefs.hpp>
*/
#include "internal.h"
+#include "exceptions.h"
#include "Application.h"
#include "attribute/AttributeDecoder.h"
#include "attribute/SimpleAttribute.h"
#include <saml/saml2/metadata/Metadata.h>
#include <saml/saml2/metadata/MetadataCredentialCriteria.h>
+#include <saml/saml2/metadata/MetadataProvider.h>
#include <xmltooling/security/Credential.h>
#include <xmltooling/security/SecurityHelper.h>
#include <xmltooling/util/XMLHelper.h>
#include "attribute/resolver/ResolutionContext.h"
#include "binding/SOAPClient.h"
#include "metadata/MetadataProviderCriteria.h"
+#include "security/SecurityPolicy.h"
#include "util/SPConstants.h"
#include <saml/exceptions.h>
-#include <saml/binding/SecurityPolicy.h>
#include <saml/saml1/binding/SAML1SOAPClient.h>
#include <saml/saml1/core/Assertions.h>
#include <saml/saml1/core/Protocols.h>
*/
#include "internal.h"
+#include "exceptions.h"
#include "Application.h"
#include "ServiceProvider.h"
#include "SessionCache.h"
#include "attribute/resolver/ResolutionContext.h"
#include "binding/SOAPClient.h"
#include "metadata/MetadataProviderCriteria.h"
+#include "security/SecurityPolicy.h"
#include "util/SPConstants.h"
#include <saml/exceptions.h>
#include <saml/SAMLConfig.h>
-#include <saml/binding/SecurityPolicy.h>
#include <saml/saml2/binding/SAML2SOAPClient.h>
#include <saml/saml2/core/Protocols.h>
+#include <saml/saml2/metadata/Metadata.h>
#include <saml/saml2/metadata/MetadataProvider.h>
#include <xmltooling/XMLToolingConfig.h>
+#include <xmltooling/security/TrustEngine.h>
#include <xmltooling/util/NDC.h>
#include <xmltooling/util/XMLHelper.h>
#include <xercesc/util/XMLUniDefs.hpp>
*/
#include "internal.h"
+#include "exceptions.h"
#include "Application.h"
#include "ServiceProvider.h"
+#include "attribute/Attribute.h"
#include "attribute/AttributeDecoder.h"
#include "attribute/filtering/AttributeFilter.h"
#include "attribute/filtering/BasicFilteringContext.h"
#include "attribute/resolver/AttributeExtractor.h"
+#include "remoting/ddf.h"
#include "security/SecurityPolicy.h"
#include "util/SPConstants.h"
#include <saml/SAMLConfig.h>
#include <saml/saml1/core/Assertions.h>
#include <saml/saml2/core/Assertions.h>
+#include <saml/saml2/metadata/Metadata.h>
#include <saml/saml2/metadata/MetadataCredentialCriteria.h>
#include <saml/saml2/metadata/ObservableMetadataProvider.h>
#include <xmltooling/XMLToolingConfig.h>
+#include <xmltooling/security/TrustEngine.h>
#include <xmltooling/util/NDC.h>
#include <xmltooling/util/ReloadableXMLFile.h>
#include <xmltooling/util/XMLHelper.h>
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
class SHIBSP_API ArtifactResolver : public opensaml::MessageDecoder::ArtifactResolver {
public:
- ArtifactResolver() {}
- virtual ~ArtifactResolver() {}
+ ArtifactResolver();
+ virtual ~ArtifactResolver();
opensaml::saml1p::Response* resolve(
const std::vector<opensaml::SAMLArtifact*>& artifacts,
#ifndef __shibsp_soap11client_h__
#define __shibsp_soap11client_h__
-#include <shibsp/security/SecurityPolicy.h>
+#include <shibsp/base.h>
+
#include <saml/binding/SOAPClient.h>
-#include <xmltooling/security/CredentialResolver.h>
namespace shibsp {
class SHIBSP_API PropertySet;
+ class SHIBSP_API SecurityPolicy;
/**
* Specialized SOAPClient for SP environment.
*/
SOAPClient(SecurityPolicy& policy);
- virtual ~SOAPClient() {
- if (m_credResolver)
- m_credResolver->unlock();
- }
+ virtual ~SOAPClient();
/**
* Override handles message signing for SAML payloads.
#include "internal.h"
#include "Application.h"
-#include "exceptions.h"
#include "binding/ArtifactResolver.h"
#include "binding/SOAPClient.h"
#include "security/SecurityPolicy.h"
+#include <saml/exceptions.h>
#include <saml/saml1/core/Protocols.h>
#include <saml/saml1/binding/SAML1SOAPClient.h>
#include <saml/saml2/core/Protocols.h>
using namespace xmltooling;
using namespace std;
+ArtifactResolver::ArtifactResolver()
+{
+}
+
+ArtifactResolver::~ArtifactResolver()
+{
+}
+
saml1p::Response* ArtifactResolver::resolve(
const vector<SAMLArtifact*>& artifacts,
const IDPSSODescriptor& idpDescriptor,
#include "internal.h"
#include "Application.h"
-#include "exceptions.h"
#include "ServiceProvider.h"
#include "binding/SOAPClient.h"
+#include "security/SecurityPolicy.h"
+#include <saml/exceptions.h>
#include <saml/saml2/metadata/Metadata.h>
#include <saml/signature/ContentReference.h>
#include <xmltooling/security/Credential.h>
{
}
+SOAPClient::~SOAPClient()
+{
+ if (m_credResolver)
+ m_credResolver->unlock();
+}
+
void SOAPClient::send(const soap11::Envelope& env, const char* from, MetadataCredentialCriteria& to, const char* endpoint)
{
// Check for message signing requirements.
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* @file shibsp/exceptions.h
*
- * Exception classes
+ * Exception classes.
*/
#ifndef __shibsp_exceptions_h__
#define __shibsp_exceptions_h__
#include <shibsp/base.h>
-#ifndef SHIBSP_LITE
-# include <saml/exceptions.h>
-#else
-# include <xmltooling/exceptions.h>
-#endif
+#include <xmltooling/exceptions.h>
namespace shibsp {
#include <shibsp/remoting/ddf.h>
#include <shibsp/util/DOMPropertySet.h>
+#include <map>
+#include <string>
+#include <xmltooling/logging.h>
+
#ifndef SHIBSP_LITE
-# include <saml/binding/MessageEncoder.h>
-# include <saml/saml2/core/Protocols.h>
+namespace opensaml {
+ class SAML_API MessageEncoder;
+ namespace saml2md {
+ class SAML_API RoleDescriptor;
+ };
+ namespace saml2p {
+ class SAML_API StatusResponseType;
+ };
+};
#endif
-#include <xmltooling/logging.h>
-#include <xmltooling/XMLObject.h>
-#include <xmltooling/io/HTTPRequest.h>
-#include <xmltooling/io/HTTPResponse.h>
+
+namespace xmltooling {
+ class XMLTOOL_API HTTPRequest;
+ class XMLTOOL_API HTTPResponse;
+ class XMLTOOL_API XMLObject;
+};
namespace shibsp {
xmltooling::auto_ptr_char m_configNS;
public:
- virtual ~AbstractHandler() {}
+ virtual ~AbstractHandler();
private:
std::pair<std::string,const char*> getPostCookieNameProps(const Application& app, const char* relayState) const;
#include <shibsp/handler/AbstractHandler.h>
#include <shibsp/handler/RemotedHandler.h>
+
#ifndef SHIBSP_LITE
-# include <saml/binding/MessageDecoder.h>
-# include <saml/saml1/core/Assertions.h>
-# include <saml/saml2/metadata/Metadata.h>
+namespace opensaml {
+ class SAML_API Assertion;
+ class SAML_API MessageDecoder;
+ namespace saml1 {
+ class SAML_API NameIdentifier;
+ };
+ namespace saml2 {
+ class SAML_API NameID;
+ };
+ namespace saml2md {
+ class SAML_API SPSSODescriptor;
+ };
+};
#endif
-#include <xmltooling/unicode.h>
namespace shibsp {
) const;
public:
- const char* getType() const {
- return "AssertionConsumerService";
- }
+ const char* getType() const;
#endif
private:
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* @file shibsp/handler/Handler.h
*
- * Pluggable runtime functionality that implement protocols and services
+ * Pluggable runtime functionality that implement protocols and services.
*/
#ifndef __shibsp_handler_h__
#define __shibsp_handler_h__
#include <shibsp/util/PropertySet.h>
+
#ifndef SHIBSP_LITE
-# include <saml/saml2/metadata/Metadata.h>
+namespace opensaml {
+ namespace saml2md {
+ class SAML_API SPSSODescriptor;
+ };
+};
#endif
namespace shibsp {
{
MAKE_NONCOPYABLE(Handler);
protected:
- Handler() {}
+ Handler();
public:
- virtual ~Handler() {}
+ virtual ~Handler();
/**
* Executes handler functionality as an incoming request.
*
* @return a Handler type
*/
- virtual const char* getType() const {
- return getString("type").second;
- }
+ virtual const char* getType() const;
#endif
};
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef __shibsp_logout_h__
#define __shibsp_logout_h__
-#include <shibsp/SPRequest.h>
#include <shibsp/handler/RemotedHandler.h>
namespace shibsp {
class SHIBSP_API LogoutHandler : public RemotedHandler
{
public:
- virtual ~LogoutHandler() {}
+ virtual ~LogoutHandler();
/**
* The base method will iteratively attempt front-channel notification
void receive(DDF& in, std::ostream& out);
protected:
- LogoutHandler() : m_initiator(true) {}
+ LogoutHandler();
/** Flag indicating whether the subclass is acting as a LogoutInitiator. */
bool m_initiator;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef __shibsp_remhandler_h__
#define __shibsp_remhandler_h__
-#include <shibsp/SPRequest.h>
#include <shibsp/handler/Handler.h>
#include <shibsp/remoting/ListenerService.h>
+namespace xmltooling {
+ class XMLTOOL_API HTTPRequest;
+ class XMLTOOL_API HTTPResponse;
+};
+
namespace shibsp {
/**
virtual ~RemotedHandler();
protected:
- RemotedHandler() {}
+ RemotedHandler();
/**
* Establishes message remoting using the supplied address.
/** Property remapper for configuration compatibility. */
static std::map<std::string,std::string> m_remapper;
- SessionInitiator() {}
+ SessionInitiator();
public:
- virtual ~SessionInitiator() {}
+ virtual ~SessionInitiator();
/**
* Executes an incoming request.
std::pair<bool,long> run(SPRequest& request, bool isHandler=true) const;
#ifndef SHIBSP_LITE
- const char* getType() const {
- return "SessionInitiator";
- }
+ const char* getType() const;
#endif
};
*/
#include "internal.h"
-#include "Application.h"
#include "exceptions.h"
+#include "Application.h"
#include "ServiceProvider.h"
#include "SPRequest.h"
#include "handler/AbstractHandler.h"
#ifndef SHIBSP_LITE
+# include <saml/exceptions.h>
+# include <saml/SAMLConfig.h>
+# include <saml/binding/SAMLArtifact.h>
# include <saml/saml1/core/Protocols.h>
# include <saml/saml2/core/Protocols.h>
# include <saml/saml2/metadata/Metadata.h>
# include <saml/saml2/metadata/MetadataCredentialCriteria.h>
# include <saml/util/SAMLConstants.h>
-# include <saml/SAMLConfig.h>
-# include <saml/binding/SAMLArtifact.h>
# include <xmltooling/security/Credential.h>
+# include <xmltooling/security/CredentialResolver.h>
# include <xmltooling/util/StorageService.h>
using namespace opensaml::saml2md;
+using namespace opensaml;
#else
# include "lite/SAMLConstants.h"
#endif
using namespace shibsp;
using namespace samlconstants;
-using namespace opensaml;
using namespace xmltooling;
using namespace xercesc;
using namespace std;
conf.ManageNameIDServiceManager.registerFactory(SAML20_BINDING_HTTP_ARTIFACT, SAML2NameIDMgmtFactory);
}
+Handler::Handler()
+{
+}
+
+Handler::~Handler()
+{
+}
+
AbstractHandler::AbstractHandler(
const DOMElement* e, Category& log, DOMNodeFilter* filter, const map<string,string>* remapper
) : m_log(log), m_configNS(shibspconstants::SHIB2SPCONFIG_NS) {
load(e,NULL,filter,remapper);
}
+AbstractHandler::~AbstractHandler()
+{
+}
+
#ifndef SHIBSP_LITE
+const char* Handler::getType() const
+{
+ return getString("type").second;
+}
+
void AbstractHandler::checkError(const XMLObject* response, const saml2md::RoleDescriptor* role) const
{
const saml2p::StatusResponseType* r2 = dynamic_cast<const saml2p::StatusResponseType*>(response);
*/
#include "internal.h"
-#include "Application.h"
#include "exceptions.h"
+#include "Application.h"
#include "ServiceProvider.h"
+#include "SPRequest.h"
#include "handler/AssertionConsumerService.h"
#include "util/SPConstants.h"
# include "attribute/resolver/ResolutionContext.h"
# include "metadata/MetadataProviderCriteria.h"
# include "security/SecurityPolicy.h"
+# include <saml/exceptions.h>
# include <saml/SAMLConfig.h>
# include <saml/saml1/core/Assertions.h>
+# include <saml/saml2/metadata/Metadata.h>
# include <saml/util/CommonDomainCookie.h>
using namespace samlconstants;
using opensaml::saml2md::MetadataProvider;
#ifndef SHIBSP_LITE
+const char* AssertionConsumerService::getType() const
+{
+ return "AssertionConsumerService";
+}
+
void AssertionConsumerService::generateMetadata(SPSSODescriptor& role, const char* handlerURL) const
{
const char* loc = getString("Location").second;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
#include "internal.h"
-#include "Application.h"
#include "exceptions.h"
+#include "Application.h"
#include "ServiceProvider.h"
#include "SessionCacheEx.h"
+#include "SPRequest.h"
#include "handler/AbstractHandler.h"
#include "handler/RemotedHandler.h"
#include "util/SPConstants.h"
+#ifndef SHIBSP_LITE
+# include <saml/exceptions.h>
+# include <saml/Assertion.h>
+# include <xmltooling/util/XMLHelper.h>
+using namespace opensaml;
+#endif
+
using namespace shibspconstants;
using namespace shibsp;
-using namespace opensaml;
using namespace xmltooling;
using namespace std;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "Application.h"
#include "ServiceProvider.h"
#include "SessionCache.h"
+#include "SPRequest.h"
#include "handler/AbstractHandler.h"
#include "handler/LogoutHandler.h"
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "Application.h"
#include "ServiceProvider.h"
#include "SessionCache.h"
+#include "SPRequest.h"
#include "handler/LogoutHandler.h"
#include "util/TemplateParameters.h"
using namespace xmltooling;
using namespace std;
+LogoutHandler::LogoutHandler() : m_initiator(true)
+{
+}
+
+LogoutHandler::~LogoutHandler()
+{
+}
+
pair<bool,long> LogoutHandler::sendLogoutPage(
const Application& application, const HTTPRequest& request, HTTPResponse& response, bool local, const char* status
) const
#include "Application.h"
#include "exceptions.h"
#include "ServiceProvider.h"
+#include "SPRequest.h"
#include "handler/AbstractHandler.h"
#include "handler/RemotedHandler.h"
#ifndef SHIBSP_LITE
# include "metadata/MetadataProviderCriteria.h"
+# include <saml/exceptions.h>
# include <saml/signature/ContentReference.h>
+# include <saml/saml2/metadata/Metadata.h>
+# include <saml/saml2/metadata/MetadataProvider.h>
# include <xmltooling/XMLToolingConfig.h>
# include <xmltooling/security/Credential.h>
# include <xmltooling/security/CredentialCriteria.h>
#include "Application.h"
#include "exceptions.h"
#include "ServiceProvider.h"
+#include "SPRequest.h"
#include "handler/RemotedHandler.h"
#include <algorithm>
}
}
+RemotedHandler::RemotedHandler()
+{
+}
+
RemotedHandler::~RemotedHandler()
{
SPConfig& conf = SPConfig::getConfig();
#include "handler/AssertionConsumerService.h"
#ifndef SHIBSP_LITE
-# include "exceptions.h"
# include "Application.h"
# include "ServiceProvider.h"
# include "SessionCache.h"
# include "attribute/resolver/ResolutionContext.h"
+# include <saml/exceptions.h>
# include <saml/SAMLConfig.h>
# include <saml/binding/SecurityPolicy.h>
+# include <saml/binding/SecurityPolicyRule.h>
# include <saml/saml1/core/Assertions.h>
# include <saml/saml1/core/Protocols.h>
# include <saml/saml2/metadata/Metadata.h>
+# include <xmltooling/io/HTTPRequest.h>
# include <xmltooling/util/DateTime.h>
using namespace opensaml::saml1;
using namespace opensaml::saml1p;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
#include "internal.h"
-#include "Application.h"
#include "exceptions.h"
+#include "Application.h"
#include "ServiceProvider.h"
+#include "SPRequest.h"
#include "handler/AbstractHandler.h"
#include "handler/RemotedHandler.h"
#include "util/SPConstants.h"
#ifndef SHIBSP_LITE
# include "security/SecurityPolicy.h"
+# include <saml/exceptions.h>
# include <saml/SAMLConfig.h>
# include <saml/binding/ArtifactMap.h>
# include <saml/binding/MessageEncoder.h>
using namespace opensaml::saml2md;
using namespace opensaml::saml2p;
using namespace opensaml::saml2;
+using namespace opensaml;
using namespace samlconstants;
#endif
using namespace shibspconstants;
using namespace shibsp;
-using namespace opensaml;
using namespace soap11;
using namespace xmltooling;
using namespace std;
#include "handler/AssertionConsumerService.h"
#ifndef SHIBSP_LITE
-# include "exceptions.h"
# include "Application.h"
# include "ServiceProvider.h"
# include "SessionCache.h"
# include "attribute/resolver/ResolutionContext.h"
+# include <saml/exceptions.h>
# include <saml/SAMLConfig.h>
+# include <saml/binding/SecurityPolicyRule.h>
# include <saml/saml2/core/Protocols.h>
# include <saml/saml2/metadata/Metadata.h>
# include <saml/saml2/metadata/MetadataCredentialCriteria.h>
# include <saml/saml2/profile/SAML2AssertionPolicy.h>
# include <xmltooling/XMLToolingConfig.h>
+# include <xmltooling/io/HTTPRequest.h>
# include <xmltooling/util/DateTime.h>
using namespace opensaml::saml2;
using namespace opensaml::saml2p;
#include "exceptions.h"
#include "Application.h"
#include "ServiceProvider.h"
+#include "SPRequest.h"
#include "handler/AbstractHandler.h"
#include "handler/LogoutHandler.h"
#include "util/SPConstants.h"
# include "metadata/MetadataProviderCriteria.h"
# include "util/TemplateParameters.h"
# include <fstream>
+# include <saml/exceptions.h>
# include <saml/SAMLConfig.h>
# include <saml/saml2/core/Protocols.h>
# include <saml/saml2/metadata/EndpointManager.h>
+# include <saml/saml2/metadata/Metadata.h>
# include <saml/saml2/metadata/MetadataCredentialCriteria.h>
# include <xmltooling/util/URLEncoder.h>
using namespace opensaml::saml2;
#include "Application.h"
#include "ServiceProvider.h"
#include "SessionCache.h"
+#include "SPRequest.h"
#include "handler/AbstractHandler.h"
#include "handler/LogoutHandler.h"
#ifndef SHIBSP_LITE
# include "binding/SOAPClient.h"
# include "metadata/MetadataProviderCriteria.h"
+# include "security/SecurityPolicy.h"
+# include <saml/exceptions.h>
# include <saml/SAMLConfig.h>
# include <saml/saml2/core/Protocols.h>
# include <saml/saml2/binding/SAML2SOAPClient.h>
# include <saml/saml2/metadata/EndpointManager.h>
+# include <saml/saml2/metadata/Metadata.h>
# include <saml/saml2/metadata/MetadataCredentialCriteria.h>
# include <saml/signature/ContentReference.h>
# include <xmltooling/security/Credential.h>
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "exceptions.h"
#include "Application.h"
#include "ServiceProvider.h"
+#include "SPRequest.h"
#include "handler/AbstractHandler.h"
#include "handler/RemotedHandler.h"
#include "util/SPConstants.h"
# include "security/SecurityPolicy.h"
# include "util/TemplateParameters.h"
# include <fstream>
+# include <saml/exceptions.h>
# include <saml/SAMLConfig.h>
# include <saml/saml2/core/Protocols.h>
# include <saml/saml2/metadata/EndpointManager.h>
+# include <saml/saml2/metadata/Metadata.h>
# include <saml/saml2/metadata/MetadataCredentialCriteria.h>
# include <xmltooling/util/URLEncoder.h>
using namespace opensaml::saml2;
# include <saml/saml2/metadata/EndpointManager.h>
# include <saml/saml2/metadata/Metadata.h>
# include <saml/saml2/metadata/MetadataCredentialCriteria.h>
+# include <saml/util/SAMLConstants.h>
using namespace opensaml::saml2;
using namespace opensaml::saml2p;
using namespace opensaml::saml2md;
#else
+# include "lite/SAMLConstants.h"
#include <xercesc/util/XMLUniDefs.hpp>
#endif
using namespace std;
#ifndef SHIBSP_LITE
+# include <saml/saml2/metadata/Metadata.h>
+# include <saml/saml2/metadata/MetadataProvider.h>
using namespace opensaml::saml2md;
#endif
SessionInitiator::m_remapper["defaultACSIndex"] = "acsIndex";
}
+SessionInitiator::SessionInitiator()
+{
+}
+
+SessionInitiator::~SessionInitiator()
+{
+}
+
+#ifndef SHIBSP_LITE
+const char* SessionInitiator::getType() const
+{
+ return "SessionInitiator";
+}
+#endif
+
pair<bool,long> SessionInitiator::run(SPRequest& request, bool isHandler) const
{
const char* entityID=NULL;
# include "metadata/MetadataProviderCriteria.h"
# include <saml/saml2/metadata/Metadata.h>
# include <saml/saml2/metadata/EndpointManager.h>
+# include <saml/util/SAMLConstants.h>
+#else
+# include "lite/SAMLConstants.h"
#endif
#include <xmltooling/XMLToolingConfig.h>
#include <xmltooling/util/URLEncoder.h>
#include "Application.h"
#include "exceptions.h"
#include "ServiceProvider.h"
+#include "SPRequest.h"
#include "handler/AbstractHandler.h"
#include "handler/RemotedHandler.h"
#include "util/CGIParser.h"
# include "SessionCache.h"
# include "metadata/MetadataProviderCriteria.h"
# include <saml/version.h>
+# include <saml/saml2/metadata/Metadata.h>
# include <xmltooling/security/Credential.h>
# include <xmltooling/security/CredentialCriteria.h>
using namespace opensaml::saml2md;
#include "handler/AbstractHandler.h"
#include "handler/SessionInitiator.h"
+#ifndef SHIBSP_LITE
+# include <saml/util/SAMLConstants.h>
+#else
+# include "lite/SAMLConstants.h"
+#endif
+
#include <ctime>
#include <xmltooling/XMLToolingConfig.h>
#include <xmltooling/util/URLEncoder.h>
conf.AccessControlManager.registerFactory("edu.internet2.middleware.shibboleth.sp.provider.XMLAccessControl", XMLAccessControlFactory);\r
}\r
\r
+AccessControl::AccessControl()\r
+{\r
+}\r
+\r
+AccessControl::~AccessControl()\r
+{\r
+}\r
+\r
ChainingAccessControl::ChainingAccessControl(const DOMElement* e)\r
{\r
const XMLCh* op = e ? e->getAttributeNS(NULL, _operator) : NULL;\r
#include "util/SPConstants.h"
#include <algorithm>
+#include <xmltooling/io/HTTPRequest.h>
+#include <xmltooling/io/HTTPResponse.h>
#include <xmltooling/util/DateTime.h>
#include <xmltooling/util/NDC.h>
#include <xmltooling/util/XMLHelper.h>
#include <xercesc/util/XMLUniDefs.hpp>
#ifndef SHIBSP_LITE
+# include <saml/exceptions.h>
# include <saml/SAMLConfig.h>
+# include <saml/saml2/core/Assertions.h>
+# include <saml/saml2/metadata/Metadata.h>
# include <xmltooling/XMLToolingConfig.h>
# include <xmltooling/util/StorageService.h>
using namespace opensaml::saml2md;
SPConfig::getConfig().SessionCacheManager.registerFactory(STORAGESERVICE_SESSION_CACHE, StorageServiceCacheFactory);
}
+Session::Session()
+{
+}
+
+Session::~Session()
+{
+}
+
void StoredSession::unmarshallAttributes() const
{
Attribute* attribute;
#endif
+SessionCache::SessionCache()
+{
+}
+
+SessionCache::~SessionCache()
+{
+}
+
+SessionCacheEx::SessionCacheEx()
+{
+}
+
+SessionCacheEx::~SessionCacheEx()
+{
+}
+
SSCache::SSCache(const DOMElement* e)
: m_log(Category::getInstance(SHIBSP_LOGCAT".SessionCache")), inproc(true), m_cacheTimeout(28800),
#ifndef SHIBSP_LITE
conf.RequestMapperManager.registerFactory(NATIVE_REQUEST_MAPPER, XMLRequestMapperFactory);
}
+RequestMapper::RequestMapper()
+{
+}
+
+RequestMapper::~RequestMapper()
+{
+}
+
void Override::loadACL(const DOMElement* e, Category& log)
{
try {
# include <saml/version.h>
# include <saml/binding/ArtifactMap.h>
# include <saml/binding/SAMLArtifact.h>
+# include <saml/binding/SecurityPolicyRule.h>
# include <saml/saml1/core/Assertions.h>
+# include <saml/saml2/core/Assertions.h>
# include <saml/saml2/binding/SAML2ArtifactType0004.h>
+# include <saml/saml2/metadata/Metadata.h>
+# include <saml/saml2/metadata/MetadataProvider.h>
+# include <saml/util/SAMLConstants.h>
+# include <xmltooling/security/CredentialResolver.h>
+# include <xmltooling/security/TrustEngine.h>
# include <xmltooling/util/ReplayCache.h>
+# include <xmltooling/util/StorageService.h>
using namespace opensaml::saml2;
using namespace opensaml::saml2p;
using namespace opensaml::saml2md;
using namespace opensaml;
+#else
+# include "lite/SAMLConstants.h"
#endif
using namespace shibsp;
}
}
+CommonDomainCookie::~CommonDomainCookie()
+{
+}
+
+const vector<string>& CommonDomainCookie::get() const
+{
+ return m_list;
+}
+
const char* CommonDomainCookie::set(const char* entityID)
{
// First scan the list for this IdP.
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
CommonDomainCookie(const char* cookie);
- ~CommonDomainCookie() {}
+ ~CommonDomainCookie();
/**
* Returns list of IdPs stored in cookie.
*
* @return reference to vector of entityIDs
*/
- const std::vector<std::string>& get() const {
- return m_list;
- }
+ const std::vector<std::string>& get() const;
/**
* Adds/moves an IdP to the front of the list.
#ifndef __shibsp_xmlconstants_h__
#define __shibsp_xmlconstants_h__
-#include <xmltooling/util/XMLConstants.h>
+#include <shibsp/base.h>
+#include <xercesc/util/XercesDefs.hpp>
/**
* SAML related constants.
#include "internal.h"
#include "exceptions.h"
+#include "Application.h"
#include "ServiceProvider.h"
#include "metadata/MetadataProviderCriteria.h"
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* @file shibsp/metadata/MetadataExt.h
*
- * XMLObjects representing Shibboleth metadata extensions
+ * XMLObjects representing Shibboleth metadata extensions.
*/
#ifndef __shibsp_metaext_h__
#define __shibsp_metaext_h__
#include <shibsp/util/SPConstants.h>
-#include <xmltooling/XMLObjectBuilder.h>
-#include <xmltooling/signature/KeyInfo.h>
-#include <xercesc/util/XMLUniDefs.hpp>
+
+#include <xmltooling/AttributeExtensibleXMLObject.h>
+#include <xmltooling/ConcreteXMLObjectBuilder.h>
+#include <xmltooling/util/XMLObjectChildrenList.h>
#define DECL_SHIBOBJECTBUILDER(cname) \
DECL_XMLOBJECTBUILDER(SHIBSP_API,cname,shibspconstants::SHIBMD_NS,shibspconstants::SHIBMD_PREFIX)
+namespace xmlsignature {
+ class XMLTOOL_API KeyInfo;
+};
+
namespace shibsp {
BEGIN_XMLOBJECT(SHIBSP_API,Scope,xmltooling::XMLObject,Scope element);
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <xmltooling/impl/AnyElement.h>
#include <xmltooling/io/AbstractXMLObjectMarshaller.h>
#include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
+#include <xmltooling/signature/KeyInfo.h>
#include <xmltooling/util/XMLHelper.h>
using namespace shibsp;
--- /dev/null
+/*
+ * Copyright 2001-2009 Internet2
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * MetadataProviderCriteria.cpp
+ *
+ * Extended criteria for metadata lookup for Shibboleth-aware metadata providers.
+ */
+
+#include "internal.h"
+#include "metadata/MetadataProviderCriteria.h"
+
+using namespace shibsp;
+using namespace opensaml::saml2md;
+using opensaml::SAMLArtifact;
+using namespace xmltooling;
+
+MetadataProviderCriteria::MetadataProviderCriteria(const Application& app) : application(app)
+{
+}
+
+MetadataProviderCriteria::MetadataProviderCriteria(
+ const Application& app, const XMLCh* id, const xmltooling::QName* q, const XMLCh* prot, bool valid
+ ) : MetadataProvider::Criteria(id, q, prot, valid), application(app)
+{
+}
+
+MetadataProviderCriteria::MetadataProviderCriteria(
+ const Application& app, const char* id, const xmltooling::QName* q, const XMLCh* prot, bool valid
+ ) : MetadataProvider::Criteria(id, q, prot, valid), application(app)
+{
+}
+
+MetadataProviderCriteria::MetadataProviderCriteria(
+ const Application& app, const SAMLArtifact* a, const xmltooling::QName* q, const XMLCh* prot, bool valid
+ ) : MetadataProvider::Criteria(a, q, prot, valid), application(app)
+{
+}
+
+MetadataProviderCriteria::~MetadataProviderCriteria()
+{
+}
/*
- * Copyright 2001-2008 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef __shibsp_metaprovcrit_h__
#define __shibsp_metaprovcrit_h__
-#include <shibsp/Application.h>
+#include <shibsp/base.h>
+
#include <saml/saml2/metadata/MetadataProvider.h>
namespace shibsp {
+ class SHIBSP_API Application;
+
/**
* Extended criteria for metadata lookup for Shibboleth-aware metadata providers.
*/
*
* @param app application performing the lookup
*/
- MetadataProviderCriteria(const Application& app) : application(app) {
- }
+ MetadataProviderCriteria(const Application& app);
/**
* Constructor.
* @param prot protocol support constant, if any
* @param valid true iff stale metadata should be ignored
*/
- MetadataProviderCriteria(const Application& app, const XMLCh* id, const xmltooling::QName* q=NULL, const XMLCh* prot=NULL, bool valid=true)
- : opensaml::saml2md::MetadataProvider::Criteria(id, q, prot, valid), application(app) {
- }
+ MetadataProviderCriteria(
+ const Application& app, const XMLCh* id, const xmltooling::QName* q=NULL, const XMLCh* prot=NULL, bool valid=true
+ );
/**
* Constructor.
* @param prot protocol support constant, if any
* @param valid true iff stale metadata should be ignored
*/
- MetadataProviderCriteria(const Application& app, const char* id, const xmltooling::QName* q=NULL, const XMLCh* prot=NULL, bool valid=true)
- : opensaml::saml2md::MetadataProvider::Criteria(id, q, prot, valid), application(app) {
- }
+ MetadataProviderCriteria(
+ const Application& app, const char* id, const xmltooling::QName* q=NULL, const XMLCh* prot=NULL, bool valid=true
+ );
/**
* Constructor.
* @param prot protocol support constant, if any
* @param valid true iff stale metadata should be ignored
*/
- MetadataProviderCriteria(const Application& app, const opensaml::SAMLArtifact* a, const xmltooling::QName* q=NULL, const XMLCh* prot=NULL, bool valid=true)
- : opensaml::saml2md::MetadataProvider::Criteria(a, q, prot, valid), application(app) {
- }
+ MetadataProviderCriteria(
+ const Application& app, const opensaml::SAMLArtifact* a, const xmltooling::QName* q=NULL, const XMLCh* prot=NULL, bool valid=true
+ );
+
+ ~MetadataProviderCriteria();
- /** Controls whether stale metadata is ignored. */
+ /** The application performing the lookup. */
const Application& application;
};
};
{
MAKE_NONCOPYABLE(Remoted);
protected:
- Remoted() {}
+ Remoted();
public:
- virtual ~Remoted() {}
+ virtual ~Remoted();
/**
* Remoted classes implement this method to process incoming messages.
*/
class SHIBSP_API ListenerService : public virtual Remoted
{
+ protected:
+ ListenerService();
public:
- virtual ~ListenerService() {}
+ virtual ~ListenerService();
/**
* Send a remoted message and return the response.
* @param force true iff remnant network state should be forcibly cleared
* @return true iff the service initialization was successful
*/
- virtual bool init(bool force) {
- return true;
- }
+ virtual bool init(bool force);
/**
* OutOfProcess servers can implement server-side transport handling by
/**
* OutOfProcess servers can implement server-side termination/cleanup.
*/
- virtual void term() {
- }
+ virtual void term();
private:
std::map<std::string,Remoted*> m_listenerMap;
#endif
}
+Remoted::Remoted()
+{
+}
+
+Remoted::~Remoted()
+{
+}
+
+ListenerService::ListenerService()
+{
+}
+
+ListenerService::~ListenerService()
+{
+}
+
Remoted* ListenerService::regListener(const char* address, Remoted* listener)
{
Remoted* ret=NULL;
dest->receive(in, out);
}
+
+bool ListenerService::init(bool force)
+{
+ return true;
+}
+
+void ListenerService::term()
+{
+}
}
}
+SecurityPolicy::~SecurityPolicy()
+{
+}
+
opensaml::saml2md::MetadataProvider::Criteria& SecurityPolicy::getMetadataProviderCriteria() const
{
if (!m_metadataCriteria)
m_metadataCriteria->reset();
return *m_metadataCriteria;
}
+
+const Application& SecurityPolicy::getApplication() const
+{
+ return m_application;
+}
*/
SecurityPolicy(const Application& application, const xmltooling::QName* role=NULL, bool validate=true, const char* policyId=NULL);
- virtual ~SecurityPolicy() {}
+ virtual ~SecurityPolicy();
opensaml::saml2md::MetadataProvider::Criteria& getMetadataProviderCriteria() const;
*
* @return the associated Application
*/
- const Application& getApplication() const {
- return m_application;
- }
+ const Application& getApplication() const;
private:
const Application& m_application;
RelativePath=".\attribute\ExtensibleAttribute.cpp"\r
>\r
</File>\r
+ <File\r
+ RelativePath=".\attribute\NameIDAttribute.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\attribute\ScopedAttribute.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\attribute\SimpleAttribute.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\attribute\XMLAttribute.cpp"\r
+ >\r
+ </File>\r
</Filter>\r
<Filter\r
Name="handler"\r
RelativePath=".\metadata\MetadataExtSchemaValidators.cpp"\r
>\r
</File>\r
+ <File\r
+ RelativePath=".\metadata\MetadataProviderCriteria.cpp"\r
+ >\r
+ </File>\r
</Filter>\r
<Filter\r
Name="remoting"\r
>\r
</File>\r
<File\r
+ RelativePath=".\attribute\NameIDAttribute.cpp"\r
+ >\r
+ </File>\r
+ <File\r
RelativePath=".\attribute\NameIDAttributeDecoder.cpp"\r
>\r
</File>\r
>\r
</File>\r
<File\r
+ RelativePath=".\attribute\ScopedAttribute.cpp"\r
+ >\r
+ </File>\r
+ <File\r
RelativePath=".\attribute\ScopedAttributeDecoder.cpp"\r
>\r
</File>\r
<File\r
+ RelativePath=".\attribute\SimpleAttribute.cpp"\r
+ >\r
+ </File>\r
+ <File\r
RelativePath=".\attribute\StringAttributeDecoder.cpp"\r
>\r
</File>\r
<File\r
+ RelativePath=".\attribute\XMLAttribute.cpp"\r
+ >\r
+ </File>\r
+ <File\r
RelativePath=".\attribute\XMLAttributeDecoder.cpp"\r
>\r
</File>\r
>\r
</File>\r
<File\r
+ RelativePath=".\attribute\filtering\impl\BasicFilteringContext.cpp"\r
+ >\r
+ </File>\r
+ <File\r
RelativePath=".\attribute\filtering\impl\ChainingAttributeFilter.cpp"\r
>\r
</File>\r
#include "util/CGIParser.h"
#include <xmltooling/XMLToolingConfig.h>
+#include <xmltooling/io/HTTPRequest.h>
#include <xmltooling/util/URLEncoder.h>
using namespace shibsp;
#define __shibsp_cgi_h__
#include <shibsp/base.h>
-#include <xmltooling/io/HTTPRequest.h>
+
+#include <map>
+#include <string>
+
+namespace xmltooling {
+ class XMLTOOL_API HTTPRequest;
+};
namespace shibsp {
using namespace xercesc;
using namespace std;
+PropertySet::PropertySet()
+{
+}
+
+PropertySet::~PropertySet()
+{
+}
+
+DOMPropertySet::DOMPropertySet() : m_parent(NULL), m_root(NULL)
+{
+}
+
DOMPropertySet::~DOMPropertySet()
{
for (map<string,pair<char*,const XMLCh*> >::iterator i=m_map.begin(); i!=m_map.end(); i++)
for_each(m_nested.begin(),m_nested.end(),cleanup_pair<string,DOMPropertySet>());
}
+const PropertySet* DOMPropertySet::getParent() const
+{
+ return m_parent;
+}
+
+void DOMPropertySet::setParent(const PropertySet* parent)
+{
+ m_parent = parent;
+}
+
+const DOMElement* DOMPropertySet::getElement() const
+{
+ return m_root;
+}
+
void DOMPropertySet::load(
const DOMElement* e,
Category* log,
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#define __shibsp_dompropset_h__
#include <shibsp/util/PropertySet.h>
+
#include <xmltooling/logging.h>
namespace shibsp {
class SHIBSP_API DOMPropertySet : public virtual PropertySet
{
public:
- DOMPropertySet() : m_parent(NULL), m_root(NULL) {}
+ DOMPropertySet();
virtual ~DOMPropertySet();
- const PropertySet* getParent() const {
- return m_parent;
- }
-
- void setParent(const PropertySet* parent) {
- m_parent = parent;
- }
-
+ const PropertySet* getParent() const;
+ void setParent(const PropertySet* parent);
std::pair<bool,bool> getBool(const char* name, const char* ns=NULL) const;
std::pair<bool,const char*> getString(const char* name, const char* ns=NULL) const;
std::pair<bool,const XMLCh*> getXMLString(const char* name, const char* ns=NULL) const;
std::pair<bool,int> getInt(const char* name, const char* ns=NULL) const;
void getAll(std::map<std::string,const char*>& properties) const;
const PropertySet* getPropertySet(const char* name, const char* ns=shibspconstants::ASCII_SHIB2SPCONFIG_NS) const;
-
- const xercesc::DOMElement* getElement() const {
- return m_root;
- }
+ const xercesc::DOMElement* getElement() const;
/**
* Loads the property set from a DOM element.
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#define __shibsp_propset_h__
#include <shibsp/util/SPConstants.h>
+
#include <map>
+#include <string>
#include <xercesc/dom/DOM.hpp>
namespace shibsp {
{
MAKE_NONCOPYABLE(PropertySet);
protected:
- PropertySet() {}
+ PropertySet();
public:
- virtual ~PropertySet() {}
+ virtual ~PropertySet();
/**
* Returns parent of this PropertySet, if any.
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#define __shibsp_constants_h__
#include <shibsp/base.h>
-#ifndef SHIBSP_LITE
-# include <saml/util/SAMLConstants.h>
-#else
-# include <shibsp/lite/SAMLConstants.h>
-#endif
+#include <xercesc/util/XercesDefs.hpp>
/**
* Shibboleth SP XML constants.
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
#include "internal.h"
+#include "util/PropertySet.h"
#include "util/TemplateParameters.h"
#include <ctime>
using namespace xmltooling;
using namespace std;
+TemplateParameters::TemplateParameters(const exception* e, const PropertySet* props)
+ : m_exception(e), m_toolingException(dynamic_cast<const XMLToolingException*>(e))
+{
+ setPropertySet(props);
+}
+
+TemplateParameters::~TemplateParameters()
+{
+}
+
void TemplateParameters::setPropertySet(const PropertySet* props)
{
m_props = props;
#endif
}
+const XMLToolingException* TemplateParameters::getRichException() const
+{
+ return m_toolingException;
+}
+
const char* TemplateParameters::getParameter(const char* name) const
{
if (m_exception) {
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2009 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef __shibsp_tempparams_h__
#define __shibsp_tempparams_h__
-#include <shibsp/util/PropertySet.h>
+#include <shibsp/base.h>
+
#include <xmltooling/util/TemplateEngine.h>
namespace shibsp {
+ class SHIBSP_API PropertySet;
+
/**
* Supplies xmltooling TemplateEngine with additional parameters from a PropertySet.
*/
* @param e an exception to supply additional parameters
* @param props a PropertySet to supply additional parameters
*/
- TemplateParameters(const std::exception* e=NULL, const PropertySet* props=NULL)
- : m_exception(e), m_toolingException(dynamic_cast<const xmltooling::XMLToolingException*>(e)) {
- setPropertySet(props);
- }
+ TemplateParameters(const std::exception* e=NULL, const PropertySet* props=NULL);
- virtual ~TemplateParameters() {}
+ virtual ~TemplateParameters();
/**
* Sets a PropertySet to supply additional parameters.
*
* @return an exception, or NULL
*/
- const xmltooling::XMLToolingException* getRichException() const {
- return m_toolingException;
- }
+ const xmltooling::XMLToolingException* getRichException() const;
const char* getParameter(const char* name) const;
/*\r
- * Copyright 2001-2007 Internet2\r
+ * Copyright 2001-2009 Internet2\r
* \r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
using namespace xmltooling;\r
using namespace std;\r
\r
+using xercesc::XMLString;\r
+\r
void usage()\r
{\r
cerr << "usage: mdquery -e <entityID> [-a <app id> -nostrict]" << endl;\r
#endif
#include <shibsp/Application.h>
-#include <shibsp/exceptions.h>
#include <shibsp/SPConfig.h>
#include <shibsp/ServiceProvider.h>
#include <shibsp/attribute/Attribute.h>
#include <shibsp/metadata/MetadataProviderCriteria.h>
#include <shibsp/util/SPConstants.h>
+#include <saml/exceptions.h>
#include <saml/saml1/core/Assertions.h>
#include <saml/saml2/core/Assertions.h>
#include <saml/saml2/metadata/Metadata.h>
+#include <saml/saml2/metadata/MetadataProvider.h>
#include <xercesc/util/XMLUniDefs.hpp>
#include <xmltooling/XMLToolingConfig.h>
#include <xmltooling/util/XMLHelper.h>