summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nuget/content/web.config.transform7
-rw-r--r--samples/OpenIdRelyingPartyWebForms/Web.config1
-rw-r--r--src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuth.xsd38
-rw-r--r--src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs11
-rw-r--r--src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs16
-rw-r--r--src/DotNetOpenAuth.Messaging/Configuration/UntrustedWebRequestElement.cs15
-rw-r--r--src/DotNetOpenAuth.Messaging/Util.cs2
7 files changed, 43 insertions, 47 deletions
diff --git a/nuget/content/web.config.transform b/nuget/content/web.config.transform
index 1958981..8dcadcd 100644
--- a/nuget/content/web.config.transform
+++ b/nuget/content/web.config.transform
@@ -1,7 +1,12 @@
<configuration>
<configSections>
<section name="uri" type="System.Configuration.UriSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <section name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection" requirePermission="false" allowLocation="true"/>
+ <sectionGroup name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection">
+ <section name="openid" type="DotNetOpenAuth.Configuration.OpenIdElement" requirePermission="false" allowLocation="true" />
+ <section name="oauth" type="DotNetOpenAuth.Configuration.OAuthElement" requirePermission="false" allowLocation="true" />
+ <section name="messaging" type="DotNetOpenAuth.Configuration.MessagingElement" requirePermission="false" allowLocation="true" />
+ <section name="reporting" type="DotNetOpenAuth.Configuration.ReportingElement" requirePermission="false" allowLocation="true" />
+ </sectionGroup>
</configSections>
<uri>
diff --git a/samples/OpenIdRelyingPartyWebForms/Web.config b/samples/OpenIdRelyingPartyWebForms/Web.config
index 5514e4f..bec5ae7 100644
--- a/samples/OpenIdRelyingPartyWebForms/Web.config
+++ b/samples/OpenIdRelyingPartyWebForms/Web.config
@@ -5,6 +5,7 @@
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler" requirePermission="false" />
<sectionGroup name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection">
<section name="openid" type="DotNetOpenAuth.Configuration.OpenIdElement" requirePermission="false" allowLocation="true" />
+ <section name="oauth" type="DotNetOpenAuth.Configuration.OAuthElement" requirePermission="false" allowLocation="true" />
<section name="messaging" type="DotNetOpenAuth.Configuration.MessagingElement" requirePermission="false" allowLocation="true" />
<section name="reporting" type="DotNetOpenAuth.Configuration.ReportingElement" requirePermission="false" allowLocation="true" />
</sectionGroup>
diff --git a/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuth.xsd b/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuth.xsd
index 065b5ee..d193776 100644
--- a/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuth.xsd
+++ b/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuth.xsd
@@ -190,6 +190,25 @@
</xs:attribute>
</xs:complexType>
</xs:element>
+ <xs:element name="webResourceUrlProvider">
+ <xs:annotation>
+ <xs:documentation>
+ The type that implements the DotNetOpenAuth.IEmbeddedResourceRetrieval interface
+ to instantiate for obtaining URLs that fetch embedded resource streams.
+ Primarily useful when the System.Web.UI.Page class is not used in the ASP.NET pipeline.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attribute name="type" type="xs:string" use="optional">
+ <xs:annotation>
+ <xs:documentation>
+ The fully-qualified name of the type that implements the IEmbeddedResourceRetrieval interface.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="xaml" type="xs:string" use="optional" />
+ </xs:complexType>
+ </xs:element>
</xs:choice>
<xs:attribute name="lifetime" type="xs:string">
<xs:annotation>
@@ -943,25 +962,6 @@
</xs:attribute>
</xs:complexType>
</xs:element>
- <xs:element name="webResourceUrlProvider">
- <xs:annotation>
- <xs:documentation>
- The type that implements the DotNetOpenAuth.IEmbeddedResourceRetrieval interface
- to instantiate for obtaining URLs that fetch embedded resource streams.
- Primarily useful when the System.Web.UI.Page class is not used in the ASP.NET pipeline.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:attribute name="type" type="xs:string" use="optional">
- <xs:annotation>
- <xs:documentation>
- The fully-qualified name of the type that implements the IEmbeddedResourceRetrieval interface.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="xaml" type="xs:string" use="optional" />
- </xs:complexType>
- </xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
diff --git a/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs b/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs
index b4dfc15..af9d45b 100644
--- a/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs
+++ b/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs
@@ -58,16 +58,5 @@ namespace DotNetOpenAuth.Configuration {
internal static ReportingElement Reporting {
get { return ReportingElement.Configuration; }
}
-
- /// <summary>
- /// Gets or sets the embedded resource retrieval provider.
- /// </summary>
- /// <value>
- /// The embedded resource retrieval provider.
- /// </value>
- internal TypeConfigurationElement<IEmbeddedResourceRetrieval> EmbeddedResourceRetrievalProvider {
- get { return /*TODO: (TypeConfigurationElement<IEmbeddedResourceRetrieval>)this[WebResourceUrlProviderName] ??*/ new TypeConfigurationElement<IEmbeddedResourceRetrieval>(); }
- set { /*this[WebResourceUrlProviderName] = value;*/ }
- }
}
}
diff --git a/src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs b/src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs
index cec2552..42ab0eb 100644
--- a/src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs
+++ b/src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs
@@ -17,6 +17,11 @@ namespace DotNetOpenAuth.Configuration {
[ContractVerification(true)]
public class MessagingElement : ConfigurationSection {
/// <summary>
+ /// The name of the &lt;webResourceUrlProvider&gt; sub-element.
+ /// </summary>
+ private const string WebResourceUrlProviderName = "webResourceUrlProvider";
+
+ /// <summary>
/// The name of the &lt;untrustedWebRequest&gt; sub-element.
/// </summary>
private const string UntrustedWebRequestElementName = "untrustedWebRequest";
@@ -188,5 +193,16 @@ namespace DotNetOpenAuth.Configuration {
get { return (int)this[MaximumIndirectMessageUrlLengthConfigName]; }
set { this[MaximumIndirectMessageUrlLengthConfigName] = value; }
}
+
+ /// <summary>
+ /// Gets or sets the embedded resource retrieval provider.
+ /// </summary>
+ /// <value>
+ /// The embedded resource retrieval provider.
+ /// </value>
+ internal TypeConfigurationElement<IEmbeddedResourceRetrieval> EmbeddedResourceRetrievalProvider {
+ get { return (TypeConfigurationElement<IEmbeddedResourceRetrieval>)this[WebResourceUrlProviderName] ?? new TypeConfigurationElement<IEmbeddedResourceRetrieval>(); }
+ set { this[WebResourceUrlProviderName] = value; }
+ }
}
}
diff --git a/src/DotNetOpenAuth.Messaging/Configuration/UntrustedWebRequestElement.cs b/src/DotNetOpenAuth.Messaging/Configuration/UntrustedWebRequestElement.cs
index f5a142a..43e41d9 100644
--- a/src/DotNetOpenAuth.Messaging/Configuration/UntrustedWebRequestElement.cs
+++ b/src/DotNetOpenAuth.Messaging/Configuration/UntrustedWebRequestElement.cs
@@ -14,11 +14,6 @@ namespace DotNetOpenAuth.Configuration {
/// to user-provided, untrusted servers is controlled.
/// </summary>
internal class UntrustedWebRequestElement : ConfigurationElement {
- /// <summary>
- /// The name of the &lt;webResourceUrlProvider&gt; sub-element.
- /// </summary>
- private const string WebResourceUrlProviderName = "webResourceUrlProvider";
-
#region Attribute names
/// <summary>
@@ -64,16 +59,6 @@ namespace DotNetOpenAuth.Configuration {
#endregion
/// <summary>
- /// Gets the configuration section from the .config file.
- /// </summary>
- public static UntrustedWebRequestElement Configuration {
- get {
- Contract.Ensures(Contract.Result<UntrustedWebRequestElement>() != null);
- return (UntrustedWebRequestElement)ConfigurationManager.GetSection(WebResourceUrlProviderName) ?? new UntrustedWebRequestElement();
- }
- }
-
- /// <summary>
/// Gets or sets the read/write timeout after which an HTTP request will fail.
/// </summary>
[ConfigurationProperty(ReadWriteTimeoutConfigName, DefaultValue = "00:00:01.500")]
diff --git a/src/DotNetOpenAuth.Messaging/Util.cs b/src/DotNetOpenAuth.Messaging/Util.cs
index 0317c4d..d6f8f23 100644
--- a/src/DotNetOpenAuth.Messaging/Util.cs
+++ b/src/DotNetOpenAuth.Messaging/Util.cs
@@ -30,7 +30,7 @@ namespace DotNetOpenAuth {
/// <summary>
/// The web.config file-specified provider of web resource URLs.
/// </summary>
- private static IEmbeddedResourceRetrieval embeddedResourceRetrieval = DotNetOpenAuthSection.Configuration.EmbeddedResourceRetrievalProvider.CreateInstance(null, false);
+ private static IEmbeddedResourceRetrieval embeddedResourceRetrieval = MessagingElement.Configuration.EmbeddedResourceRetrievalProvider.CreateInstance(null, false);
/// <summary>
/// Gets a human-readable description of the library name and version, including