Skip to content

Commit 5de7cba

Browse files
authored
re-case WwwAuthenticate to match guidelines (Azure#19286)
1 parent a35fc04 commit 5de7cba

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

sdk/core/Azure.Core/api/Azure.Core.net461.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public static partial class Names
269269
public static string Range { get { throw null; } }
270270
public static string Referer { get { throw null; } }
271271
public static string UserAgent { get { throw null; } }
272-
public static string WWWAuthenticate { get { throw null; } }
272+
public static string WwwAuthenticate { get { throw null; } }
273273
public static string XMsDate { get { throw null; } }
274274
public static string XMsRange { get { throw null; } }
275275
public static string XMsRequestId { get { throw null; } }

sdk/core/Azure.Core/api/Azure.Core.net5.0.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public static partial class Names
269269
public static string Range { get { throw null; } }
270270
public static string Referer { get { throw null; } }
271271
public static string UserAgent { get { throw null; } }
272-
public static string WWWAuthenticate { get { throw null; } }
272+
public static string WwwAuthenticate { get { throw null; } }
273273
public static string XMsDate { get { throw null; } }
274274
public static string XMsRange { get { throw null; } }
275275
public static string XMsRequestId { get { throw null; } }

sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public static partial class Names
269269
public static string Range { get { throw null; } }
270270
public static string Referer { get { throw null; } }
271271
public static string UserAgent { get { throw null; } }
272-
public static string WWWAuthenticate { get { throw null; } }
272+
public static string WwwAuthenticate { get { throw null; } }
273273
public static string XMsDate { get { throw null; } }
274274
public static string XMsRange { get { throw null; } }
275275
public static string XMsRequestId { get { throw null; } }

sdk/core/Azure.Core/src/HttpHeader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public static class Names
148148
/// <summary>
149149
/// Returns <code>"WWW-Authenticate"</code>.
150150
/// </summary>
151-
public static string WWWAuthenticate => "WWW-Authenticate";
151+
public static string WwwAuthenticate => "WWW-Authenticate";
152152
}
153153

154154
#pragma warning disable CA1034 // Nested types should not be visible

sdk/core/Azure.Core/src/Shared/AuthorizationChallengeParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ internal static class AuthorizationChallengeParser
2222
/// <returns>The value of the parameter name specified in <paramref name="challengeParameter"/> if it is found in the specified <paramref name="challengeScheme"/>.</returns>
2323
public static string? GetChallengeParameterFromResponse(Response response, string challengeScheme, string challengeParameter)
2424
{
25-
if (response.Status != (int)HttpStatusCode.Unauthorized || !response.Headers.TryGetValue(HttpHeader.Names.WWWAuthenticate, out string? headerValue))
25+
if (response.Status != (int)HttpStatusCode.Unauthorized || !response.Headers.TryGetValue(HttpHeader.Names.WwwAuthenticate, out string? headerValue))
2626
{
2727
return null;
2828
}

sdk/core/Azure.Core/src/Shared/BearerTokenChallengeAuthenticationPolicy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private async ValueTask ProcessAsync(HttpMessage message, ReadOnlyMemory<HttpPip
102102
}
103103

104104
// Check if we have received a challenge or we have not yet issued the first request.
105-
if (message.Response.Status == (int)HttpStatusCode.Unauthorized && message.Response.Headers.Contains(HttpHeader.Names.WWWAuthenticate))
105+
if (message.Response.Status == (int)HttpStatusCode.Unauthorized && message.Response.Headers.Contains(HttpHeader.Names.WwwAuthenticate))
106106
{
107107
// Attempt to get the TokenRequestContext based on the challenge.
108108
// If we fail to get the context, the challenge was not present or invalid.

0 commit comments

Comments
 (0)