[cpp-opensaml COMMIT] in /branches/REL_2: .gitignore saml/profile/impl/ConditionsRule.cpp saml/saml2/metadata/Metadat...
noreply at shibboleth.net
noreply at shibboleth.net
Tue May 22 01:36:00 BST 2012
Author: scantor
Date: Tue May 22 01:36:00 2012
New Revision: 728
URL: http://svn.shibboleth.net/view/cpp-opensaml?rev=728&view=rev
Log:
Add context API to metadata filters.
Modified:
branches/REL_2/.gitignore
branches/REL_2/saml/profile/impl/ConditionsRule.cpp
branches/REL_2/saml/saml2/metadata/MetadataFilter.h
branches/REL_2/saml/saml2/metadata/MetadataProvider.h
branches/REL_2/saml/saml2/metadata/impl/MetadataProvider.cpp
Modified: branches/REL_2/.gitignore
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/.gitignore?rev=728&r1=727&r2=728&view=diff
==============================================================================
--- branches/REL_2/.gitignore (original)
+++ branches/REL_2/.gitignore Tue May 22 01:36:00 2012
@@ -38,6 +38,11 @@
/ipch
/build-aux
/build
+/config.cache
+/opensaml-uninstalled.pc
+/opensaml-uninstalled.sh
+/opensaml.pc
+/opensaml.pc.in
# /doc/
/doc/api
Modified: branches/REL_2/saml/profile/impl/ConditionsRule.cpp
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/profile/impl/ConditionsRule.cpp?rev=728&r1=727&r2=728&view=diff
==============================================================================
--- branches/REL_2/saml/profile/impl/ConditionsRule.cpp (original)
+++ branches/REL_2/saml/profile/impl/ConditionsRule.cpp Tue May 22 01:36:00 2012
@@ -99,7 +99,7 @@
log.info("building SecurityPolicyRule of type %s", t.c_str());
m_rules.push_back(SAMLConfig::getConfig().SecurityPolicyRuleManager.newPlugin(t.c_str(), e));
}
- catch (exception& ex) {
+ catch (std::exception& ex) {
log.crit("error building SecurityPolicyRule: %s", ex.what());
}
}
Modified: branches/REL_2/saml/saml2/metadata/MetadataFilter.h
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/saml2/metadata/MetadataFilter.h?rev=728&r1=727&r2=728&view=diff
==============================================================================
--- branches/REL_2/saml/saml2/metadata/MetadataFilter.h (original)
+++ branches/REL_2/saml/saml2/metadata/MetadataFilter.h Tue May 22 01:36:00 2012
@@ -33,6 +33,18 @@
namespace saml2md {
/**
+ * Marker interface for supplying environmental context to filters.
+ */
+ class SAML_API MetadataFilterContext
+ {
+ MAKE_NONCOPYABLE(MetadataFilterContext);
+ protected:
+ MetadataFilterContext();
+ public:
+ virtual ~MetadataFilterContext();
+ };
+
+ /**
* A metadata filter is used to process metadata after resolution and unmarshalling.
*
* Some filters might remove everything but identity provider roles, decreasing the data a service provider
@@ -55,12 +67,22 @@
virtual const char* getId() const=0;
/**
+ * @deprecated
* Filters the given metadata. Exceptions should generally not be thrown to
* signal the removal of information, only for systemic processing failure.
*
- * @param xmlObject the metadata to be filtered.
+ * @param xmlObject the metadata to be filtered
*/
- virtual void doFilter(xmltooling::XMLObject& xmlObject) const=0;
+ virtual void doFilter(xmltooling::XMLObject& xmlObject) const;
+
+ /**
+ * Filters the given metadata. Exceptions should generally not be thrown to
+ * signal the removal of information, only for systemic processing failure.
+ *
+ * @param ctx context interface, or nullptr
+ * @param xmlObject the metadata to be filtered
+ */
+ virtual void doFilter(MetadataFilterContext* ctx, xmltooling::XMLObject& xmlObject) const;
};
/**
@@ -69,22 +91,22 @@
void SAML_API registerMetadataFilters();
/** MetadataFilter that deletes blacklisted entities. */
- #define BLACKLIST_METADATA_FILTER "Blacklist"
+ #define BLACKLIST_METADATA_FILTER "Blacklist"
/** MetadataFilter that deletes all but whitelisted entities. */
- #define WHITELIST_METADATA_FILTER "Whitelist"
+ #define WHITELIST_METADATA_FILTER "Whitelist"
/** MetadataFilter that verifies signatures and filters out any that don't pass. */
- #define SIGNATURE_METADATA_FILTER "Signature"
+ #define SIGNATURE_METADATA_FILTER "Signature"
/** MetadataFilter that enforces expiration requirements. */
- #define REQUIREVALIDUNTIL_METADATA_FILTER "RequireValidUntil"
+ #define REQUIREVALIDUNTIL_METADATA_FILTER "RequireValidUntil"
/** MetadataFilter that removes non-retained roles. */
- #define ENTITYROLE_METADATA_FILTER "EntityRoleWhiteList"
+ #define ENTITYROLE_METADATA_FILTER "EntityRoleWhiteList"
/** MetadataFilter that adds EntityAttributes extension. */
[... 118 lines stripped ...]
More information about the commits
mailing list