private async Task AspUserCredentials(LoginModel model) { var ticket = await _authorizeService.GetAuthenticateTicketAsync(model.username, model.password); if (ticket == null) { _authorizeModel.SetError("username_password_error", "Invalid username or password"); _authorizeModel.Rejected(); return; } _authorizeModel.Validated(ticket); return; }