private async Task <IPrincipal> ValidateCredentials(AuthenticationHeaderValue authenticationHeaderVal) { try { if (authenticationHeaderVal != null && !String.IsNullOrEmpty(authenticationHeaderVal.Parameter)) { IHttpAuthenticator authenticator = this.authenticationProvider.GetAuthenticator(authenticationHeaderVal.Scheme); return(await authenticator.Authenticate(authenticationHeaderVal.Parameter)); } return(null); } catch { return(null); } }
public VerifyAuthentication(IUserRepository userRepository, IHttpAuthenticator httpAuthenticator) { this.userRepository = userRepository; this.httpAuthenticator = httpAuthenticator; }
public LoginController(IUserRepository userRepository, IHttpAuthenticator httpAuthenticator) { this.userRepository = userRepository; this.httpAuthenticator = httpAuthenticator; }