2 * Copyright 2001-2007 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @file shibsp/attribute/filtering/FilteringContext.h
20 * Context for attribute filtering operations.
23 #ifndef __shibsp_filtctx_h__
24 #define __shibsp_filtctx_h__
26 #include <shibsp/base.h>
28 #include <saml/saml2/metadata/Metadata.h>
32 class SHIBSP_API Application;
33 class SHIBSP_API Attribute;
36 * Context for attribute filtering operations.
38 class SHIBSP_API FilteringContext
40 MAKE_NONCOPYABLE(FilteringContext);
44 virtual ~FilteringContext() {}
47 * Gets the Application doing the filtering.
49 * @return reference to an Application
51 virtual const Application& getApplication() const=0;
54 * Returns a URI containing an AuthnContextClassRef associated with the subject.
56 * <p>SAML 1.x AuthenticationMethods will be returned as class references.
58 * @return a URI identifying the authentication context class
60 virtual const XMLCh* getAuthnContextClassRef() const=0;
63 * Returns a URI containing an AuthnContextDeclRef associated with the subject.
65 * @return a URI identifying the authentication context declaration
67 virtual const XMLCh* getAuthnContextDeclRef() const=0;
70 * Gets the ID of the requester of the attributes, if known.
72 * @return requester of the attributes, or NULL
74 virtual const XMLCh* getAttributeRequester() const=0;
77 * Gets the ID of the issuer of the attributes, if known.
79 * @return ID of the issuer of the attributes, or NULL
81 virtual const XMLCh* getAttributeIssuer() const=0;
84 * Gets the SAML metadata for the attribute requesting role, if available.
86 * @return SAML metadata for the attribute requesting role, or NULL
88 virtual const opensaml::saml2md::RoleDescriptor* getAttributeRequesterMetadata() const=0;
91 * Gets the SAML metadata for the attribute issuing role, if available.
93 * @return SAML metadata for the attribute issuing role, or NULL
95 virtual const opensaml::saml2md::RoleDescriptor* getAttributeIssuerMetadata() const=0;
98 * Returns the set of Attributes being filtered.
100 * <p>No modifications should be performed, access is provided only for use by
101 * MatchFunctors based on the presence of Attribute data.
103 * @return an immutable map of Attributes.
105 virtual const std::multimap<std::string,Attribute*>& getAttributes() const=0;
110 #endif /* __shibsp_filtctx_h__ */