summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth2/OAuth2/Protocol.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2013-03-03 17:09:22 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2013-03-03 17:09:22 -0800
commit2c9f30595e5de2a2ebb80d697546c7c2a78e1030 (patch)
tree76e9bc1fd274fbc0500a2e336f4fb8b3e1a8927f /src/DotNetOpenAuth.OAuth2/OAuth2/Protocol.cs
parent60ca0442ebf684b8414c5cb0dbf91c5b916f1188 (diff)
downloadDotNetOpenAuth-2c9f30595e5de2a2ebb80d697546c7c2a78e1030.zip
DotNetOpenAuth-2c9f30595e5de2a2ebb80d697546c7c2a78e1030.tar.gz
DotNetOpenAuth-2c9f30595e5de2a2ebb80d697546c7c2a78e1030.tar.bz2
Fixes up user rejection cases.
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2/OAuth2/Protocol.cs')
-rw-r--r--src/DotNetOpenAuth.OAuth2/OAuth2/Protocol.cs88
1 files changed, 44 insertions, 44 deletions
diff --git a/src/DotNetOpenAuth.OAuth2/OAuth2/Protocol.cs b/src/DotNetOpenAuth.OAuth2/OAuth2/Protocol.cs
index d780a81..93cbd93 100644
--- a/src/DotNetOpenAuth.OAuth2/OAuth2/Protocol.cs
+++ b/src/DotNetOpenAuth.OAuth2/OAuth2/Protocol.cs
@@ -22,7 +22,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// <summary>
/// Protocol constants for OAuth 2.0.
/// </summary>
- internal class Protocol {
+ public class Protocol {
/// <summary>
/// The HTTP authorization scheme "Bearer";
/// </summary>
@@ -135,7 +135,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// <summary>
/// The "error_uri" string.
/// </summary>
- public const string error_uri = "error_uri";
+ internal const string error_uri = "error_uri";
/// <summary>
/// The "error_description" string.
@@ -169,7 +169,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// </summary>
/// <param name="version">The OAuth version to get.</param>
/// <returns>A matching <see cref="Protocol"/> instance.</returns>
- public static Protocol Lookup(ProtocolVersion version) {
+ internal static Protocol Lookup(ProtocolVersion version) {
switch (version) {
case ProtocolVersion.V20: return Protocol.V20;
default: throw new ArgumentOutOfRangeException("version");
@@ -177,6 +177,47 @@ namespace DotNetOpenAuth.OAuth2 {
}
/// <summary>
+ /// Error codes that an authorization server can return to a client in response to a malformed or unsupported end user authorization request.
+ /// </summary>
+ public static class EndUserAuthorizationRequestErrorCodes
+ {
+ /// <summary>
+ /// The request is missing a required parameter, includes an unknown parameter or parameter value, or is otherwise malformed.
+ /// </summary>
+ public const string InvalidRequest = "invalid_request";
+
+ /// <summary>
+ /// The client is not authorized to use the requested response type.
+ /// </summary>
+ public const string UnauthorizedClient = "unauthorized_client";
+
+ /// <summary>
+ /// The end-user or authorization server denied the request.
+ /// </summary>
+ public const string AccessDenied = "access_denied";
+
+ /// <summary>
+ /// The requested response type is not supported by the authorization server.
+ /// </summary>
+ public const string UnsupportedResponseType = "unsupported_response_type";
+
+ /// <summary>
+ /// The requested scope is invalid, unknown, or malformed.
+ /// </summary>
+ public const string InvalidScope = "invalid_scope";
+
+ /// <summary>
+ /// The authorization server encountered an unexpected condition which prevented it from fulfilling the request.
+ /// </summary>
+ public const string ServerError = "server_error";
+
+ /// <summary>
+ /// The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
+ /// </summary>
+ public const string TemporarilyUnavailable = "temporarily_unavailable";
+ }
+
+ /// <summary>
/// Values for the "response_type" parameter.
/// </summary>
internal static class ResponseTypes
@@ -248,47 +289,6 @@ namespace DotNetOpenAuth.OAuth2 {
}
/// <summary>
- /// Error codes that an authorization server can return to a client in response to a malformed or unsupported end user authorization request.
- /// </summary>
- internal static class EndUserAuthorizationRequestErrorCodes
- {
- /// <summary>
- /// The request is missing a required parameter, includes an unknown parameter or parameter value, or is otherwise malformed.
- /// </summary>
- internal const string InvalidRequest = "invalid_request";
-
- /// <summary>
- /// The client is not authorized to use the requested response type.
- /// </summary>
- internal const string UnauthorizedClient = "unauthorized_client";
-
- /// <summary>
- /// The end-user or authorization server denied the request.
- /// </summary>
- internal const string AccessDenied = "access_denied";
-
- /// <summary>
- /// The requested response type is not supported by the authorization server.
- /// </summary>
- internal const string UnsupportedResponseType = "unsupported_response_type";
-
- /// <summary>
- /// The requested scope is invalid, unknown, or malformed.
- /// </summary>
- internal const string InvalidScope = "invalid_scope";
-
- /// <summary>
- /// The authorization server encountered an unexpected condition which prevented it from fulfilling the request.
- /// </summary>
- internal const string ServerError = "server_error";
-
- /// <summary>
- /// The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
- /// </summary>
- internal const string TemporarilyUnavailable = "temporarily_unavailable";
- }
-
- /// <summary>
/// Recognized access token types.
/// </summary>
internal static class AccessTokenTypes {