2 * Copyright 2010 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 saml/saml2/metadata/DiscoverableMetadataProvider.h
20 * A metadata provider that provides a JSON feed of IdP discovery information.
23 #ifndef __saml2_discometadataprov_h__
24 #define __saml2_discometadataprov_h__
26 #include <saml/saml2/metadata/MetadataProvider.h>
32 #if defined (_MSC_VER)
33 #pragma warning( push )
34 #pragma warning( disable : 4251 )
37 * A metadata provider that provides a JSON feed of IdP discovery information.
39 class SAML_API DiscoverableMetadataProvider : public virtual MetadataProvider
42 DiscoverableMetadataProvider();
45 * Generates a JSON feed of IdP discovery information for the current metadata.
46 * <p>The provider <strong>MUST</strong> be write-locked.
48 virtual void generateFeed();
51 virtual ~DiscoverableMetadataProvider();
54 * Returns the ETag associated with the cached feed.
55 * <p>The provider <strong>MUST</strong> be locked.
57 * @return the ETag value for the current feed state
59 virtual std::string getCacheTag() const;
62 * Outputs the cached feed.
63 * <p>The provider <strong>MUST</strong> be locked.
65 * @param os stream to output feed into
66 * @return a reference to the output stream
68 virtual std::ostream& outputFeed(std::ostream& os) const;
71 /** Storage for feed. */
75 mutable std::string m_feedTag;
78 #if defined (_MSC_VER)
79 #pragma warning( pop )
85 #endif /* __saml2_discometadataprov_h__ */