summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenId/Configuration/RelyingPartySection.cs
blob: 100641cb0e6ec0213ab3e898c533281b2980e69d (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
using System.Configuration;
using DotNetOpenId.RelyingParty;

namespace DotNetOpenId.Configuration {
	internal class RelyingPartySection : ConfigurationSection {
		internal static RelyingPartySection Configuration {
			get { return (RelyingPartySection)ConfigurationManager.GetSection("dotNetOpenId/relyingParty") ?? new RelyingPartySection(); }
		}

		public RelyingPartySection() {
		}

		const string securitySettingsConfigName = "security";
		[ConfigurationProperty(securitySettingsConfigName)]
		public RelyingPartySecuritySettingsElement SecuritySettings {
			get { return (RelyingPartySecuritySettingsElement)this[securitySettingsConfigName] ?? new RelyingPartySecuritySettingsElement(); }
			set { this[securitySettingsConfigName] = value; }
		}

		const string storeConfigName = "store";
		[ConfigurationProperty(storeConfigName)]
		public StoreConfigurationElement<IRelyingPartyApplicationStore> Store {
			get { return (StoreConfigurationElement<IRelyingPartyApplicationStore>)this[storeConfigName] ?? new StoreConfigurationElement<IRelyingPartyApplicationStore>(); }
			set { this[storeConfigName] = value; }
		}
	}
}