summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-01-13 17:43:54 -0800
committerAndrew <andrewarnott@gmail.com>2009-01-13 17:43:54 -0800
commitfb5b3770a76d71b3b0968c5bcf24a9fdb3bd2016 (patch)
tree2b51057e633388d11b2d7e0a1d9d08056faba906 /src
parentb91d5c485e4d6cdbd5048228dd9c8fd7119274c1 (diff)
parent2af0f6562669e87664272254f0c7ea06d7ef15f0 (diff)
downloadDotNetOpenAuth-fb5b3770a76d71b3b0968c5bcf24a9fdb3bd2016.zip
DotNetOpenAuth-fb5b3770a76d71b3b0968c5bcf24a9fdb3bd2016.tar.gz
DotNetOpenAuth-fb5b3770a76d71b3b0968c5bcf24a9fdb3bd2016.tar.bz2
Merge branch 'oauthrsa'
Conflicts: src/DotNetOpenAuth/DotNetOpenAuth.csproj src/DotNetOpenAuth/OAuth/ChannelElements/SigningBindingElementBase.cs
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/DotNetOpenAuth.csproj1
-rw-r--r--src/DotNetOpenAuth/OAuth/ChannelElements/IConsumerCertificateProvider.cs23
-rw-r--r--src/DotNetOpenAuth/OAuth/ChannelElements/RsaSha1SigningBindingElement.cs162
-rw-r--r--src/DotNetOpenAuth/OAuth/ChannelElements/SigningBindingElementBase.cs18
-rw-r--r--src/DotNetOpenAuth/OAuth/OAuthStrings.Designer.cs288
-rw-r--r--src/DotNetOpenAuth/OAuth/OAuthStrings.resx292
6 files changed, 455 insertions, 329 deletions
diff --git a/src/DotNetOpenAuth/DotNetOpenAuth.csproj b/src/DotNetOpenAuth/DotNetOpenAuth.csproj
index 32f0834..5f26824 100644
--- a/src/DotNetOpenAuth/DotNetOpenAuth.csproj
+++ b/src/DotNetOpenAuth/DotNetOpenAuth.csproj
@@ -86,6 +86,7 @@
<Compile Include="Messaging\InternalErrorException.cs" />
<Compile Include="Messaging\NetworkDirectWebResponse.cs" />
<Compile Include="Messaging\Reflection\IMessagePartEncoder.cs" />
+ <Compile Include="OAuth\ChannelElements\IConsumerCertificateProvider.cs" />
<Compile Include="OAuth\ChannelElements\OAuthConsumerMessageFactory.cs" />
<Compile Include="OAuth\ChannelElements\ITokenGenerator.cs" />
<Compile Include="OAuth\ChannelElements\ITokenManager.cs" />
diff --git a/src/DotNetOpenAuth/OAuth/ChannelElements/IConsumerCertificateProvider.cs b/src/DotNetOpenAuth/OAuth/ChannelElements/IConsumerCertificateProvider.cs
new file mode 100644
index 0000000..22c8542
--- /dev/null
+++ b/src/DotNetOpenAuth/OAuth/ChannelElements/IConsumerCertificateProvider.cs
@@ -0,0 +1,23 @@
+//-----------------------------------------------------------------------
+// <copyright file="IConsumerCertificateProvider.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOpenAuth.OAuth.ChannelElements {
+ using System.Security.Cryptography.X509Certificates;
+
+ /// <summary>
+ /// A provider that hosts can implement to hook up their RSA-SHA1 binding elements
+ /// to their list of known Consumers' certificates.
+ /// </summary>
+ public interface IConsumerCertificateProvider {
+ /// <summary>
+ /// Gets the certificate that can be used to verify the signature of an incoming
+ /// message from a Consumer.
+ /// </summary>
+ /// <param name="consumerMessage">The incoming message from some Consumer.</param>
+ /// <returns>The public key from the Consumer's X.509 Certificate, if one can be found; otherwise <c>null</c>.</returns>
+ X509Certificate2 GetCertificate(ITamperResistantOAuthMessage consumerMessage);
+ }
+}
diff --git a/src/DotNetOpenAuth/OAuth/ChannelElements/RsaSha1SigningBindingElement.cs b/src/DotNetOpenAuth/OAuth/ChannelElements/RsaSha1SigningBindingElement.cs
index 058ce39..0a3b259 100644
--- a/src/DotNetOpenAuth/OAuth/ChannelElements/RsaSha1SigningBindingElement.cs
+++ b/src/DotNetOpenAuth/OAuth/ChannelElements/RsaSha1SigningBindingElement.cs
@@ -1,48 +1,114 @@
-//-----------------------------------------------------------------------
-// <copyright file="RsaSha1SigningBindingElement.cs" company="Andrew Arnott">
-// Copyright (c) Andrew Arnott. All rights reserved.
-// </copyright>
-//-----------------------------------------------------------------------
-
-namespace DotNetOpenAuth.OAuth.ChannelElements {
- using System;
- using System.Security.Cryptography;
- using System.Text;
- using DotNetOpenAuth.Messaging;
-
- /// <summary>
- /// A binding element that signs outgoing messages and verifies the signature on incoming messages.
- /// </summary>
- public class RsaSha1SigningBindingElement : SigningBindingElementBase {
- /// <summary>
- /// Initializes a new instance of the <see cref="RsaSha1SigningBindingElement"/> class.
- /// </summary>
- internal RsaSha1SigningBindingElement()
- : base("RSA-SHA1") {
- }
-
- /// <summary>
- /// Calculates a signature for a given message.
- /// </summary>
- /// <param name="message">The message to sign.</param>
- /// <returns>The signature for the message.</returns>
- /// <remarks>
- /// This method signs the message per OAuth 1.0 section 9.3.
- /// </remarks>
- protected override string GetSignature(ITamperResistantOAuthMessage message) {
- AsymmetricAlgorithm provider = new RSACryptoServiceProvider();
- AsymmetricSignatureFormatter hasher = new RSAPKCS1SignatureFormatter(provider);
- hasher.SetHashAlgorithm("SHA1");
- byte[] digest = hasher.CreateSignature(Encoding.ASCII.GetBytes(ConstructSignatureBaseString(message)));
- return Convert.ToBase64String(digest);
- }
-
- /// <summary>
- /// Clones this instance.
- /// </summary>
- /// <returns>A new instance of the binding element.</returns>
- protected override ITamperProtectionChannelBindingElement Clone() {
- return new RsaSha1SigningBindingElement();
- }
- }
-}
+//-----------------------------------------------------------------------
+// <copyright file="RsaSha1SigningBindingElement.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOpenAuth.OAuth.ChannelElements {
+ using System;
+ using System.Security.Cryptography;
+ using System.Security.Cryptography.X509Certificates;
+ using System.Text;
+ using DotNetOpenAuth.Messaging;
+
+ /// <summary>
+ /// A binding element that signs outgoing messages and verifies the signature on incoming messages.
+ /// </summary>
+ public class RsaSha1SigningBindingElement : SigningBindingElementBase {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="RsaSha1SigningBindingElement"/> class
+ /// for use by Consumers.
+ /// </summary>
+ /// <param name="signingCertificate">The certificate used to sign outgoing messages.</param>
+ public RsaSha1SigningBindingElement(X509Certificate2 signingCertificate)
+ : this() {
+ if (signingCertificate == null) {
+ throw new ArgumentNullException("signingCertificate");
+ }
+
+ this.SigningCertificate = signingCertificate;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="RsaSha1SigningBindingElement"/> class
+ /// for use by Service Providers.
+ /// </summary>
+ public RsaSha1SigningBindingElement()
+ : base("RSA-SHA1") {
+ }
+
+ /// <summary>
+ /// Gets or sets the certificate used to sign outgoing messages.
+ /// </summary>
+ public X509Certificate2 SigningCertificate { get; set; }
+
+ /// <summary>
+ /// Gets or sets the consumer certificate provider.
+ /// </summary>
+ public IConsumerCertificateProvider ConsumerCertificateProvider { get; set; }
+
+ /// <summary>
+ /// Calculates a signature for a given message.
+ /// </summary>
+ /// <param name="message">The message to sign.</param>
+ /// <returns>The signature for the message.</returns>
+ /// <remarks>
+ /// This method signs the message per OAuth 1.0 section 9.3.
+ /// </remarks>
+ protected override string GetSignature(ITamperResistantOAuthMessage message) {
+ if (message == null) {
+ throw new ArgumentNullException("message");
+ }
+
+ if (this.SigningCertificate == null) {
+ throw new InvalidOperationException(OAuthStrings.X509CertificateNotProvidedForSigning);
+ }
+
+ string signatureBaseString = ConstructSignatureBaseString(message);
+ byte[] data = Encoding.ASCII.GetBytes(signatureBaseString);
+ var provider = (RSACryptoServiceProvider)this.SigningCertificate.PublicKey.Key;
+ byte[] binarySignature = provider.SignData(data, "SHA1");
+ string base64Signature = Convert.ToBase64String(binarySignature);
+ return base64Signature;
+ }
+
+ /// <summary>
+ /// Determines whether the signature on some message is valid.
+ /// </summary>
+ /// <param name="message">The message to check the signature on.</param>
+ /// <returns>
+ /// <c>true</c> if the signature on the message is valid; otherwise, <c>false</c>.
+ /// </returns>
+ protected override bool IsSignatureValid(ITamperResistantOAuthMessage message) {
+ if (this.ConsumerCertificateProvider == null) {
+ throw new InvalidOperationException(OAuthStrings.ConsumerCertificateProviderNotAvailable);
+ }
+
+ string signatureBaseString = ConstructSignatureBaseString(message);
+ byte[] data = Encoding.ASCII.GetBytes(signatureBaseString);
+
+ byte[] carriedSignature = Convert.FromBase64String(message.Signature);
+
+ X509Certificate2 cert = this.ConsumerCertificateProvider.GetCertificate(message);
+ if (cert == null) {
+ Logger.WarnFormat("Incoming message from consumer '{0}' could not be matched with an appropriate X.509 certificate for signature verification.", message.ConsumerKey);
+ return false;
+ }
+
+ var provider = (RSACryptoServiceProvider)cert.PublicKey.Key;
+ bool valid = provider.VerifyData(data, "SHA1", carriedSignature);
+ return valid;
+ }
+
+ /// <summary>
+ /// Clones this instance.
+ /// </summary>
+ /// <returns>A new instance of the binding element.</returns>
+ protected override ITamperProtectionChannelBindingElement Clone() {
+ return new RsaSha1SigningBindingElement() {
+ ConsumerCertificateProvider = this.ConsumerCertificateProvider,
+ SigningCertificate = this.SigningCertificate,
+ };
+ }
+ }
+}
diff --git a/src/DotNetOpenAuth/OAuth/ChannelElements/SigningBindingElementBase.cs b/src/DotNetOpenAuth/OAuth/ChannelElements/SigningBindingElementBase.cs
index 7337760..bf84a1d 100644
--- a/src/DotNetOpenAuth/OAuth/ChannelElements/SigningBindingElementBase.cs
+++ b/src/DotNetOpenAuth/OAuth/ChannelElements/SigningBindingElementBase.cs
@@ -1,3 +1,4 @@
+<<<<<<< HEAD:src/DotNetOpenAuth/OAuth/ChannelElements/SigningBindingElementBase.cs
//-----------------------------------------------------------------------
// <copyright file="SigningBindingElementBase.cs" company="Andrew Arnott">
// Copyright (c) Andrew Arnott. All rights reserved.
@@ -111,11 +112,10 @@ namespace DotNetOpenAuth.OAuth.ChannelElements {
if (this.SignatureCallback != null) {
this.SignatureCallback(signedMessage);
} else {
- Logger.Warn("Signature verification required, but callback delegate was not provided to provide additional data for signing.");
+ Logger.Warn("Signature verification required, but callback delegate was not provided to provide additional data for signature verification.");
}
- string signature = this.GetSignature(signedMessage);
- if (signedMessage.Signature != signature) {
+ if (!this.IsSignatureValid(signedMessage)) {
Logger.Error("Signature verification failed.");
throw new InvalidSignatureException(message);
}
@@ -204,6 +204,18 @@ namespace DotNetOpenAuth.OAuth.ChannelElements {
}
/// <summary>
+ /// Determines whether the signature on some message is valid.
+ /// </summary>
+ /// <param name="message">The message to check the signature on.</param>
+ /// <returns>
+ /// <c>true</c> if the signature on the message is valid; otherwise, <c>false</c>.
+ /// </returns>
+ protected virtual bool IsSignatureValid(ITamperResistantOAuthMessage message) {
+ string signature = this.GetSignature(message);
+ return message.Signature == signature;
+ }
+
+ /// <summary>
/// Clones this instance.
/// </summary>
/// <returns>A new instance of the binding element.</returns>
diff --git a/src/DotNetOpenAuth/OAuth/OAuthStrings.Designer.cs b/src/DotNetOpenAuth/OAuth/OAuthStrings.Designer.cs
index 8d42b10..dcf6e8b 100644
--- a/src/DotNetOpenAuth/OAuth/OAuthStrings.Designer.cs
+++ b/src/DotNetOpenAuth/OAuth/OAuthStrings.Designer.cs
@@ -1,135 +1,153 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.3053
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace DotNetOpenAuth.OAuth {
- using System;
-
-
- /// <summary>
- /// A strongly-typed resource class, for looking up localized strings, etc.
- /// </summary>
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class OAuthStrings {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal OAuthStrings() {
- }
-
- /// <summary>
- /// Returns the cached ResourceManager instance used by this class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DotNetOpenAuth.OAuth.OAuthStrings", typeof(OAuthStrings).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- /// <summary>
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Cannot send access token to Consumer for request token &apos;{0}&apos; before it has been authorized..
- /// </summary>
- internal static string AccessTokenNotAuthorized {
- get {
- return ResourceManager.GetString("AccessTokenNotAuthorized", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to The access token &apos;{0}&apos; is invalid or expired..
- /// </summary>
- internal static string BadAccessTokenInProtectedResourceRequest {
- get {
- return ResourceManager.GetString("BadAccessTokenInProtectedResourceRequest", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Failure looking up secret for consumer or token..
- /// </summary>
- internal static string ConsumerOrTokenSecretNotFound {
- get {
- return ResourceManager.GetString("ConsumerOrTokenSecretNotFound", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to An invalid OAuth message received and discarded..
- /// </summary>
- internal static string InvalidIncomingMessage {
- get {
- return ResourceManager.GetString("InvalidIncomingMessage", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to The {0} message included extra data which is not allowed..
- /// </summary>
- internal static string MessageNotAllowedExtraParameters {
- get {
- return ResourceManager.GetString("MessageNotAllowedExtraParameters", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to The request URL query MUST NOT contain any OAuth Protocol Parameters..
- /// </summary>
- internal static string RequestUrlMustNotHaveOAuthParameters {
- get {
- return ResourceManager.GetString("RequestUrlMustNotHaveOAuthParameters", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to The signing element already has been associated with a channel..
- /// </summary>
- internal static string SigningElementAlreadyAssociatedWithChannel {
- get {
- return ResourceManager.GetString("SigningElementAlreadyAssociatedWithChannel", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to All signing elements must offer the same message protection..
- /// </summary>
- internal static string SigningElementsMustShareSameProtection {
- get {
- return ResourceManager.GetString("SigningElementsMustShareSameProtection", resourceCulture);
- }
- }
- }
-}
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3521
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace DotNetOpenAuth.OAuth {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class OAuthStrings {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal OAuthStrings() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DotNetOpenAuth.OAuth.OAuthStrings", typeof(OAuthStrings).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Cannot send access token to Consumer for request token &apos;{0}&apos; before it has been authorized..
+ /// </summary>
+ internal static string AccessTokenNotAuthorized {
+ get {
+ return ResourceManager.GetString("AccessTokenNotAuthorized", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The access token &apos;{0}&apos; is invalid or expired..
+ /// </summary>
+ internal static string BadAccessTokenInProtectedResourceRequest {
+ get {
+ return ResourceManager.GetString("BadAccessTokenInProtectedResourceRequest", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The RSA-SHA1 signing binding element&apos;s consumer certificate provider has not been set, so no incoming messages from consumers using this signature method can be verified..
+ /// </summary>
+ internal static string ConsumerCertificateProviderNotAvailable {
+ get {
+ return ResourceManager.GetString("ConsumerCertificateProviderNotAvailable", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Failure looking up secret for consumer or token..
+ /// </summary>
+ internal static string ConsumerOrTokenSecretNotFound {
+ get {
+ return ResourceManager.GetString("ConsumerOrTokenSecretNotFound", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to An invalid OAuth message received and discarded..
+ /// </summary>
+ internal static string InvalidIncomingMessage {
+ get {
+ return ResourceManager.GetString("InvalidIncomingMessage", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The {0} message included extra data which is not allowed..
+ /// </summary>
+ internal static string MessageNotAllowedExtraParameters {
+ get {
+ return ResourceManager.GetString("MessageNotAllowedExtraParameters", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The request URL query MUST NOT contain any OAuth Protocol Parameters..
+ /// </summary>
+ internal static string RequestUrlMustNotHaveOAuthParameters {
+ get {
+ return ResourceManager.GetString("RequestUrlMustNotHaveOAuthParameters", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The signing element already has been associated with a channel..
+ /// </summary>
+ internal static string SigningElementAlreadyAssociatedWithChannel {
+ get {
+ return ResourceManager.GetString("SigningElementAlreadyAssociatedWithChannel", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to All signing elements must offer the same message protection..
+ /// </summary>
+ internal static string SigningElementsMustShareSameProtection {
+ get {
+ return ResourceManager.GetString("SigningElementsMustShareSameProtection", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The RSA-SHA1 signing binding element has not been set with a certificate for signing..
+ /// </summary>
+ internal static string X509CertificateNotProvidedForSigning {
+ get {
+ return ResourceManager.GetString("X509CertificateNotProvidedForSigning", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/src/DotNetOpenAuth/OAuth/OAuthStrings.resx b/src/DotNetOpenAuth/OAuth/OAuthStrings.resx
index 3e59ca9..5ba71c7 100644
--- a/src/DotNetOpenAuth/OAuth/OAuthStrings.resx
+++ b/src/DotNetOpenAuth/OAuth/OAuthStrings.resx
@@ -1,144 +1,150 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <data name="AccessTokenNotAuthorized" xml:space="preserve">
- <value>Cannot send access token to Consumer for request token '{0}' before it has been authorized.</value>
- </data>
- <data name="BadAccessTokenInProtectedResourceRequest" xml:space="preserve">
- <value>The access token '{0}' is invalid or expired.</value>
- </data>
- <data name="ConsumerOrTokenSecretNotFound" xml:space="preserve">
- <value>Failure looking up secret for consumer or token.</value>
- </data>
- <data name="InvalidIncomingMessage" xml:space="preserve">
- <value>An invalid OAuth message received and discarded.</value>
- </data>
- <data name="MessageNotAllowedExtraParameters" xml:space="preserve">
- <value>The {0} message included extra data which is not allowed.</value>
- </data>
- <data name="RequestUrlMustNotHaveOAuthParameters" xml:space="preserve">
- <value>The request URL query MUST NOT contain any OAuth Protocol Parameters.</value>
- </data>
- <data name="SigningElementAlreadyAssociatedWithChannel" xml:space="preserve">
- <value>The signing element already has been associated with a channel.</value>
- </data>
- <data name="SigningElementsMustShareSameProtection" xml:space="preserve">
- <value>All signing elements must offer the same message protection.</value>
- </data>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="AccessTokenNotAuthorized" xml:space="preserve">
+ <value>Cannot send access token to Consumer for request token '{0}' before it has been authorized.</value>
+ </data>
+ <data name="BadAccessTokenInProtectedResourceRequest" xml:space="preserve">
+ <value>The access token '{0}' is invalid or expired.</value>
+ </data>
+ <data name="ConsumerCertificateProviderNotAvailable" xml:space="preserve">
+ <value>The RSA-SHA1 signing binding element's consumer certificate provider has not been set, so no incoming messages from consumers using this signature method can be verified.</value>
+ </data>
+ <data name="ConsumerOrTokenSecretNotFound" xml:space="preserve">
+ <value>Failure looking up secret for consumer or token.</value>
+ </data>
+ <data name="InvalidIncomingMessage" xml:space="preserve">
+ <value>An invalid OAuth message received and discarded.</value>
+ </data>
+ <data name="MessageNotAllowedExtraParameters" xml:space="preserve">
+ <value>The {0} message included extra data which is not allowed.</value>
+ </data>
+ <data name="RequestUrlMustNotHaveOAuthParameters" xml:space="preserve">
+ <value>The request URL query MUST NOT contain any OAuth Protocol Parameters.</value>
+ </data>
+ <data name="SigningElementAlreadyAssociatedWithChannel" xml:space="preserve">
+ <value>The signing element already has been associated with a channel.</value>
+ </data>
+ <data name="SigningElementsMustShareSameProtection" xml:space="preserve">
+ <value>All signing elements must offer the same message protection.</value>
+ </data>
+ <data name="X509CertificateNotProvidedForSigning" xml:space="preserve">
+ <value>The RSA-SHA1 signing binding element has not been set with a certificate for signing.</value>
+ </data>
</root> \ No newline at end of file