2 * Licensed to the University Corporation for Advanced Internet
3 * Development, Inc. (UCAID) under one or more contributor license
4 * agreements. See the NOTICE file distributed with this work for
5 * additional information regarding copyright ownership.
7 * UCAID licenses this file to you under the Apache License,
8 * Version 2.0 (the "License"); you may not use this file except
9 * in compliance with the License. You may obtain a copy of the
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
17 * either express or implied. See the License for the specific
18 * language governing permissions and limitations under the License.
22 * @file shibsp/attribute/filtering/FilteringContext.h
24 * Context for attribute filtering operations.
27 #ifndef __shibsp_filtctx_h__
28 #define __shibsp_filtctx_h__
30 #include <shibsp/base.h>
37 class SAML_API RoleDescriptor;
43 class SHIBSP_API Application;
44 class SHIBSP_API Attribute;
47 * Context for attribute filtering operations.
49 class SHIBSP_API FilteringContext
51 MAKE_NONCOPYABLE(FilteringContext);
55 virtual ~FilteringContext();
58 * Gets the Application doing the filtering.
60 * @return reference to an Application
62 virtual const Application& getApplication() const=0;
65 * Returns a URI containing an AuthnContextClassRef associated with the subject.
67 * <p>SAML 1.x AuthenticationMethods will be returned as class references.
69 * @return a URI identifying the authentication context class
71 virtual const XMLCh* getAuthnContextClassRef() const=0;
74 * Returns a URI containing an AuthnContextDeclRef associated with the subject.
76 * @return a URI identifying the authentication context declaration
78 virtual const XMLCh* getAuthnContextDeclRef() const=0;
81 * Gets the ID of the requester of the attributes, if known.
83 * @return requester of the attributes, or nullptr
85 virtual const XMLCh* getAttributeRequester() const=0;
88 * Gets the ID of the issuer of the attributes, if known.
90 * @return ID of the issuer of the attributes, or nullptr
92 virtual const XMLCh* getAttributeIssuer() const=0;
95 * Gets the SAML metadata for the attribute requesting role, if available.
97 * @return SAML metadata for the attribute requesting role, or nullptr
99 virtual const opensaml::saml2md::RoleDescriptor* getAttributeRequesterMetadata() const=0;
102 * Gets the SAML metadata for the attribute issuing role, if available.
104 * @return SAML metadata for the attribute issuing role, or nullptr
106 virtual const opensaml::saml2md::RoleDescriptor* getAttributeIssuerMetadata() const=0;
109 * Returns the set of Attributes being filtered.
111 * <p>No modifications should be performed, access is provided only for use by
112 * MatchFunctors based on the presence of Attribute data.
114 * @return an immutable map of Attributes.
116 virtual const std::multimap<std::string,Attribute*>& getAttributes() const=0;
121 #endif /* __shibsp_filtctx_h__ */