Reducing header overuse, non-inlining selected methods (CPPOST-35).
authorScott Cantor <cantor.2@osu.edu>
Sun, 11 Oct 2009 21:24:16 +0000 (21:24 +0000)
committerScott Cantor <cantor.2@osu.edu>
Sun, 11 Oct 2009 21:24:16 +0000 (21:24 +0000)
123 files changed:
.cproject
adfs/adfs.cpp
shibsp/AbstractSPRequest.cpp
shibsp/AbstractSPRequest.h
shibsp/AccessControl.h
shibsp/Application.cpp
shibsp/Application.h
shibsp/Makefile.am
shibsp/RequestMapper.h
shibsp/SPConfig.h
shibsp/SPRequest.h
shibsp/ServiceProvider.cpp
shibsp/ServiceProvider.h
shibsp/SessionCache.h
shibsp/SessionCacheEx.h
shibsp/attribute/Attribute.cpp
shibsp/attribute/Attribute.h
shibsp/attribute/AttributeDecoder.h
shibsp/attribute/ExtensibleAttribute.cpp
shibsp/attribute/ExtensibleAttribute.h
shibsp/attribute/NameIDAttribute.cpp [new file with mode: 0644]
shibsp/attribute/NameIDAttribute.h
shibsp/attribute/ScopedAttribute.cpp [new file with mode: 0644]
shibsp/attribute/ScopedAttribute.h
shibsp/attribute/SimpleAttribute.cpp [new file with mode: 0644]
shibsp/attribute/SimpleAttribute.h
shibsp/attribute/XMLAttribute.cpp [new file with mode: 0644]
shibsp/attribute/XMLAttribute.h
shibsp/attribute/filtering/AttributeFilter.h
shibsp/attribute/filtering/BasicFilteringContext.h
shibsp/attribute/filtering/FilterPolicyContext.h
shibsp/attribute/filtering/FilteringContext.h
shibsp/attribute/filtering/MatchFunctor.h
shibsp/attribute/filtering/impl/AndMatchFunctor.cpp
shibsp/attribute/filtering/impl/AnyMatchFunctor.cpp
shibsp/attribute/filtering/impl/AttributeFilter.cpp
shibsp/attribute/filtering/impl/AttributeIssuerInEntityGroupFunctor.cpp
shibsp/attribute/filtering/impl/AttributeIssuerRegexFunctor.cpp
shibsp/attribute/filtering/impl/AttributeIssuerStringFunctor.cpp
shibsp/attribute/filtering/impl/AttributeRequesterInEntityGroupFunctor.cpp
shibsp/attribute/filtering/impl/AttributeRequesterRegexFunctor.cpp
shibsp/attribute/filtering/impl/AttributeRequesterStringFunctor.cpp
shibsp/attribute/filtering/impl/AttributeScopeMatchesShibMDScopeFunctor.cpp
shibsp/attribute/filtering/impl/AttributeScopeRegexFunctor.cpp
shibsp/attribute/filtering/impl/AttributeScopeStringFunctor.cpp
shibsp/attribute/filtering/impl/AttributeValueRegexFunctor.cpp
shibsp/attribute/filtering/impl/AttributeValueStringFunctor.cpp
shibsp/attribute/filtering/impl/AuthenticationMethodRegexFunctor.cpp
shibsp/attribute/filtering/impl/AuthenticationMethodStringFunctor.cpp
shibsp/attribute/filtering/impl/BasicFilteringContext.cpp [new file with mode: 0644]
shibsp/attribute/filtering/impl/MatchFunctor.cpp
shibsp/attribute/filtering/impl/NotMatchFunctor.cpp
shibsp/attribute/filtering/impl/NumberOfAttributeValuesFunctor.cpp
shibsp/attribute/filtering/impl/OrMatchFunctor.cpp
shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp
shibsp/attribute/resolver/AttributeExtractor.h
shibsp/attribute/resolver/AttributeResolver.h
shibsp/attribute/resolver/ResolutionContext.h
shibsp/attribute/resolver/impl/ChainingAttributeExtractor.cpp
shibsp/attribute/resolver/impl/ChainingAttributeResolver.cpp
shibsp/attribute/resolver/impl/DelegationAttributeExtractor.cpp
shibsp/attribute/resolver/impl/KeyDescriptorAttributeExtractor.cpp
shibsp/attribute/resolver/impl/QueryAttributeResolver.cpp
shibsp/attribute/resolver/impl/SimpleAggregationAttributeResolver.cpp
shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp
shibsp/binding/ArtifactResolver.h
shibsp/binding/SOAPClient.h
shibsp/binding/impl/ArtifactResolver.cpp
shibsp/binding/impl/SOAPClient.cpp
shibsp/exceptions.h
shibsp/handler/AbstractHandler.h
shibsp/handler/AssertionConsumerService.h
shibsp/handler/Handler.h
shibsp/handler/LogoutHandler.h
shibsp/handler/RemotedHandler.h
shibsp/handler/SessionInitiator.h
shibsp/handler/impl/AbstractHandler.cpp
shibsp/handler/impl/AssertionConsumerService.cpp
shibsp/handler/impl/AssertionLookup.cpp
shibsp/handler/impl/LocalLogoutInitiator.cpp
shibsp/handler/impl/LogoutHandler.cpp
shibsp/handler/impl/MetadataGenerator.cpp
shibsp/handler/impl/RemotedHandler.cpp
shibsp/handler/impl/SAML1Consumer.cpp
shibsp/handler/impl/SAML2ArtifactResolution.cpp
shibsp/handler/impl/SAML2Consumer.cpp
shibsp/handler/impl/SAML2Logout.cpp
shibsp/handler/impl/SAML2LogoutInitiator.cpp
shibsp/handler/impl/SAML2NameIDMgmt.cpp
shibsp/handler/impl/SAML2SessionInitiator.cpp
shibsp/handler/impl/SAMLDSSessionInitiator.cpp
shibsp/handler/impl/SessionInitiator.cpp
shibsp/handler/impl/Shib1SessionInitiator.cpp
shibsp/handler/impl/StatusHandler.cpp
shibsp/handler/impl/WAYFSessionInitiator.cpp
shibsp/impl/ChainingAccessControl.cpp
shibsp/impl/StorageServiceSessionCache.cpp
shibsp/impl/XMLRequestMapper.cpp
shibsp/impl/XMLServiceProvider.cpp
shibsp/lite/CommonDomainCookie.cpp
shibsp/lite/CommonDomainCookie.h
shibsp/lite/SAMLConstants.h
shibsp/metadata/DynamicMetadataProvider.cpp
shibsp/metadata/MetadataExt.h
shibsp/metadata/MetadataExtImpl.cpp
shibsp/metadata/MetadataProviderCriteria.cpp [new file with mode: 0644]
shibsp/metadata/MetadataProviderCriteria.h
shibsp/remoting/ListenerService.h
shibsp/remoting/impl/ListenerService.cpp
shibsp/security/SecurityPolicy.cpp
shibsp/security/SecurityPolicy.h
shibsp/shibsp-lite.vcproj
shibsp/shibsp.vcproj
shibsp/util/CGIParser.cpp
shibsp/util/CGIParser.h
shibsp/util/DOMPropertySet.cpp
shibsp/util/DOMPropertySet.h
shibsp/util/PropertySet.h
shibsp/util/SPConstants.h
shibsp/util/TemplateParameters.cpp
shibsp/util/TemplateParameters.h
util/mdquery.cpp
util/resolvertest.cpp

index fbbebfe..0f46347 100644 (file)
--- a/.cproject
+++ b/.cproject
@@ -1,7 +1,4 @@
-<?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
index fe942dd..7495b09 100644 (file)
 # 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>
index c18d826..78b2ae9 100644 (file)
@@ -31,6 +31,23 @@ using namespace opensaml;
 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)
@@ -50,6 +67,11 @@ AbstractSPRequest::~AbstractSPRequest()
     delete m_parser;
 }
 
+const ServiceProvider& AbstractSPRequest::getServiceProvider() const
+{
+    return *m_sp;
+}
+
 RequestMapper::Settings AbstractSPRequest::getRequestSettings() const
 {
     if (!m_mapper) {
@@ -147,6 +169,11 @@ void AbstractSPRequest::setRequestURI(const char* uri)
     }
 }
 
+const char* AbstractSPRequest::getRequestURI() const
+{
+    return m_uri.c_str();
+}
+
 const char* AbstractSPRequest::getRequestURL() const
 {
     if (m_url.empty()) {
index 1253256..eed7516 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -58,32 +58,17 @@ namespace shibsp {
     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:
index 59178aa..c94e969 100644 (file)
@@ -42,9 +42,9 @@ namespace shibsp {
     {
         MAKE_NONCOPYABLE(AccessControl);
     protected:
-        AccessControl() {}
+        AccessControl();
     public:
-        virtual ~AccessControl() {}
+        virtual ~AccessControl();
 
         /**
          * Possible results from an access control decision.
index 6ee7919..b54e5d5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -28,6 +28,7 @@
 #include "remoting/ListenerService.h"
 
 #include <algorithm>
+#include <xmltooling/util/Threads.h>
 
 using namespace shibsp;
 using namespace xmltooling;
@@ -42,6 +43,16 @@ Application::~Application()
     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=/";
index cfd38e7..676b24c 100644 (file)
 
 #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 {
 
@@ -90,18 +103,14 @@ 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.
index baa88ad..dea7654 100644 (file)
@@ -107,6 +107,10 @@ common_sources = \
        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 \
@@ -164,6 +168,7 @@ libshibsp_la_SOURCES = \
        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 \
@@ -195,6 +200,7 @@ libshibsp_la_SOURCES = \
        metadata/DynamicMetadataProvider.cpp \
        metadata/MetadataExtImpl.cpp \
        metadata/MetadataExtSchemaValidators.cpp \
+       metadata/MetadataProviderCriteria.cpp \
        security/PKIXTrustEngine.cpp \
        security/SecurityPolicy.cpp
 
index 646cbdd..12971e2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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 {
 
@@ -42,9 +45,9 @@ 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;
index 44975eb..c9985a9 100644 (file)
 #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>
index 255e8b5..6ce9eff 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -17,7 +17,7 @@
 /**
  * @file shibsp/SPRequest.h
  *
- * Interface to server request being processed
+ * Interface to server request being processed.
  */
 
 #ifndef __shibsp_req_h__
@@ -45,9 +45,9 @@ namespace shibsp {
     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.
@@ -98,9 +98,7 @@ namespace shibsp {
          * @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.
@@ -130,8 +128,7 @@ namespace shibsp {
          *
          * @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 {
index 0006dbc..52d0bac 100644 (file)
 
 #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>
@@ -139,6 +143,14 @@ void SHIBSP_API shibsp::registerServiceProviders()
     SPConfig::getConfig().ServiceProviderManager.registerFactory(XML_SERVICE_PROVIDER, XMLServiceProviderFactory);
 }
 
+ServiceProvider::ServiceProvider()
+{
+}
+
+ServiceProvider::~ServiceProvider()
+{
+}
+
 pair<bool,long> ServiceProvider::doAuthentication(SPRequest& request, bool handler) const
 {
 #ifdef _DEBUG
index 9ef1dae..2d0694a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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 {
 
@@ -54,9 +61,9 @@ namespace shibsp {
     {
         MAKE_NONCOPYABLE(ServiceProvider);
     protected:
-        ServiceProvider() {}
+        ServiceProvider();
     public:
-        virtual ~ServiceProvider() {}
+        virtual ~ServiceProvider();
         
         /**
          * Loads a configuration and prepares the instance for use.
index ad3af9d..b69e065 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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 {
 
@@ -49,8 +60,8 @@ namespace shibsp {
     {
         MAKE_NONCOPYABLE(Session);
     protected:
-        Session() {}
-        virtual ~Session() {}
+        Session();
+        virtual ~Session();
     public:
         /**
          * Returns the session key.
@@ -203,9 +214,9 @@ namespace shibsp {
     {
         MAKE_NONCOPYABLE(SessionCache);
     protected:
-        SessionCache() {}
+        SessionCache();
     public:
-        virtual ~SessionCache() {}
+        virtual ~SessionCache();
 
 #ifndef SHIBSP_LITE
         /**
index b71f568..61a35fb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -33,9 +33,9 @@ namespace shibsp {
     class SHIBSP_API SessionCacheEx : public SessionCache
     {
     protected:
-        SessionCacheEx() {}
+        SessionCacheEx();
     public:
-        virtual ~SessionCacheEx() {}
+        virtual ~SessionCacheEx();
         
 #ifndef SHIBSP_LITE
         /**
index 4a009c0..a6a0c65 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #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;
@@ -120,6 +101,17 @@ AttributeDecoder::AttributeDecoder(const DOMElement *e) : m_caseSensitive(true),
             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()
@@ -134,6 +126,21 @@ 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();
@@ -151,6 +158,71 @@ Attribute::Attribute(DDF& in) : m_caseSensitive(in["case_insensitive"].isnull())
     }
 }
 
+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);
@@ -177,27 +249,3 @@ Attribute* Attribute::unmarshall(DDF& in)
         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();
-}
index 37e1d39..a9886f4 100644 (file)
@@ -23,7 +23,6 @@
 #ifndef __shibsp_attribute_h__
 #define __shibsp_attribute_h__
 
-#include <shibsp/exceptions.h>
 #include <shibsp/remoting/ddf.h>
 
 #include <map>
@@ -81,88 +80,70 @@ namespace shibsp {
         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
@@ -176,9 +157,7 @@ namespace shibsp {
          * @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).
@@ -186,19 +165,14 @@ namespace shibsp {
          * @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.
@@ -227,25 +201,19 @@ namespace shibsp {
          * @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;
index 5b0ad48..01f055b 100644 (file)
 #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.
      */
@@ -54,14 +63,10 @@ namespace shibsp {
          * @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.
index 5602c55..cede806 100644 (file)
@@ -29,6 +29,61 @@ using namespace shibsp;
 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()) {
@@ -77,3 +132,12 @@ const vector<string>& ExtensibleAttribute::getSerializedValues() const
     }
     return Attribute::getSerializedValues();
 }
+
+DDF ExtensibleAttribute::marshall() const
+{
+    if (!isCaseSensitive())
+        m_obj.addmember("case_insensitive");
+    if (isInternal())
+        m_obj.addmember("internal");
+    return m_obj.copy();
+}
index 8a12836..1543288 100644 (file)
@@ -24,7 +24,6 @@
 #define __shibsp_extattr_h__
 
 #include <shibsp/attribute/Attribute.h>
-#include <xmltooling/exceptions.h>
 
 namespace shibsp {
 
@@ -45,65 +44,32 @@ 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;
diff --git a/shibsp/attribute/NameIDAttribute.cpp b/shibsp/attribute/NameIDAttribute.cpp
new file mode 100644 (file)
index 0000000..978f78d
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+ *  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;
+}
index 1b8d247..8a0aa99 100644 (file)
@@ -24,7 +24,6 @@
 #define __shibsp_nameidattr_h__
 
 #include <shibsp/attribute/Attribute.h>
-#include <xmltooling/exceptions.h>
 
 namespace shibsp {
 
@@ -48,44 +47,16 @@ 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.
@@ -104,81 +75,23 @@ namespace shibsp {
          * 
          * @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;
diff --git a/shibsp/attribute/ScopedAttribute.cpp b/shibsp/attribute/ScopedAttribute.cpp
new file mode 100644 (file)
index 0000000..567d8cf
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ *  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;
+}
index a8acac5..808d6f3 100644 (file)
@@ -51,27 +51,16 @@ namespace shibsp {
          * @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.
@@ -80,9 +69,7 @@ namespace shibsp {
          * 
          * @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.
@@ -91,52 +78,16 @@ namespace shibsp {
          * 
          * @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;
diff --git a/shibsp/attribute/SimpleAttribute.cpp b/shibsp/attribute/SimpleAttribute.cpp
new file mode 100644 (file)
index 0000000..11af5c8
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ *  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;
+}
index 39f869c..8402159 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -38,22 +38,16 @@ namespace shibsp {
          * 
          * @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.
@@ -63,21 +57,11 @@ namespace shibsp {
          * 
          * @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;
     };
 
 };
diff --git a/shibsp/attribute/XMLAttribute.cpp b/shibsp/attribute/XMLAttribute.cpp
new file mode 100644 (file)
index 0000000..38bc13d
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ *  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;
+}
index 3c9a4f6..8f9f0a1 100644 (file)
@@ -38,69 +38,38 @@ namespace shibsp {
          *
          * @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;
index 75521a3..2a249e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
      */
@@ -36,9 +40,9 @@ namespace shibsp {
     {
         MAKE_NONCOPYABLE(AttributeFilter);
     protected:
-        AttributeFilter() {}
+        AttributeFilter();
     public:
-        virtual ~AttributeFilter() {}
+        virtual ~AttributeFilter();
 
         /**
          * Filters values out of a set of attributes.
index 6c66f57..888a324 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -27,6 +27,8 @@
 
 namespace shibsp {
 
+    class SHIBSP_API Attribute;
+
     class SHIBSP_API BasicFilteringContext : public FilteringContext
     {
     public:
@@ -45,39 +47,19 @@ namespace shibsp {
             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;
index 2fff8ae..f658643 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
      */
@@ -42,10 +44,9 @@ namespace shibsp {
          * 
          * @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.
@@ -54,9 +55,7 @@ namespace shibsp {
          *
          * @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;
index c4e3032..422a725 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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 {
 
@@ -39,9 +46,9 @@ namespace shibsp {
     {
         MAKE_NONCOPYABLE(FilteringContext);
     protected:
-        FilteringContext() {}
+        FilteringContext();
     public:
-        virtual ~FilteringContext() {}
+        virtual ~FilteringContext();
 
         /**
          * Gets the Application doing the filtering.
index 6018414..a802d3d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -37,9 +37,9 @@ namespace shibsp {
     {
         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
index 35cea2c..828071d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -23,6 +23,7 @@
 #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>
index a782f78..55bbd14 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -22,6 +22,7 @@
 
 #include "internal.h"
 #include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
 
 using namespace shibsp;
 
index ad21399..dc67e1f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -38,3 +38,11 @@ void SHIBSP_API shibsp::registerAttributeFilters()
     conf.AttributeFilterManager.registerFactory(XML_ATTRIBUTE_FILTER, XMLAttributeFilterFactory);
     conf.AttributeFilterManager.registerFactory(CHAINING_ATTRIBUTE_FILTER, ChainingAttributeFilterFactory);
 }
+
+AttributeFilter::AttributeFilter()
+{
+}
+
+AttributeFilter::~AttributeFilter()
+{
+}
index 6825fe3..9701023 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -25,6 +25,9 @@
 #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;
 
index f342f61..b421a11 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -25,6 +25,7 @@
 #include "exceptions.h"
 #include "attribute/filtering/FilteringContext.h"
 #include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
 
 #include <xercesc/util/regx/RegularExpression.hpp>
 
index 563e762..e4cb12d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -24,6 +24,7 @@
 #include "exceptions.h"
 #include "attribute/filtering/FilteringContext.h"
 #include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
 
 namespace shibsp {
 
index e774a7a..8c37255 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -17,7 +17,7 @@
 /**
  * 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.
  */
 
@@ -25,6 +25,9 @@
 #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;
 
@@ -33,7 +36,7 @@ namespace shibsp {
     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
index 1bbdc23..171a898 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -25,6 +25,7 @@
 #include "exceptions.h"
 #include "attribute/filtering/FilteringContext.h"
 #include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
 
 #include <xercesc/util/regx/RegularExpression.hpp>
 
index 5eecf7d..82cb30f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -24,6 +24,7 @@
 #include "exceptions.h"
 #include "attribute/filtering/FilteringContext.h"
 #include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
 
 namespace shibsp {
 
index b7899b3..5f57d71 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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;
index c3e58e8..3b33ac1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -25,6 +25,7 @@
 #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>
 
index 14a1bb1..9a1cdfc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -25,6 +25,7 @@
 #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;
index 5fc4fa0..ac4952b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -25,6 +25,7 @@
 #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>
 
index 707f318..7721fe8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -25,6 +25,7 @@
 #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;
index b66bbbd..d7e6665 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -25,6 +25,7 @@
 #include "exceptions.h"
 #include "attribute/filtering/FilteringContext.h"
 #include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
 
 #include <xercesc/util/regx/RegularExpression.hpp>
 
index 3c8393e..f52843a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -24,6 +24,7 @@
 #include "exceptions.h"
 #include "attribute/filtering/FilteringContext.h"
 #include "attribute/filtering/FilterPolicyContext.h"
+#include "attribute/filtering/MatchFunctor.h"
 
 namespace shibsp {
 
diff --git a/shibsp/attribute/filtering/impl/BasicFilteringContext.cpp b/shibsp/attribute/filtering/impl/BasicFilteringContext.cpp
new file mode 100644 (file)
index 0000000..67ba166
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ *  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;
+}
index 1ba0ec6..a2e7e45 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -21,6 +21,7 @@
  */
 
 #include "internal.h"
+#include "attribute/filtering/FilterPolicyContext.h"
 #include "attribute/filtering/MatchFunctor.h"
 #include "util/SPConstants.h"
 
@@ -125,3 +126,24 @@ void SHIBSP_API shibsp::registerMatchFunctors()
     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;
+}
index 9a22474..a0f07b4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -23,6 +23,7 @@
 #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>
index 91d1106..f1630c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -26,6 +26,7 @@
 #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;
index 2649f42..7b260c2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -23,6 +23,7 @@
 #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>
index 32fab83..d266096 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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>
index 63644ca..faa8bf2 100644 (file)
 
 #include <shibsp/base.h>
 #include <xmltooling/Lockable.h>
-#include <saml/saml2/metadata/Metadata.h>
+
+namespace opensaml {
+    namespace saml2md {
+        class SAML_API RoleDescriptor;
+    };
+};
 
 namespace shibsp {
 
@@ -39,9 +44,9 @@ namespace shibsp {
     {
         MAKE_NONCOPYABLE(AttributeExtractor);
     protected:
-        AttributeExtractor() {}
+        AttributeExtractor();
     public:
-        virtual ~AttributeExtractor() {}
+        virtual ~AttributeExtractor();
 
         /**
          * Extracts the attributes found in an XMLObject.
index 524dde8..6123eb9 100644 (file)
 
 #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;
@@ -48,9 +56,9 @@ namespace shibsp {
     {
         MAKE_NONCOPYABLE(AttributeResolver);
     protected:
-        AttributeResolver() {}
+        AttributeResolver();
     public:
-        virtual ~AttributeResolver() {}
+        virtual ~AttributeResolver();
 
         /**
          * Creates a ResolutionContext based on session bootstrap material.
index 760246a..022e2dc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -25,7 +25,9 @@
 
 #include <shibsp/base.h>
 
-#include <saml/Assertion.h>
+namespace opensaml {
+    class SAML_API Assertion;
+};
 
 namespace shibsp {
 
@@ -38,9 +40,9 @@ namespace shibsp {
     {
         MAKE_NONCOPYABLE(ResolutionContext);
     protected:
-        ResolutionContext() {}
+        ResolutionContext();
     public:
-        virtual ~ResolutionContext() {}
+        virtual ~ResolutionContext();
         
         /**
          * Returns the set of Attributes resolved and added to the context.
index 523cdc3..d46fdff 100644 (file)
@@ -88,6 +88,14 @@ void SHIBSP_API shibsp::registerAttributeExtractors()
     SPConfig::getConfig().AttributeExtractorManager.registerFactory(CHAINING_ATTRIBUTE_EXTRACTOR, ChainingExtractorFactory);
 }
 
+AttributeExtractor::AttributeExtractor()
+{
+}
+
+AttributeExtractor::~AttributeExtractor()
+{
+}
+
 ChainingAttributeExtractor::ChainingAttributeExtractor(const DOMElement* e)
 {
     SPConfig& conf = SPConfig::getConfig();
index d0b63f1..4dd7702 100644 (file)
@@ -27,6 +27,7 @@
 #include "attribute/resolver/AttributeResolver.h"
 #include "attribute/resolver/ResolutionContext.h"
 
+#include <saml/Assertion.h>
 #include <xercesc/util/XMLUniDefs.hpp>
 #include <xmltooling/util/XMLHelper.h>
 
@@ -149,6 +150,22 @@ void SHIBSP_API shibsp::registerAttributeResolvers()
     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();
index d05fb85..f98f2a2 100644 (file)
@@ -28,7 +28,9 @@
 #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>
index 525bf9d..415ccac 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include "internal.h"
+#include "exceptions.h"
 #include "Application.h"
 #include "attribute/AttributeDecoder.h"
 #include "attribute/SimpleAttribute.h"
@@ -28,6 +29,7 @@
 
 #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>
index 78f04ae..1932218 100644 (file)
 #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>
index 74d2d35..3be90bc 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #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>
index abc2755..a8e5998 100644 (file)
  */
 
 #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>
index 7f89680..95427f6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -33,8 +33,8 @@ namespace shibsp {
      */
     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,
index eedebc0..f5b3ce3 100644 (file)
 #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.
@@ -44,10 +45,7 @@ namespace shibsp {
          */
         SOAPClient(SecurityPolicy& policy);
         
-        virtual ~SOAPClient() {
-            if (m_credResolver)
-                m_credResolver->unlock();
-        }
+        virtual ~SOAPClient();
 
         /**
          * Override handles message signing for SAML payloads.
index 3322fc2..3e18aff 100644 (file)
 
 #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>
@@ -45,6 +45,14 @@ using namespace opensaml;
 using namespace xmltooling;
 using namespace std;
 
+ArtifactResolver::ArtifactResolver()
+{
+}
+
+ArtifactResolver::~ArtifactResolver()
+{
+}
+
 saml1p::Response* ArtifactResolver::resolve(
     const vector<SAMLArtifact*>& artifacts,
     const IDPSSODescriptor& idpDescriptor,
index 2905a6b..188c035 100644 (file)
 
 #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>
@@ -45,6 +46,12 @@ SOAPClient::SOAPClient(SecurityPolicy& policy)
 {
 }
 
+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.   
index a12e720..c56197c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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 {
     
index 20a480b..fcc5927 100644 (file)
 #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 {
 
@@ -213,7 +226,7 @@ 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;
index cb73210..4354e97 100644 (file)
 
 #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 {
 
@@ -162,9 +172,7 @@ namespace shibsp {
             ) const;
 
     public:
-        const char* getType() const {
-            return "AssertionConsumerService";
-        }
+        const char* getType() const;
 
 #endif
     private:
index a73b1ff..f397e27 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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 {
@@ -39,9 +44,9 @@ namespace shibsp {
     {
         MAKE_NONCOPYABLE(Handler);
     protected:
-        Handler() {}
+        Handler();
     public:
-        virtual ~Handler() {}
+        virtual ~Handler();
 
         /**
          * Executes handler functionality as an incoming request.
@@ -72,9 +77,7 @@ namespace shibsp {
          *
          * @return  a Handler type
          */
-        virtual const char* getType() const {
-            return getString("type").second;
-        }
+        virtual const char* getType() const;
 #endif
     };
     
index 7026563..c0aa136 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -23,7 +23,6 @@
 #ifndef __shibsp_logout_h__
 #define __shibsp_logout_h__
 
-#include <shibsp/SPRequest.h>
 #include <shibsp/handler/RemotedHandler.h>
 
 namespace shibsp {
@@ -39,7 +38,7 @@ namespace shibsp {
     class SHIBSP_API LogoutHandler : public RemotedHandler
     {
     public:
-        virtual ~LogoutHandler() {}
+        virtual ~LogoutHandler();
 
         /**
          * The base method will iteratively attempt front-channel notification
@@ -69,7 +68,7 @@ namespace shibsp {
         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;
index 37c6e53..d7bdd8a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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 {
 
     /**
@@ -38,7 +42,7 @@ namespace shibsp {
         virtual ~RemotedHandler();
 
     protected:
-        RemotedHandler() {}
+        RemotedHandler();
 
         /**
          * Establishes message remoting using the supplied address.
index 1013454..67530d4 100644 (file)
@@ -40,10 +40,10 @@ namespace shibsp {
         /** 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.
@@ -61,9 +61,7 @@ namespace shibsp {
         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
     };
     
index b31cb87..5f03710 100644 (file)
@@ -21,8 +21,8 @@
  */
 
 #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
@@ -59,7 +62,6 @@ using namespace opensaml::saml2md;
 
 using namespace shibsp;
 using namespace samlconstants;
-using namespace opensaml;
 using namespace xmltooling;
 using namespace xercesc;
 using namespace std;
@@ -129,14 +131,31 @@ void SHIBSP_API shibsp::registerHandlers()
     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);
index 66e40fc..f88ba99 100644 (file)
  */
 
 #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;
@@ -224,6 +227,11 @@ void AssertionConsumerService::checkAddress(const Application& application, cons
 
 #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;
index adeb711..d842763 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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;
 
index 6850bec..5768ac4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -24,6 +24,7 @@
 #include "Application.h"
 #include "ServiceProvider.h"
 #include "SessionCache.h"
+#include "SPRequest.h"
 #include "handler/AbstractHandler.h"
 #include "handler/LogoutHandler.h"
 
index dfa43ed..b78b7f6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -25,6 +25,7 @@
 #include "Application.h"
 #include "ServiceProvider.h"
 #include "SessionCache.h"
+#include "SPRequest.h"
 #include "handler/LogoutHandler.h"
 #include "util/TemplateParameters.h"
 
@@ -37,6 +38,14 @@ using namespace shibsp;
 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
index 3444f4a..f07c5a0 100644 (file)
 #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>
index 2ee35a1..93f21df 100644 (file)
@@ -24,6 +24,7 @@
 #include "Application.h"
 #include "exceptions.h"
 #include "ServiceProvider.h"
+#include "SPRequest.h"
 #include "handler/RemotedHandler.h"
 
 #include <algorithm>
@@ -227,6 +228,10 @@ void RemotedHandler::setAddress(const char* address)
     }
 }
 
+RemotedHandler::RemotedHandler()
+{
+}
+
 RemotedHandler::~RemotedHandler()
 {
     SPConfig& conf = SPConfig::getConfig();
index f2aa0b9..88ab9c0 100644 (file)
 #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;
index 6b98392..6e609a3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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>
@@ -41,6 +43,7 @@
 using namespace opensaml::saml2md;
 using namespace opensaml::saml2p;
 using namespace opensaml::saml2;
+using namespace opensaml;
 using namespace samlconstants;
 #endif
 
@@ -48,7 +51,6 @@ using namespace samlconstants;
 
 using namespace shibspconstants;
 using namespace shibsp;
-using namespace opensaml;
 using namespace soap11;
 using namespace xmltooling;
 using namespace std;
index 9fce6ef..1c7af13 100644 (file)
 #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;
index 9a2e71a..984dc3c 100644 (file)
@@ -24,6 +24,7 @@
 #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;
index 0492d0b..e6cb57e 100644 (file)
 #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>
index 3af13a5..e285ebb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -24,6 +24,7 @@
 #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;
index 17b2550..1a7f63c 100644 (file)
 # 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
 
index e2ada3a..1c0a7e3 100644 (file)
@@ -37,6 +37,8 @@ using namespace xmltooling;
 using namespace std;
 
 #ifndef SHIBSP_LITE
+# include <saml/saml2/metadata/Metadata.h>
+# include <saml/saml2/metadata/MetadataProvider.h>
 using namespace opensaml::saml2md;
 #endif
 
index 747e8e5..b02e7d0 100644 (file)
@@ -56,6 +56,21 @@ void SHIBSP_API shibsp::registerSessionInitiators()
     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;
index f4243f2..105b5bd 100644 (file)
@@ -34,6 +34,9 @@
 # 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>
index 7bde368..64cca9a 100644 (file)
@@ -24,6 +24,7 @@
 #include "Application.h"
 #include "exceptions.h"
 #include "ServiceProvider.h"
+#include "SPRequest.h"
 #include "handler/AbstractHandler.h"
 #include "handler/RemotedHandler.h"
 #include "util/CGIParser.h"
@@ -33,6 +34,7 @@ using namespace shibsp;
 # 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;
index d76ed7b..90e565a 100644 (file)
 #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>
index 3e431c1..8f6e78c 100644 (file)
@@ -83,6 +83,14 @@ void SHIBSP_API shibsp::registerAccessControls()
     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
index 0fd8f6d..5d23f12 100644 (file)
 #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;
@@ -355,6 +360,14 @@ void SHIBSP_API shibsp::registerSessionCaches()
     SPConfig::getConfig().SessionCacheManager.registerFactory(STORAGESERVICE_SESSION_CACHE, StorageServiceCacheFactory);
 }
 
+Session::Session()
+{
+}
+
+Session::~Session()
+{
+}
+
 void StoredSession::unmarshallAttributes() const
 {
     Attribute* attribute;
@@ -714,6 +727,22 @@ void StoredSession::addAssertion(Assertion* assertion)
 
 #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
index 304cb9f..c048e0c 100644 (file)
@@ -163,6 +163,14 @@ void SHIBSP_API shibsp::registerRequestMappers()
     conf.RequestMapperManager.registerFactory(NATIVE_REQUEST_MAPPER, XMLRequestMapperFactory);
 }
 
+RequestMapper::RequestMapper()
+{
+}
+
+RequestMapper::~RequestMapper()
+{
+}
+
 void Override::loadACL(const DOMElement* e, Category& log)
 {
     try {
index b8b2fab..79c62ed 100644 (file)
 # 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;
index cb8ffc0..2d3eeee 100644 (file)
@@ -69,6 +69,15 @@ CommonDomainCookie::CommonDomainCookie(const char* cookie)
     }
 }
 
+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.
index a15f88c..faffa46 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -47,16 +47,14 @@ namespace opensaml {
          */
         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.
index f04b3f3..83b4de9 100644 (file)
@@ -23,7 +23,8 @@
 #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.
index 9b03d7c..2698baa 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "internal.h"
 #include "exceptions.h"
+#include "Application.h"
 #include "ServiceProvider.h"
 #include "metadata/MetadataProviderCriteria.h"
 
index d0badc0..c9054c2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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);
index 71fb17a..7ae11c2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -29,6 +29,7 @@
 #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;
diff --git a/shibsp/metadata/MetadataProviderCriteria.cpp b/shibsp/metadata/MetadataProviderCriteria.cpp
new file mode 100644 (file)
index 0000000..55ddffd
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ *  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()
+{
+}
index 286a4a0..d1a0d98 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
      */
@@ -38,8 +41,7 @@ namespace shibsp {
          *
          * @param app   application performing the lookup
          */
-        MetadataProviderCriteria(const Application& app) : application(app) {
-        }
+        MetadataProviderCriteria(const Application& app);
 
         /**
          * Constructor.
@@ -50,9 +52,9 @@ namespace shibsp {
          * @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.
@@ -63,9 +65,9 @@ namespace shibsp {
          * @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.
@@ -76,11 +78,13 @@ namespace shibsp {
          * @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;
     };
 };
index c85af8c..60b5b7a 100644 (file)
@@ -39,9 +39,9 @@ namespace shibsp {
     {
         MAKE_NONCOPYABLE(Remoted);
     protected:
-        Remoted() {}
+        Remoted();
     public:
-        virtual ~Remoted() {}
+        virtual ~Remoted();
 
         /**
          * Remoted classes implement this method to process incoming messages.
@@ -72,8 +72,10 @@ namespace shibsp {
      */
     class SHIBSP_API ListenerService : public virtual Remoted
     {
+    protected:
+        ListenerService();
     public:
-        virtual ~ListenerService() {}
+        virtual ~ListenerService();
 
         /**
          * Send a remoted message and return the response.
@@ -126,9 +128,7 @@ namespace shibsp {
          * @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
@@ -142,8 +142,7 @@ namespace shibsp {
         /**
          * OutOfProcess servers can implement server-side termination/cleanup.
          */
-        virtual void term() {
-        }
+        virtual void term();
 
     private:
         std::map<std::string,Remoted*> m_listenerMap;
index f33b307..814db96 100644 (file)
@@ -48,6 +48,22 @@ void SHIBSP_API shibsp::registerListenerServices()
 #endif
 }
 
+Remoted::Remoted()
+{
+}
+
+Remoted::~Remoted()
+{
+}
+
+ListenerService::ListenerService()
+{
+}
+
+ListenerService::~ListenerService()
+{
+}
+
 Remoted* ListenerService::regListener(const char* address, Remoted* listener)
 {
     Remoted* ret=NULL;
@@ -96,3 +112,12 @@ void ListenerService::receive(DDF &in, ostream& out)
 
     dest->receive(in, out);
 }
+
+bool ListenerService::init(bool force)
+{
+    return true;
+}
+
+void ListenerService::term()
+{
+}
index 8317554..e66c028 100644 (file)
@@ -43,6 +43,10 @@ SecurityPolicy::SecurityPolicy(const Application& application, const xmltooling:
     }
 }
 
+SecurityPolicy::~SecurityPolicy()
+{
+}
+
 opensaml::saml2md::MetadataProvider::Criteria& SecurityPolicy::getMetadataProviderCriteria() const
 {
     if (!m_metadataCriteria)
@@ -51,3 +55,8 @@ opensaml::saml2md::MetadataProvider::Criteria& SecurityPolicy::getMetadataProvid
         m_metadataCriteria->reset();
     return *m_metadataCriteria;
 }
+
+const Application& SecurityPolicy::getApplication() const
+{
+    return m_application;
+}
index 29a3bf5..0357e82 100644 (file)
@@ -46,7 +46,7 @@ namespace shibsp {
          */
         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;
 
@@ -55,9 +55,7 @@ namespace shibsp {
          *
          * @return the associated Application
          */
-        const Application& getApplication() const {
-            return m_application;
-        }
+        const Application& getApplication() const;
 
     private:
         const Application& m_application;
index beccaa1..a109bb8 100644 (file)
                                        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
index df32894..72d6861 100644 (file)
                                        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
index d1cba90..0314896 100644 (file)
@@ -24,6 +24,7 @@
 #include "util/CGIParser.h"
 
 #include <xmltooling/XMLToolingConfig.h>
+#include <xmltooling/io/HTTPRequest.h>
 #include <xmltooling/util/URLEncoder.h>
 
 using namespace shibsp;
index c0e3371..66d133b 100644 (file)
 #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 {
 
index d28922e..0a5dadd 100644 (file)
@@ -32,6 +32,18 @@ using namespace xmltooling;
 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++)
@@ -39,6 +51,21 @@ DOMPropertySet::~DOMPropertySet()
     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,
index d642615..a42294b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -24,6 +24,7 @@
 #define __shibsp_dompropset_h__
 
 #include <shibsp/util/PropertySet.h>
+
 #include <xmltooling/logging.h>
 
 namespace shibsp {
@@ -34,18 +35,12 @@ 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;
@@ -53,10 +48,7 @@ namespace shibsp {
         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.
index bfc7988..98c1091 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -24,7 +24,9 @@
 #define __shibsp_propset_h__
 
 #include <shibsp/util/SPConstants.h>
+
 #include <map>
+#include <string>
 #include <xercesc/dom/DOM.hpp>
 
 namespace shibsp {
@@ -36,9 +38,9 @@ namespace shibsp {
     {
         MAKE_NONCOPYABLE(PropertySet);
     protected:
-        PropertySet() {}
+        PropertySet();
     public:
-        virtual ~PropertySet() {}
+        virtual ~PropertySet();
 
         /**
          * Returns parent of this PropertySet, if any.
index dd730f9..20f9cc2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
index f83abd2..520dfc0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
@@ -21,6 +21,7 @@
  */
 
 #include "internal.h"
+#include "util/PropertySet.h"
 #include "util/TemplateParameters.h"
 
 #include <ctime>
@@ -31,6 +32,16 @@ using namespace shibsp;
 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;
@@ -48,6 +59,11 @@ void TemplateParameters::setPropertySet(const PropertySet* props)
 #endif
 }
 
+const XMLToolingException* TemplateParameters::getRichException() const
+{
+    return m_toolingException;
+}
+
 const char* TemplateParameters::getParameter(const char* name) const
 {
     if (m_exception) {
index f04f42a..783979c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  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.
      */
@@ -40,12 +43,9 @@ namespace shibsp {
          * @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.
@@ -59,9 +59,7 @@ namespace shibsp {
          *
          * @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;
         
index 89cc34e..053e994 100644 (file)
@@ -1,5 +1,5 @@
 /*\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
@@ -47,6 +47,8 @@ using namespace xmltooling::logging;
 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
index c9d98ac..e9424ec 100644 (file)
@@ -32,7 +32,6 @@
 #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>