diff options
Diffstat (limited to 'src/DotNetOAuth/Messaging')
-rw-r--r-- | src/DotNetOAuth/Messaging/HttpDeliveryMethod.cs (renamed from src/DotNetOAuth/Messaging/MessageScheme.cs) | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/DotNetOAuth/Messaging/MessageScheme.cs b/src/DotNetOAuth/Messaging/HttpDeliveryMethod.cs index 2c0aec1..b4b8c42 100644 --- a/src/DotNetOAuth/Messaging/MessageScheme.cs +++ b/src/DotNetOAuth/Messaging/HttpDeliveryMethod.cs @@ -1,35 +1,43 @@ //-----------------------------------------------------------------------
-// <copyright file="MessageScheme.cs" company="Andrew Arnott">
+// <copyright file="HttpDeliveryMethod.cs" company="Andrew Arnott">
// Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace DotNetOAuth.Messaging {
+ using System;
+
/// <summary>
/// The methods available for the Consumer to send direct messages to the Service Provider.
/// </summary>
/// <remarks>
/// See 1.0 spec section 5.2.
/// </remarks>
- internal enum MessageScheme {
+ [Flags]
+ public enum HttpDeliveryMethod {
+ /// <summary>
+ /// No HTTP methods are allowed.
+ /// </summary>
+ None = 0x0,
+
/// <summary>
/// In the HTTP Authorization header as defined in OAuth HTTP Authorization Scheme (OAuth HTTP Authorization Scheme).
/// </summary>
- AuthorizationHeaderRequest,
+ AuthorizationHeaderRequest = 0x1,
/// <summary>
/// As the HTTP POST request body with a content-type of application/x-www-form-urlencoded.
/// </summary>
- PostRequest,
+ PostRequest = 0x2,
/// <summary>
/// Added to the URLs in the query part (as defined by [RFC3986] (Berners-Lee, T., “Uniform Resource Identifiers (URI): Generic Syntax,” .) section 3).
/// </summary>
- GetRequest,
+ GetRequest = 0x4,
/// <summary>
- /// Response parameters are sent by the Service Provider to return Tokens and other information to the Consumer in the HTTP response body. The parameter names and values are first encoded as per Parameter Encoding (Parameter Encoding), and concatenated with the ‘&’ character (ASCII code 38) as defined in [RFC3986] (Berners-Lee, T., “Uniform Resource Identifiers (URI): Generic Syntax,” .) Section 2.1.
+ /// All HTTP requests are acceptable.
/// </summary>
- QueryStyleResponse,
+ All = AuthorizationHeaderRequest | PostRequest | GetRequest,
}
}
|