X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fsaml2%2Fmetadata%2FMetadataFilter.h;h=ed89cbb394f3caba8c93755b735647651203c92c;hb=c2dd6ed076ddcd49a0c7cdf1086001d249e689dc;hp=81762e7e0d169b47d154cc6a03f62093d463c5b4;hpb=9ce601bfc8b0e99e937de6ea23978619407b6989;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/saml2/metadata/MetadataFilter.h b/saml/saml2/metadata/MetadataFilter.h index 81762e7..ed89cbb 100644 --- a/saml/saml2/metadata/MetadataFilter.h +++ b/saml/saml2/metadata/MetadataFilter.h @@ -1,41 +1,40 @@ -/* - * Copyright 2001-2007 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 +/** + * Licensed to the University Corporation for Advanced Internet + * Development, Inc. (UCAID) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for + * additional information regarding copyright ownership. + * + * UCAID licenses this file to you 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 + * 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. + * 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. */ /** * @file saml/saml2/metadata/MetadataFilter.h - * + * * Processes metadata after it's been unmarshalled. */ -#include -#include #include -#include - #ifndef __saml2_metadatafilt_h__ #define __saml2_metadatafilt_h__ namespace opensaml { - namespace saml2md { - + /** * 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 * needs to work with, or a filter could be used to perform integrity checking on the retrieved metadata by * verifying a digital signature. @@ -44,21 +43,21 @@ namespace opensaml { { MAKE_NONCOPYABLE(MetadataFilter); protected: - MetadataFilter() {} + MetadataFilter(); public: - virtual ~MetadataFilter() {} - + virtual ~MetadataFilter(); + /** * Returns an identifying string for the filter. - * + * * @return the ID string */ virtual const char* getId() const=0; - + /** * 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. */ virtual void doFilter(xmltooling::XMLObject& xmlObject) const=0; @@ -68,7 +67,7 @@ namespace opensaml { * Registers MetadataFilter classes into the runtime. */ void SAML_API registerMetadataFilters(); - + /** MetadataFilter that deletes blacklisted entities. */ #define BLACKLIST_METADATA_FILTER "Blacklist" @@ -80,7 +79,13 @@ namespace opensaml { /** MetadataFilter that enforces expiration requirements. */ #define REQUIREVALIDUNTIL_METADATA_FILTER "RequireValidUntil" - + + /** MetadataFilter that removes non-retained roles. */ + #define ENTITYROLE_METADATA_FILTER "EntityRoleWhiteList" + + /** MetadataFilter that adds EntityAttributes extension. */ + #define ENTITYATTR_METADATA_FILTER "EntityAttributes" + DECL_XMLTOOLING_EXCEPTION(MetadataFilterException,SAML_EXCEPTIONAPI(SAML_API),opensaml::saml2md,MetadataException,Exceptions related to metadata filtering); }; };