2 * Copyright 2001-2006 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/Application.h
20 * Interface to a Shibboleth Application instance.
23 #ifndef __shibsp_app_h__
24 #define __shibsp_app_h__
26 #include <shibsp/util/PropertySet.h>
27 #include <saml/saml2/metadata/MetadataProvider.h>
28 #include <xmltooling/security/TrustEngine.h>
33 * Interface to a Shibboleth Application instance.
35 * <p>An Application is a logical set of resources that act as a unit
36 * of session management and policy.
38 class SHIBSP_API Application : public virtual PropertySet
40 MAKE_NONCOPYABLE(Application);
44 virtual ~Application() {}
47 * Returns the Application's ID.
51 virtual const char* getId() const=0;
54 * Returns a unique hash for the Application.
56 * @return a value resulting from a hash of the Application's ID
58 virtual const char* getHash() const=0;
61 * Returns the name and cookie properties to use for this Application.
63 * @param prefix a value to prepend to the base cookie name
64 * @return a pair containing the cookie name and the string to append to the cookie value
66 virtual std::pair<std::string,const char*> getCookieNameProps(const char* prefix) const;
69 * Returns a MetadataProvider for use with this Application.
71 * @return a MetadataProvider instance, or NULL
73 virtual opensaml::saml2md::MetadataProvider* getMetadataProvider() const=0;
76 * Returns a TrustEngine for use with this Application.
78 * @return a TrustEngine instance, or NULL
80 virtual xmltooling::TrustEngine* getTrustEngine() const=0;
83 * Returns configuration properties governing security interactions with a peer entity.
85 * @param provider a peer entity's metadata
86 * @return the applicable PropertySet
88 virtual const shibsp::PropertySet* getCredentialUse(const opensaml::saml2md::EntityDescriptor* provider) const=0;
92 #endif /* __shibsp_app_h__ */