Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public BasicAuthenticationSignInManager(
     HttpContext context,
     BasicAuthenticationHeaderValue authenticationHeaderValue,
     IUserManager userManager)
 {
     _context = context;
     _authenticationHeaderValue = authenticationHeaderValue;
     _userManager = userManager;
 }