17 instantiations of AuthenticationHeaderValue
dotnet-sourcelink (2)
Keycloak.Web (1)
AuthorizationHandler.cs (1)
17request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
Microsoft.Extensions.AI.Evaluation.Safety (1)
ContentSafetyService.cs (1)
441httpRequestMessage.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token.Token);
Microsoft.NET.Build.Containers (4)
AuthHandshakeMessageHandler.cs (4)
196var authValue = new AuthenticationHeaderValue(BasicAuthScheme, Convert.ToBase64String(Encoding.ASCII.GetBytes($"{privateRepoCreds.Username}:{privateRepoCreds.Password}"))); 498var authValue = new AuthenticationHeaderValue(BearerAuthScheme, tokenResponse.ResolvedToken); 515var header = new AuthenticationHeaderValue(BasicAuthScheme, Convert.ToBase64String(Encoding.ASCII.GetBytes($"{privateRepoCreds.Username}:{privateRepoCreds.Password}"))); 544return (new AuthenticationHeaderValue(BearerAuthScheme, token.ResolvedToken), token.ResolvedExpiration);
Microsoft.NET.Sdk.Publish.Tasks (2)
Tasks\Http\HttpClientExtensions.cs (2)
288client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(BasicAuthenticationScheme, base64); 292client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(BearerAuthenticationScheme, password);
Pipelines.Library (1)
DistributedApplicationPipelineExtensions.cs (1)
149httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken.Token);
System.Net.Http (6)
System\Net\Http\Headers\AuthenticationHeaderValue.cs (3)
156parsedValue = new AuthenticationHeaderValue(scheme); 189parsedValue = new AuthenticationHeaderValue(scheme, parameter); 293return new AuthenticationHeaderValue(this);
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs (2)
184SetRequestAuthenticationHeaderValue(request, new AuthenticationHeaderValue(BasicScheme, base64AuthString), isProxyAuth); 201var headerValue = new AuthenticationHeaderValue(DigestScheme, parameter);
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (1)
168SetRequestAuthenticationHeaderValue(request, new AuthenticationHeaderValue(challenge.SchemeName, challengeResponse), isProxyAuth);
42 references to AuthenticationHeaderValue
dotnet-sourcelink (5)
Microsoft.NET.Build.Containers (10)
AuthHandshakeMessageHandler.cs (10)
44private static ConcurrentDictionary<string, AuthenticationHeaderValue?> _authenticationHeaders = new(); 85AuthenticationHeaderValue header = authenticateHeader.First(); 171private async Task<(AuthenticationHeaderValue, DateTimeOffset)?> GetAuthenticationAsync(string registry, string scheme, AuthInfo? bearerAuthInfo, CancellationToken cancellationToken) 196var authValue = new AuthenticationHeaderValue(BasicAuthScheme, Convert.ToBase64String(Encoding.ASCII.GetBytes($"{privateRepoCreds.Username}:{privateRepoCreds.Password}"))); 455private async Task<(AuthenticationHeaderValue, DateTimeOffset)?> TryOAuthPostAsync(DockerCredentials privateRepoCreds, AuthInfo bearerAuthInfo, Uri realmUri, CancellationToken cancellationToken) 498var authValue = new AuthenticationHeaderValue(BearerAuthScheme, tokenResponse.ResolvedToken); 511private async Task<(AuthenticationHeaderValue, DateTimeOffset)?> TryTokenGetAsync(DockerCredentials privateRepoCreds, AuthInfo bearerAuthInfo, Uri realmUri, CancellationToken cancellationToken) 515var header = new AuthenticationHeaderValue(BasicAuthScheme, Convert.ToBase64String(Encoding.ASCII.GetBytes($"{privateRepoCreds.Username}:{privateRepoCreds.Password}"))); 579if (_authenticationHeaders.TryGetValue(_registryName, out AuthenticationHeaderValue? header)) 602if (await GetAuthenticationAsync(_registryName, scheme!, authInfo, cancellationToken).ConfigureAwait(false) is (AuthenticationHeaderValue authHeader, DateTimeOffset expirationTime))
netstandard (1)
netstandard.cs (1)
1098[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Http.Headers.AuthenticationHeaderValue))]
System.Net.Http (26)
System\Net\Http\Headers\AuthenticationHeaderValue.cs (7)
46private AuthenticationHeaderValue(AuthenticationHeaderValue source) 65AuthenticationHeaderValue? other = obj as AuthenticationHeaderValue; 96public static AuthenticationHeaderValue Parse(string input) 99return (AuthenticationHeaderValue)GenericHeaderParser.SingleValueAuthenticationParser.ParseValue( 103public static bool TryParse([NotNullWhen(true)] string? input, [NotNullWhen(true)] out AuthenticationHeaderValue? parsedValue) 110parsedValue = (AuthenticationHeaderValue)output!;
System\Net\Http\Headers\GenericHeaderParser.cs (2)
25internal static readonly GenericHeaderParser SingleValueAuthenticationParser = new GenericHeaderParser(false, AuthenticationHeaderValue.GetAuthenticationLength); 26internal static readonly GenericHeaderParser MultipleValueAuthenticationParser = new GenericHeaderParser(true, AuthenticationHeaderValue.GetAuthenticationLength);
System\Net\Http\Headers\HttpRequestHeaders.cs (4)
49public AuthenticationHeaderValue? Authorization 51get { return (AuthenticationHeaderValue?)GetSingleParsedValue(KnownHeaders.Authorization.Descriptor); } 176public AuthenticationHeaderValue? ProxyAuthorization 178get { return (AuthenticationHeaderValue?)GetSingleParsedValue(KnownHeaders.ProxyAuthorization.Descriptor); }
System\Net\Http\Headers\HttpResponseHeaders.cs (4)
53public HttpHeaderValueCollection<AuthenticationHeaderValue> ProxyAuthenticate => 54GetSpecializedCollection(ProxyAuthenticateSlot, static thisRef => new HttpHeaderValueCollection<AuthenticationHeaderValue>(KnownHeaders.ProxyAuthenticate.Descriptor, thisRef)); 68public HttpHeaderValueCollection<AuthenticationHeaderValue> WwwAuthenticate => 69GetSpecializedCollection(WwwAuthenticateSlot, static thisRef => new HttpHeaderValueCollection<AuthenticationHeaderValue>(KnownHeaders.WWWAuthenticate.Descriptor, thisRef));
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs (9)
44private static bool TryGetChallengeDataForScheme(string scheme, HttpHeaderValueCollection<AuthenticationHeaderValue> authenticationHeaderValues, out string? challengeData) 46foreach (AuthenticationHeaderValue ahv in authenticationHeaderValues) 68HttpHeaderValueCollection<AuthenticationHeaderValue> authenticationHeaderValues = GetResponseAuthenticationHeaderValues(response, isProxyAuth: false); 69foreach (AuthenticationHeaderValue ahv in authenticationHeaderValues) 81HttpHeaderValueCollection<AuthenticationHeaderValue> authenticationHeaderValues, out AuthenticationChallenge challenge) 119HttpHeaderValueCollection<AuthenticationHeaderValue> authenticationHeaderValues = GetResponseAuthenticationHeaderValues(response, isProxyAuth); 157private static HttpHeaderValueCollection<AuthenticationHeaderValue> GetResponseAuthenticationHeaderValues(HttpResponseMessage response, bool isProxyAuth) 164private static void SetRequestAuthenticationHeaderValue(HttpRequestMessage request, AuthenticationHeaderValue headerValue, bool isProxyAuth) 201var headerValue = new AuthenticationHeaderValue(DigestScheme, parameter);