Doc cleanups.
[shibboleth/sp.git] / shibsp / attribute / filtering / BasicFilteringContext.h
1 /*
2  *  Copyright 2001-2010 Internet2
3  * 
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
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 /**
18  * @file shibsp/attribute/filtering/BasicFilteringContext.h
19  * 
20  * A trivial FilteringContext implementation.
21  */
22
23 #ifndef __shibsp_basicfiltctx_h__
24 #define __shibsp_basicfiltctx_h__
25
26 #include <shibsp/attribute/filtering/FilteringContext.h>
27
28 namespace shibsp {
29
30     class SHIBSP_API Attribute;
31
32     /**
33      * A trivial FilteringContext implementation.
34      */
35     class SHIBSP_API BasicFilteringContext : public FilteringContext
36     {
37     public:
38         /**
39          * Constructor.
40          *
41          * @param app                   reference to Application
42          * @param attributes            attributes being filtered
43          * @param role                  metadata role of Attribute issuer, if any
44          * @param authncontext_class    method/category of authentication event, if known
45          * @param authncontext_decl     specifics of authentication event, if known
46          */
47         BasicFilteringContext(
48             const Application& app,
49             const std::vector<Attribute*>& attributes,
50             const opensaml::saml2md::RoleDescriptor* role=nullptr,
51             const XMLCh* authncontext_class=nullptr,
52             const XMLCh* authncontext_decl=nullptr
53             );
54
55         virtual ~BasicFilteringContext();
56
57         // Virtual function overrides.
58         const Application& getApplication() const;
59         const XMLCh* getAuthnContextClassRef() const;
60         const XMLCh* getAuthnContextDeclRef() const;
61         const XMLCh* getAttributeRequester() const;
62         const XMLCh* getAttributeIssuer() const;
63         const opensaml::saml2md::RoleDescriptor* getAttributeRequesterMetadata() const;
64         const opensaml::saml2md::RoleDescriptor* getAttributeIssuerMetadata() const;
65         const std::multimap<std::string,Attribute*>& getAttributes() const;
66
67     private:
68         const Application& m_app;
69         std::multimap<std::string,Attribute*> m_attributes;
70         const opensaml::saml2md::RoleDescriptor* m_role;
71         const XMLCh* m_issuer;
72         const XMLCh* m_class;
73         const XMLCh* m_decl;
74     };
75 };
76
77 #endif /* __shibsp_basicfiltctx_h__ */