2 * Copyright 2001-2009 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/security/SecurityPolicy.h
20 * SP-specific SecurityPolicy subclass.
23 #ifndef __shibsp_secpol_h__
24 #define __shibsp_secpol_h__
26 #include <shibsp/base.h>
27 #include <saml/saml2/profile/SAML2AssertionPolicy.h>
31 class SHIBSP_API Application;
34 * SP-specific SecurityPolicy subclass.
36 class SHIBSP_API SecurityPolicy : public opensaml::saml2::SAML2AssertionPolicy
40 * Constructor for policy.
42 * @param application an Application instance
43 * @param role identifies the role (generally IdP or SP) of the policy peer
44 * @param validate true iff XML parsing should be done with validation
45 * @param policyId identifies policy rules to auto-attach, defaults to the application's set
47 SecurityPolicy(const Application& application, const xmltooling::QName* role=NULL, bool validate=true, const char* policyId=NULL);
49 virtual ~SecurityPolicy();
51 opensaml::saml2md::MetadataProvider::Criteria& getMetadataProviderCriteria() const;
54 * Returns the Application associated with the policy.
56 * @return the associated Application
58 const Application& getApplication() const;
61 const Application& m_application;
66 #endif /* __shibsp_secpol_h__ */