1
//-----------------------------------------------------------------------
2 // <copyright file="OpenIdProviderElement.cs" company="Andrew Arnott">
3 // Copyright (c) Andrew Arnott. All rights reserved.
5 //-----------------------------------------------------------------------
7 namespace DotNetOpenAuth
.Configuration
{
8 using System
.Configuration
;
9 using DotNetOpenAuth
.OpenId
.Provider
;
12 /// The section in the .config file that allows customization of OpenID Provider behaviors.
14 internal class OpenIdProviderElement
: ConfigurationElement
{
16 /// The name of the security sub-element.
18 private const string SecuritySettingsConfigName
= "security";
21 /// The name of the custom store sub-element.
23 private const string StoreConfigName
= "store";
26 /// Initializes a new instance of the <see cref="OpenIdProviderElement"/> class.
28 public OpenIdProviderElement() {
32 /// Gets or sets the security settings.
34 [ConfigurationProperty(SecuritySettingsConfigName
)]
35 public ProviderSecuritySettingsElement SecuritySettings
{
36 get { return (ProviderSecuritySettingsElement)this[SecuritySettingsConfigName] ?? new ProviderSecuritySettingsElement(); }
37 set { this[SecuritySettingsConfigName] = value; }
41 /// Gets or sets the type to use for storing application state.
43 [ConfigurationProperty(StoreConfigName
)]
44 public TypeConfigurationElement
<IProviderApplicationStore
> ApplicationStore
{
45 get { return (TypeConfigurationElement<IProviderApplicationStore>)this[StoreConfigName] ?? new TypeConfigurationElement<IProviderApplicationStore>(); }
46 set { this[StoreConfigName] = value; }