public AuthenticationResult LogIn(string userName, string password, bool stayLoggedInToday = false) { UserInfo userInfo = identityService.ValidateUserCredentials(userName, password); userInfo.StayLoggedInToday = stayLoggedInToday; storage.SaveIdentity(userInfo); return(AuthenticationResult.Success(userInfo.MustChangePassword)); }
public async Task <AuthenticationResult> LogIn(HttpContext httpContext, string userName, string password, bool stayLoggedInToday = false) { UserInfo userInfo = identityService.ValidateUserCredentials(userName, password); userInfo.StayLoggedInToday = stayLoggedInToday; await storage.SaveIdentity(httpContext, userInfo); return(AuthenticationResult.Success(userInfo.MustChangePassword)); }