private static BasicAuthenticationHeaderValue GetBasicAuthenticationHeaderValue(HttpContext context) { var basicAuthenticationHeader = context.Request.Headers["Authorization"] .FirstOrDefault(header => header.StartsWith("Basic", StringComparison.OrdinalIgnoreCase)); var decodedHeader = new BasicAuthenticationHeaderValue(basicAuthenticationHeader); return(decodedHeader); }
public BasicAuthenticationSignInManager( HttpContext context, BasicAuthenticationHeaderValue authenticationHeaderValue, IUserManager userManager) { _context = context; _authenticationHeaderValue = authenticationHeaderValue; _userManager = userManager; }