summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth2.ResourceServer/Configuration/OAuth2ResourceServerSection.cs
blob: 5f6cc3c14d28fc682b2f3cfde5c82c1c6777d7ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//-----------------------------------------------------------------------
// <copyright file="OAuth2ResourceServerSection.cs" company="Outercurve Foundation">
//     Copyright (c) Outercurve Foundation. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DotNetOpenAuth.Configuration {
	using System.Configuration;

	/// <summary>
	/// Represents the &lt;oauth2/resourceServer&gt; section in the host's .config file.
	/// </summary>
	internal class OAuth2ResourceServerSection : ConfigurationElement {
		/// <summary>
		/// The name of the oauth2/client section.
		/// </summary>
		private const string SectionName = OAuth2SectionGroup.SectionName + "/resourceServer";

		/// <summary>
		/// Initializes a new instance of the <see cref="OAuth2ResourceServerSection"/> class.
		/// </summary>
		internal OAuth2ResourceServerSection() {
		}

		/// <summary>
		/// Gets the configuration section from the .config file.
		/// </summary>
		internal static OAuth2ResourceServerSection Configuration {
			get {
				return (OAuth2ResourceServerSection)ConfigurationManager.GetSection(SectionName) ?? new OAuth2ResourceServerSection();
			}
		}
	}
}