diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-06-26 20:06:21 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-06-26 20:06:21 -0700 |
commit | 510e6585af17e9d3db1388460b7c123f5e990912 (patch) | |
tree | 15141d9a45c6bc16f864b48e2806117a942282b8 | |
parent | cd9eb0d49c1ebd26ebca66c90cfad0a998289851 (diff) | |
parent | 72878a1268c0afbed57b35d2fc63c0884ac93113 (diff) | |
download | DotNetOpenAuth-510e6585af17e9d3db1388460b7c123f5e990912.zip DotNetOpenAuth-510e6585af17e9d3db1388460b7c123f5e990912.tar.gz DotNetOpenAuth-510e6585af17e9d3db1388460b7c123f5e990912.tar.bz2 |
Merge branch 'v3.0' into v3.1v3.1.1.9177
-rw-r--r-- | build.proj | 1 | ||||
-rw-r--r-- | doc/README.Bin.html | 30 | ||||
-rw-r--r-- | src/DotNetOpenAuth/Configuration/DotNetOpenAuth.xsd | 212 | ||||
-rw-r--r-- | src/DotNetOpenAuth/DotNetOpenAuth.csproj | 3 | ||||
-rw-r--r-- | src/DotNetOpenAuth/Loggers/Log4NetLogger.cs | 6 | ||||
-rw-r--r-- | src/DotNetOpenAuth/Messaging/Channel.cs | 5 |
6 files changed, 252 insertions, 5 deletions
@@ -166,6 +166,7 @@ $(OutputPath)\$(ProductName).???; $(OutputPath)\$(ProductName).Contracts.???; $(ProjectRoot)\Doc\README.Bin.html; + $(ProjectRoot)\src\$(ProductName)\Configuration\$(ProductName).xsd; " /> <DropLibSourceFiles Include=" $(ProjectRoot)\Lib\log4net.*; diff --git a/doc/README.Bin.html b/doc/README.Bin.html index 4d6df90..de05333 100644 --- a/doc/README.Bin.html +++ b/doc/README.Bin.html @@ -9,10 +9,20 @@ { vertical-align: top; } + .style1 + { + font-family: "Courier New", Courier, monospace; + } + .style2 + { + font-family: "Courier New", Courier, monospace; + font-style: italic; + } </style> </head> <body> - <h1>Binary dependencies of sites using this library</h1> + <h1>Files in this directory</h1> + <h2>Binary dependencies of sites using this library</h2> <table> <tr> <th> @@ -43,7 +53,7 @@ <th> log4net.dll </th> - <td>If present, will allow for recording log messages this library emits.</td> + <td>If present and v1.2.10, will allow for recording log messages this library emits.</td> </tr> <tr> <th> @@ -53,5 +63,21 @@ developing DotNetOpenAuth itself.</td> </tr> </table> + <h2>Other files</h2> + <table> + <tr> + <th> + DotNetOpenAuth.xsd + </th> + <td>Provides Intellisense for the web.config or app.config files of projects using this library. + To activate Intellisense, modify your <span class="style1"> + %PROGRAMFILES%\Microsoft Visual Studio 9.0\Xml\Schemas\catalog.xml</span> file + to include this entry:<br /> + <span class="style1"><Association extension="config" schema="</span><span + class="style2">permanent-directory</span><span class="style1">\DotNetOpenAuth.xsd" + condition="%TargetFrameworkVersion% != 2.0 and %TargetFrameworkVersion% != 3.0" + /> </span> </td> + </tr> + </table> </body> </html> diff --git a/src/DotNetOpenAuth/Configuration/DotNetOpenAuth.xsd b/src/DotNetOpenAuth/Configuration/DotNetOpenAuth.xsd new file mode 100644 index 0000000..24251c2 --- /dev/null +++ b/src/DotNetOpenAuth/Configuration/DotNetOpenAuth.xsd @@ -0,0 +1,212 @@ +<?xml version="1.0" encoding="utf-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:vs="http://schemas.microsoft.com/Visual-Studio-Intellisense" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> + <xs:element name="dotNetOpenAuth"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="messaging"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="untrustedWebRequest"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="whitelistHosts"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="add"> + <xs:complexType> + <xs:attribute name="name" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="remove"> + <xs:complexType> + <xs:attribute name="name" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="clear"> + <xs:complexType> + <!--tag is empty--> + </xs:complexType> + </xs:element> + </xs:choice> + </xs:complexType> + </xs:element> + <xs:element name="whitelistHostsRegex"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="add"> + <xs:complexType> + <xs:attribute name="name" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="remove"> + <xs:complexType> + <xs:attribute name="name" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="clear"> + <xs:complexType> + <!--tag is empty--> + </xs:complexType> + </xs:element> + </xs:choice> + </xs:complexType> + </xs:element> + <xs:element name="blacklistHosts"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="add"> + <xs:complexType> + <xs:attribute name="name" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="remove"> + <xs:complexType> + <xs:attribute name="name" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="clear"> + <xs:complexType> + <!--tag is empty--> + </xs:complexType> + </xs:element> + </xs:choice> + </xs:complexType> + </xs:element> + <xs:element name="blacklistHostsRegex"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="add"> + <xs:complexType> + <xs:attribute name="name" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="remove"> + <xs:complexType> + <xs:attribute name="name" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="clear"> + <xs:complexType> + <!--tag is empty--> + </xs:complexType> + </xs:element> + </xs:choice> + </xs:complexType> + </xs:element> + </xs:choice> + <xs:attribute name="timeout" type="xs:string" /> + <xs:attribute name="readWriteTimeout" type="xs:string" /> + <xs:attribute name="maximumBytesToRead" type="xs:int" /> + <xs:attribute name="maximumRedirections" type="xs:int" /> + </xs:complexType> + </xs:element> + </xs:choice> + <xs:attribute name="lifetime" type="xs:string" /> + <xs:attribute name="clockSkew" type="xs:string" /> + </xs:complexType> + </xs:element> + <xs:element name="openid"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="relyingParty"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="security"> + <xs:complexType> + <xs:attribute name="requireSsl" type="xs:boolean" default="false" /> + <xs:attribute name="minimumRequiredOpenIdVersion"> + <xs:simpleType> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="V10" /> + <xs:enumeration value="V11" /> + <xs:enumeration value="V20" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="minimumHashBitLength" type="xs:int" /> + <xs:attribute name="maximumHashBitLength" type="xs:int" /> + <xs:attribute name="privateSecretMaximumAge" type="xs:string" /> + </xs:complexType> + </xs:element> + <xs:element name="store"> + <xs:complexType> + <xs:attribute name="type" type="xs:string"/> + </xs:complexType> + </xs:element> + </xs:choice> + </xs:complexType> + </xs:element> + <xs:element name="provider"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="security"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="associations"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="add"> + <xs:complexType> + <xs:attribute name="type" type="xs:string" use="required" /> + <xs:attribute name="lifetime" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="remove"> + <xs:complexType> + <xs:attribute name="type" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="clear"> + <xs:complexType> + <!--tag is empty--> + </xs:complexType> + </xs:element> + </xs:choice> + </xs:complexType> + </xs:element> + </xs:choice> + <xs:attribute name="protectDownlevelReplayAttacks" type="xs:boolean" /> + <xs:attribute name="minimumHashBitLength" type="xs:int" /> + <xs:attribute name="maximumHashBitLength" type="xs:int" /> + </xs:complexType> + </xs:element> + <xs:element name="store"> + <xs:complexType> + <xs:attribute name="type" type="xs:string"/> + </xs:complexType> + </xs:element> + </xs:choice> + </xs:complexType> + </xs:element> + <xs:element name="extensionFactories"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="add"> + <xs:complexType> + <xs:attribute name="type" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="remove"> + <xs:complexType> + <xs:attribute name="type" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="clear"> + <xs:complexType> + <!--tag is empty--> + </xs:complexType> + </xs:element> + </xs:choice> + </xs:complexType> + </xs:element> + </xs:choice> + <xs:attribute name="maxAuthenticationTime" type="xs:string" /> + </xs:complexType> + </xs:element> + </xs:choice> + </xs:complexType> + </xs:element> +</xs:schema> diff --git a/src/DotNetOpenAuth/DotNetOpenAuth.csproj b/src/DotNetOpenAuth/DotNetOpenAuth.csproj index 64519f6..64e30c2 100644 --- a/src/DotNetOpenAuth/DotNetOpenAuth.csproj +++ b/src/DotNetOpenAuth/DotNetOpenAuth.csproj @@ -491,6 +491,7 @@ <Compile Include="Yadis\Yadis.cs" /> </ItemGroup> <ItemGroup> + <None Include="Configuration\DotNetOpenAuth.xsd" /> <None Include="OAuth\ClassDiagram.cd" /> <None Include="OAuth\Messages\OAuth Messages.cd" /> <None Include="Messaging\Bindings\Bindings.cd" /> @@ -552,4 +553,4 @@ </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="..\..\tools\DotNetOpenAuth.Versioning.targets" /> -</Project>
\ No newline at end of file +</Project> diff --git a/src/DotNetOpenAuth/Loggers/Log4NetLogger.cs b/src/DotNetOpenAuth/Loggers/Log4NetLogger.cs index 30d93ae..dd71a05 100644 --- a/src/DotNetOpenAuth/Loggers/Log4NetLogger.cs +++ b/src/DotNetOpenAuth/Loggers/Log4NetLogger.cs @@ -197,7 +197,11 @@ namespace DotNetOpenAuth.Loggers { /// </summary> /// <returns>The created <see cref="ILog"/> instance.</returns> internal static ILog Initialize(string name) { - return IsLog4NetPresent ? CreateLogger(name) : null; + try { + return IsLog4NetPresent ? CreateLogger(name) : null; + } catch (FileLoadException) { // wrong log4net.dll version + return null; + } } /// <summary> diff --git a/src/DotNetOpenAuth/Messaging/Channel.cs b/src/DotNetOpenAuth/Messaging/Channel.cs index 0f307b5..2e0f1a8 100644 --- a/src/DotNetOpenAuth/Messaging/Channel.cs +++ b/src/DotNetOpenAuth/Messaging/Channel.cs @@ -67,7 +67,9 @@ namespace DotNetOpenAuth.Messaging { /// </remarks> private const string IndirectMessageFormPostFormat = @" <html> -<body onload=""var btn = document.getElementById('submit_button'); btn.disabled = true; btn.value = 'Login in progress'; document.getElementById('openid_message').submit()""> +<head> +</head> +<body onload=""document.body.style.display = 'none'; var btn = document.getElementById('submit_button'); btn.disabled = true; btn.value = 'Login in progress'; document.getElementById('openid_message').submit()""> <form id=""openid_message"" action=""{0}"" method=""post"" accept-charset=""UTF-8"" enctype=""application/x-www-form-urlencoded"" onSubmit=""var btn = document.getElementById('submit_button'); btn.disabled = true; btn.value = 'Login in progress'; return true;""> {1} <input id=""submit_button"" type=""submit"" value=""Continue"" /> @@ -675,6 +677,7 @@ namespace DotNetOpenAuth.Messaging { ErrorUtilities.VerifyArgumentNotNull(fields, "fields"); WebHeaderCollection headers = new WebHeaderCollection(); + headers.Add(HttpResponseHeader.ContentType, "text/html"); StringWriter bodyWriter = new StringWriter(CultureInfo.InvariantCulture); StringBuilder hiddenFields = new StringBuilder(); foreach (var field in fields) { |