[cpp-sp] 02/02: Remove deprecated methods from ServiceProvider interface.

Scott Cantor cantor.2 at osu.edu
Mon Feb 5 16:04:10 EST 2018


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=dd93a4e7dabafe9e6d4f498dbc1bdd618b0b803d

commit dd93a4e7dabafe9e6d4f498dbc1bdd618b0b803d
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Feb 5 16:04:05 2018 -0500

    Remove deprecated methods from ServiceProvider interface.
---
 shibsp/ServiceProvider.cpp         |  9 ---------
 shibsp/ServiceProvider.h           | 20 +-------------------
 shibsp/impl/XMLServiceProvider.cpp |  8 --------
 shibsp/security/SecurityPolicy.cpp |  3 ++-
 4 files changed, 3 insertions(+), 37 deletions(-)

diff --git a/shibsp/ServiceProvider.cpp b/shibsp/ServiceProvider.cpp
index 85b96d0..2d07614 100644
--- a/shibsp/ServiceProvider.cpp
+++ b/shibsp/ServiceProvider.cpp
@@ -280,15 +280,6 @@ ServiceProvider::~ServiceProvider()
 {
 }
 
-#ifndef SHIBSP_LITE
-SecurityPolicyProvider* ServiceProvider::getSecurityPolicyProvider(bool required) const
-{
-    if (required)
-        throw ConfigurationException("No SecurityPolicyProvider available.");
-    return nullptr;
-}
-#endif
-
 Remoted* ServiceProvider::regListener(const char* address, Remoted* listener)
 {
     Remoted* ret = nullptr;
diff --git a/shibsp/ServiceProvider.h b/shibsp/ServiceProvider.h
index fe924fa..ca74573 100644
--- a/shibsp/ServiceProvider.h
+++ b/shibsp/ServiceProvider.h
@@ -127,25 +127,7 @@ namespace shibsp {
          * @param required true iff an exception should be thrown if no SecurityPolicyProvider is available
          * @return  a SecurityPolicyProvider
          */
-        virtual SecurityPolicyProvider* getSecurityPolicyProvider(bool required=true) const;
-
-        /**
-         * @deprecated
-		 * Returns the security policy settings for an identified policy.
-         *
-		 * @param id    identifies the policy to return, or nullptr for default
-         * @return a PropertySet
-		 */
-        virtual const PropertySet* getPolicySettings(const char* id) const=0;
-
-        /**
-         * @deprecated
-		 * Returns the security policy rules for an identified policy.
-         *
-		 * @param id    identifies the policy to return, or nullptr for default
-         * @return an array of policy rules
-		 */
-        virtual const std::vector<const opensaml::SecurityPolicyRule*>& getPolicyRules(const char* id) const=0;
+        virtual SecurityPolicyProvider* getSecurityPolicyProvider(bool required=true) const=0;
 
         /**
          * Sets implementation-specific transport options.
diff --git a/shibsp/impl/XMLServiceProvider.cpp b/shibsp/impl/XMLServiceProvider.cpp
index 544b054..1108ea7 100644
--- a/shibsp/impl/XMLServiceProvider.cpp
+++ b/shibsp/impl/XMLServiceProvider.cpp
@@ -419,14 +419,6 @@ namespace {
             return m_impl->m_policy.get();
         }
 
-        const PropertySet* getPolicySettings(const char* id) const {
-            return getSecurityPolicyProvider()->getPolicySettings(id);
-        }
-
-        const vector<const SecurityPolicyRule*>& getPolicyRules(const char* id) const {
-            return getSecurityPolicyProvider()->getPolicyRules(id);
-        }
-
         bool setTransportOptions(SOAPTransport& transport) const {
             bool ret = true;
             for (vector< boost::tuple<string,string,string> >::const_iterator opt = m_impl->m_transportOptions.begin();
diff --git a/shibsp/security/SecurityPolicy.cpp b/shibsp/security/SecurityPolicy.cpp
index d9329b4..81aeed1 100644
--- a/shibsp/security/SecurityPolicy.cpp
+++ b/shibsp/security/SecurityPolicy.cpp
@@ -29,6 +29,7 @@
 #include "ServiceProvider.h"
 #include "metadata/MetadataProviderCriteria.h"
 #include "security/SecurityPolicy.h"
+#include "security/SecurityPolicyProvider.h"
 
 using namespace shibsp;
 using namespace opensaml::saml2;
@@ -37,7 +38,7 @@ using namespace std;
 SecurityPolicy::SecurityPolicy(const Application& application, const xmltooling::QName* role, bool validate, const char* policyId)
         : opensaml::SecurityPolicy(application.getMetadataProvider(), role, application.getTrustEngine(), validate), m_application(application) {
     const vector<const opensaml::SecurityPolicyRule*>& rules =
-        application.getServiceProvider().getPolicyRules(policyId ? policyId : application.getString("policyId").second);
+        application.getServiceProvider().getSecurityPolicyProvider()->getPolicyRules(policyId ? policyId : application.getString("policyId").second);
     getRules().assign(rules.begin(), rules.end());
 
     // Populate audiences.

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list