diff options
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2/Configuration/OAuth2Element.cs')
-rw-r--r-- | src/DotNetOpenAuth.OAuth2/Configuration/OAuth2Element.cs | 60 |
1 files changed, 4 insertions, 56 deletions
diff --git a/src/DotNetOpenAuth.OAuth2/Configuration/OAuth2Element.cs b/src/DotNetOpenAuth.OAuth2/Configuration/OAuth2Element.cs index 6ba7e23..858d27b 100644 --- a/src/DotNetOpenAuth.OAuth2/Configuration/OAuth2Element.cs +++ b/src/DotNetOpenAuth.OAuth2/Configuration/OAuth2Element.cs @@ -11,68 +11,16 @@ namespace DotNetOpenAuth.Configuration { /// <summary> /// Represents the <oauth> element in the host's .config file. /// </summary> - internal class OAuth2Element : ConfigurationSection { + internal class OAuth2SectionGroup : ConfigurationSectionGroup { /// <summary> /// The name of the oauth section. /// </summary> - private const string SectionName = DotNetOpenAuthSection.SectionName + "/oauth2"; + internal const string SectionName = DotNetOpenAuthSection.SectionName + "/oauth2"; /// <summary> - /// The name of the <client> sub-element. + /// Initializes a new instance of the <see cref="OAuth2SectionGroup"/> class. /// </summary> - private const string ClientElementName = "client"; - - /// <summary> - /// The name of the <authorizationServer> sub-element. - /// </summary> - private const string AuthorizationServerElementName = "authorizationServer"; - - /// <summary> - /// The name of the <resourceServer> sub-element. - /// </summary> - private const string ResourceServerElementName = "resourceServer"; - - /// <summary> - /// Initializes a new instance of the <see cref="OAuth2Element"/> class. - /// </summary> - internal OAuth2Element() { - } - - /// <summary> - /// Gets the configuration section from the .config file. - /// </summary> - public static OAuth2Element Configuration { - get { - Contract.Ensures(Contract.Result<OAuth2Element>() != null); - return (OAuth2Element)ConfigurationManager.GetSection(SectionName) ?? new OAuth2Element(); - } - } - - /// <summary> - /// Gets or sets the configuration specific for Clients. - /// </summary> - [ConfigurationProperty(ClientElementName)] - internal OAuth2ClientElement Client { - get { return (OAuth2ClientElement)this[ClientElementName] ?? new OAuth2ClientElement(); } - set { this[ClientElementName] = value; } - } - - /// <summary> - /// Gets or sets the configuration specific for Authorization Servers. - /// </summary> - [ConfigurationProperty(AuthorizationServerElementName)] - internal OAuth2AuthorizationServerElement AuthorizationServer { - get { return (OAuth2AuthorizationServerElement)this[AuthorizationServerElementName] ?? new OAuth2AuthorizationServerElement(); } - set { this[AuthorizationServerElementName] = value; } - } - - /// <summary> - /// Gets or sets the configuration specific for Resource Servers. - /// </summary> - [ConfigurationProperty(ResourceServerElementName)] - internal OAuth2ResourceServerElement ResourceServer { - get { return (OAuth2ResourceServerElement)this[ResourceServerElementName] ?? new OAuth2ResourceServerElement(); } - set { this[ResourceServerElementName] = value; } + internal OAuth2SectionGroup() { } } } |