summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth2.Client
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-03-31 18:47:48 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2012-03-31 18:47:48 -0700
commitca35efa9ffe8469328d0001f754a0c3a0d90c57e (patch)
tree39363ab298b90c5d1f1f02b896ab2554a0ecfd4a /src/DotNetOpenAuth.OAuth2.Client
parent7c456b35c0570df86a2626dd8907726711ab6755 (diff)
downloadDotNetOpenAuth-ca35efa9ffe8469328d0001f754a0c3a0d90c57e.zip
DotNetOpenAuth-ca35efa9ffe8469328d0001f754a0c3a0d90c57e.tar.gz
DotNetOpenAuth-ca35efa9ffe8469328d0001f754a0c3a0d90c57e.tar.bz2
Moved localizable strings into specific OAuth 2 assemblies.
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2.Client')
-rw-r--r--src/DotNetOpenAuth.OAuth2.Client/OAuth2/ChannelElements/OAuth2ClientChannel.cs2
-rw-r--r--src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs2
-rw-r--r--src/DotNetOpenAuth.OAuth2.Client/OAuth2/OAuth2Strings.Designer.cs20
-rw-r--r--src/DotNetOpenAuth.OAuth2.Client/OAuth2/OAuth2Strings.resx6
4 files changed, 27 insertions, 3 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ChannelElements/OAuth2ClientChannel.cs b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ChannelElements/OAuth2ClientChannel.cs
index 95ec983..4f80a1e 100644
--- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ChannelElements/OAuth2ClientChannel.cs
+++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ChannelElements/OAuth2ClientChannel.cs
@@ -78,7 +78,7 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements {
} else if (response.ContentType.MediaType == HttpFormUrlEncoded || response.ContentType.MediaType == PlainTextEncoded) {
return HttpUtility.ParseQueryString(body).ToDictionary();
} else {
- throw ErrorUtilities.ThrowProtocol(OAuthStrings.UnexpectedResponseContentType, response.ContentType.MediaType);
+ throw ErrorUtilities.ThrowProtocol(OAuth2Strings.UnexpectedResponseContentType, response.ContentType.MediaType);
}
}
diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs
index 1bda5e0..ea83585 100644
--- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs
+++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs
@@ -262,7 +262,7 @@ namespace DotNetOpenAuth.OAuth2 {
} else {
authorizationState.Delete();
string error = failedAccessTokenResponse != null ? failedAccessTokenResponse.Error : "(unknown)";
- ErrorUtilities.ThrowProtocol(OAuthStrings.CannotObtainAccessTokenWithReason, error);
+ ErrorUtilities.ThrowProtocol(OAuth2Strings.CannotObtainAccessTokenWithReason, error);
}
}
diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/OAuth2Strings.Designer.cs b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/OAuth2Strings.Designer.cs
index 74c0685..2395cb8 100644
--- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/OAuth2Strings.Designer.cs
+++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/OAuth2Strings.Designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:4.0.30319.261
+// Runtime Version:4.0.30319.17614
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -88,6 +88,15 @@ namespace DotNetOpenAuth.OAuth2 {
}
/// <summary>
+ /// Looks up a localized string similar to Failed to obtain access token. Authorization Server reports reason: {0}.
+ /// </summary>
+ internal static string CannotObtainAccessTokenWithReason {
+ get {
+ return ResourceManager.GetString("CannotObtainAccessTokenWithReason", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to The property {0} must be set before this operation is allowed..
/// </summary>
internal static string RequiredPropertyNotYetPreset {
@@ -95,5 +104,14 @@ namespace DotNetOpenAuth.OAuth2 {
return ResourceManager.GetString("RequiredPropertyNotYetPreset", resourceCulture);
}
}
+
+ /// <summary>
+ /// Looks up a localized string similar to Unexpected response Content-Type {0}.
+ /// </summary>
+ internal static string UnexpectedResponseContentType {
+ get {
+ return ResourceManager.GetString("UnexpectedResponseContentType", resourceCulture);
+ }
+ }
}
}
diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/OAuth2Strings.resx b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/OAuth2Strings.resx
index 0a41e42..a1ed7cd 100644
--- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/OAuth2Strings.resx
+++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/OAuth2Strings.resx
@@ -127,7 +127,13 @@
<value>Unexpected OAuth authorization response received with callback and client state that does not match an expected value.</value>
<comment>The error message generated when detecting a mismatch between the state sent to the authorization server originally and what we got back with successful authorization, or that the user sessions were not identical between the two requests, suggesting XSRF or other attack on the user (victim).</comment>
</data>
+ <data name="CannotObtainAccessTokenWithReason" xml:space="preserve">
+ <value>Failed to obtain access token. Authorization Server reports reason: {0}</value>
+ </data>
<data name="RequiredPropertyNotYetPreset" xml:space="preserve">
<value>The property {0} must be set before this operation is allowed.</value>
</data>
+ <data name="UnexpectedResponseContentType" xml:space="preserve">
+ <value>Unexpected response Content-Type {0}</value>
+ </data>
</root> \ No newline at end of file