diff options
Diffstat (limited to 'src/DotNetOAuth/Messaging')
-rw-r--r-- | src/DotNetOAuth/Messaging/MessagingUtilities.cs | 6 | ||||
-rw-r--r-- | src/DotNetOAuth/Messaging/Response.cs | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/DotNetOAuth/Messaging/MessagingUtilities.cs b/src/DotNetOAuth/Messaging/MessagingUtilities.cs index a645ad3..374855d 100644 --- a/src/DotNetOAuth/Messaging/MessagingUtilities.cs +++ b/src/DotNetOAuth/Messaging/MessagingUtilities.cs @@ -19,7 +19,7 @@ namespace DotNetOAuth.Messaging { /// <summary>
/// A grab-bag of utility methods useful for the channel stack of the protocol.
/// </summary>
- internal static class MessagingUtilities {
+ public static class MessagingUtilities {
/// <summary>
/// Adds a set of HTTP headers to an <see cref="HttpResponse"/> instance,
/// taking care to set some headers to the appropriate properties of
@@ -137,7 +137,7 @@ namespace DotNetOAuth.Messaging { /// Cookieless session directory (if applicable) is also included.
/// </summary>
/// <returns>The URL in the user agent's Location bar.</returns>
- internal static Uri GetRequestUrlFromContext() {
+ public static Uri GetRequestUrlFromContext() {
HttpContext context = HttpContext.Current;
if (context == null) {
throw new InvalidOperationException(MessagingStrings.CurrentHttpContextRequired);
@@ -159,7 +159,7 @@ namespace DotNetOAuth.Messaging { /// <param name="uri">The URI that may have a query with parameters to remove.</param>
/// <param name="prefix">The prefix for parameters to remove.</param>
/// <returns>Either a new Uri with the parameters removed if there were any to remove, or the same Uri instance if no parameters needed to be removed.</returns>
- internal static Uri StripQueryArgumentsWithPrefix(this Uri uri, string prefix) {
+ public static Uri StripQueryArgumentsWithPrefix(this Uri uri, string prefix) {
NameValueCollection queryArgs = HttpUtility.ParseQueryString(uri.Query);
var matchingKeys = queryArgs.Keys.OfType<string>().Where(key => key.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)).ToList();
if (matchingKeys.Count > 0) {
diff --git a/src/DotNetOAuth/Messaging/Response.cs b/src/DotNetOAuth/Messaging/Response.cs index d837017..2bce887 100644 --- a/src/DotNetOAuth/Messaging/Response.cs +++ b/src/DotNetOAuth/Messaging/Response.cs @@ -92,8 +92,12 @@ namespace DotNetOAuth.Messaging { /// <summary>
/// Gets the URI that, when requested with an HTTP GET request,
- /// would transmit the message that normally be transmitted via a user agent redirect.
+ /// would transmit the message that normally would be transmitted via a user agent redirect.
/// </summary>
+ /// <remarks>
+ /// This is useful for desktop applications that will spawn a user agent to transmit the message
+ /// rather than cause a redirect.
+ /// </remarks>
internal Uri DirectUriRequest {
get {
var message = this.OriginalMessage as IDirectedProtocolMessage;
|