summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth/Configuration/OAuthConsumerElement.cs
blob: eb65594a105c5b0ac8fb01730b472ae6559a1290 (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="OAuthConsumerElement.cs" company="Outercurve Foundation">
//     Copyright (c) Outercurve Foundation. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DotNetOpenAuth.Configuration {
	using System.Configuration;

	/// <summary>
	/// Represents the &lt;oauth/consumer&gt; element in the host's .config file.
	/// </summary>
	internal class OAuthConsumerElement : ConfigurationElement {
		/// <summary>
		/// Gets the name of the security sub-element.
		/// </summary>
		private const string SecuritySettingsConfigName = "security";

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

		/// <summary>
		/// Gets or sets the security settings.
		/// </summary>
		[ConfigurationProperty(SecuritySettingsConfigName)]
		public OAuthConsumerSecuritySettingsElement SecuritySettings {
			get { return (OAuthConsumerSecuritySettingsElement)this[SecuritySettingsConfigName] ?? new OAuthConsumerSecuritySettingsElement(); }
			set { this[SecuritySettingsConfigName] = value; }
		}
	}
}