Skip to content

Commit a0d44c1

Browse files
committed
Revert "Fixes the OAuthServiceProvider sample issue with recognizing protected resource requests:"
This reverts commit da9e554.
1 parent f3ae2b7 commit a0d44c1

2 files changed

Lines changed: 1 addition & 20 deletions

File tree

src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,24 +1540,6 @@ internal static void AddExtraParameters(this MessageDictionary messageDictionary
15401540
}
15411541
}
15421542

1543-
/// <summary>
1544-
/// Reassembles multiple values in an HTTP request header as a comma-delimited list.
1545-
/// </summary>
1546-
/// <param name="headers">The headers from which to read a header.</param>
1547-
/// <param name="headerName">Name of the header to read.</param>
1548-
/// <returns>A comma-delimited list of values for the named header, or <c>null</c> if no header was included in the collection by the specified name.</returns>
1549-
internal static string GetJointValues(this System.Net.Http.Headers.HttpRequestHeaders headers, string headerName) {
1550-
Requires.NotNull(headers, "headers");
1551-
Requires.NotNullOrEmpty(headerName, "headerName");
1552-
1553-
IEnumerable<string> values;
1554-
if (headers.TryGetValues(headerName, out values)) {
1555-
return string.Join(",", values);
1556-
}
1557-
1558-
return null;
1559-
}
1560-
15611543
/// <summary>
15621544
/// Gets the URI that contains the entire payload that would be sent by the browser for the specified redirect-based request message.
15631545
/// </summary>

src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/OAuthChannel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ protected static List<IChannelBindingElement> InitializeBindingElements(ITamperP
120120
/// <returns>The deserialized message, if one is found. Null otherwise.</returns>
121121
protected override async Task<IDirectedProtocolMessage> ReadFromRequestCoreAsync(HttpRequestMessage request, CancellationToken cancellationToken) {
122122
// First search the Authorization header.
123-
AuthenticationHeaderValue authorization;
124-
AuthenticationHeaderValue.TryParse(request.Headers.GetJointValues("Authorization"), out authorization);
123+
var authorization = request.Headers.Authorization;
125124
var fields = MessagingUtilities.ParseAuthorizationHeader(Protocol.AuthorizationHeaderScheme, authorization).ToDictionary();
126125
fields.Remove("realm"); // ignore the realm parameter, since we don't use it, and it must be omitted from signature base string.
127126

0 commit comments

Comments
 (0)