Ejemplo n.º 1
0
        public bool UpdateUser(UserDTO User)
        {
            UserAuthenticationRequest request = new UserAuthenticationRequest();

            request.User = User;
            return(_iSurveyAnswerRepository.UpdateUser(request));
        }
        public UserAuthenticationResponse UserLogin(UserAuthenticationRequest request)
        {
            var response = new UserAuthenticationResponse();

            Epi.Web.Enter.Interfaces.DataInterfaces.IDaoFactory entityDaoFactory = new EFwcf.EntityDaoFactory();
            Epi.Web.Enter.Interfaces.DataInterface.IUserDao     IUserDao         = entityDaoFactory.UserDao;
            Epi.Web.BLL.User Implementation = new Epi.Web.BLL.User(IUserDao);


            UserBO UserBO = Mapper.ToUserBO(request.User);


            UserBO result = Implementation.GetUser(UserBO);



            if (result != null)
            {
                //response.Acknowledge = AcknowledgeType.Failure; TBD
                //response.Message = "Invalid Pass Code.";
                response.User        = Mapper.ToUserDTO(result);
                response.UserIsValid = true;
            }
            else
            {
                response.UserIsValid = false;
            }


            return(response);
        }
Ejemplo n.º 3
0
        public bool UpdateUser(UserDTO User)
        {
            UserAuthenticationRequest request = new UserAuthenticationRequest();

            request.User = User;
            return(_securityDataService.UpdateUser(request));
        }
Ejemplo n.º 4
0
        async Task Login()
        {
            IsBusy = true;
            APIService.Username = Username;
            APIService.Password = Password;

            var request = new UserAuthenticationRequest()
            {
                Username = APIService.Username,
                Password = APIService.Password
            };

            var user = await userService.Authenticate(request);

            if (user != null)
            {
                Application.Current.MainPage = new MainPage();
                SignedInUser.User            = user;
                new LikeHelper();
            }
            else
            {
                await Application.Current.MainPage.DisplayAlert("Error", "Enter a Valid Username and Password!", "OK");
            }
        }
Ejemplo n.º 5
0
        public void CanExecuteResetPasswordStep2()
        {
            foreach (var testUser in TestAccounts.Accounts)
            {
                var ctx = UnitTestContext.Get(EnvironmentHelper.GetEnvironment(),
                                              testUser.Username);

                var payload = new UserAuthenticationRequest()
                {
                    UserName = testUser.Username,
                    FullSsn  = testUser.FullSsn
                };

                var step1Result = ApiUtil.PostJson <dynamic>(ctx, "Animation/Membership/Password/Reset0", payload);

                Assert.IsNotNull(step1Result);
                Assert.AreEqual(HttpStatusCode.OK, step1Result.Item1);
                Assert.IsNotNull(step1Result.Item2);

                payload.SecretQuestion = step1Result.Item2.Question;
                payload.SecretAnswer   = testUser.SecretAnswer;
                payload.NewPassword    = testUser.Password;

                var step2Result = ApiUtil.PostJson <dynamic>(ctx, "Animation/Membership/Password/Reset2", payload);

                Assert.IsNotNull(step2Result);
                Assert.AreEqual(HttpStatusCode.OK, step2Result.Item1);
                Assert.IsNotNull(step2Result.Item2);
            }
        }
 public bool UpdateUser(UserAuthenticationRequest pRequest)
 {
     try
     {
         //UserAuthenticationResponse result = _iDataService.PassCodeLogin(pRequest);
         return(_iDataService.UpdateUser(pRequest));
     }
     catch (FaultException <CustomFaultException> cfe)
     {
         throw cfe;
     }
     catch (FaultException fe)
     {
         throw fe;
     }
     catch (CommunicationException ce)
     {
         throw ce;
     }
     catch (TimeoutException te)
     {
         throw te;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        async Task SignIn()
        {
            IsBusy = true;
            APIService.Username = Username;
            APIService.Password = Password;
            var request = new UserAuthenticationRequest()
            {
                Username = APIService.Username,
                Password = APIService.Password
            };

            var user = await _service.Authenticate(request);

            if (user != null)
            {
                var userRole = user.UserRoles.FirstOrDefault(i => i.Role.Name == "User");
                if (userRole != null)
                {
                    Application.Current.MainPage = new MainPage();
                    SignedInUserHelper.User      = user;
                    new FavouritesHelper();
                }
            }
            else
            {
                await Application.Current.MainPage.DisplayAlert("Error", "Wrong Username or Password", "OK");
            }
        }
        public UserAuthenticationResponse GetUser(UserAuthenticationRequest request)
        {
            try
            {
                var response = new UserAuthenticationResponse();
                Epi.Web.Enter.Interfaces.DataInterfaces.IDaoFactory entityDaoFactory = new EFwcf.EntityDaoFactory();
                Epi.Web.Enter.Interfaces.DataInterface.IUserDao     IUserDao         = entityDaoFactory.UserDao;
                Epi.Web.BLL.User Implementation = new Epi.Web.BLL.User(IUserDao);

                UserBO UserBO = Mapper.ToUserBO(request.User);

                // UserBO result = Implementation.GetUserByUserId(UserBO);

                UserBO result = Implementation.GetUserByEmail(UserBO);

                if (result != null)
                {
                    response.User = Mapper.ToUserDTO(result);
                }
                return(response);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public UserAuthenticationResponse UpdatePassCode(UserAuthenticationRequest AuthenticationRequest)
 {
     try
     {
         UserAuthenticationResponse result = _iDataService.SetPassCode(AuthenticationRequest);
         return(result);
     }
     catch (FaultException <CustomFaultException> cfe)
     {
         throw cfe;
     }
     catch (FaultException fe)
     {
         throw fe;
     }
     catch (CommunicationException ce)
     {
         throw ce;
     }
     catch (TimeoutException te)
     {
         throw te;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 10
0
        public UserAuthenticationResponse PassCodeLogin(UserAuthenticationRequest request)
        {
            var response = new UserAuthenticationResponse();

            Epi.Web.Interfaces.DataInterfaces.IDaoFactory        entityDaoFactory   = new EF.EntityDaoFactory();
            Epi.Web.Interfaces.DataInterfaces.ISurveyResponseDao ISurveyResponseDao = entityDaoFactory.SurveyResponseDao;
            Epi.Web.Interfaces.DataInterfaces.ISurveyInfoDao     ISurveyInfoDao     = entityDaoFactory.SurveyInfoDao;
            Epi.Web.BLL.SurveyResponse Implementation = new Epi.Web.BLL.SurveyResponse(ISurveyResponseDao, ISurveyInfoDao);

            UserAuthenticationRequestBO PassCodeBO = Mapper.ToPassCodeBO(request);
            bool result = Implementation.ValidateUser(PassCodeBO);

            if (result)
            {
                response.Acknowledge = AcknowledgeType.Failure;
                response.Message     = "Invalid Pass Code.";
                response.UserIsValid = true;
            }
            else
            {
                response.UserIsValid = false;
            }


            return(response);
        }
 public UserAuthenticationResponse GetUserInfo(UserAuthenticationRequest pRequest)
 {
     try
     {
         UserAuthenticationResponse result = _iDataService.GetUser(pRequest);
         return(result);
     }
     catch (FaultException <CustomFaultException> cfe)
     {
         throw cfe;
     }
     catch (FaultException fe)
     {
         throw fe;
     }
     catch (CommunicationException ce)
     {
         throw ce;
     }
     catch (TimeoutException te)
     {
         throw te;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 12
0
        public async Task <AuthenticationResponse> LoginAsync(UserAuthenticationRequest userReq)
        {
            var user = await _userManager.FindByEmailAsync(userReq.Email);

            if (user == null)
            {
                return(new AuthenticationResponse
                {
                    ErrorMessages = new[] { "User does not exist." },
                    Success = false
                });
            }

            var userHasValidPassword = await _userManager.CheckPasswordAsync(user, userReq.Password);

            await _userManager.AddClaimAsync(user, new Claim(Claims.Users, "true"));//TODO:DELETE

            if (!userHasValidPassword)
            {
                return(new AuthenticationResponse
                {
                    ErrorMessages = new[] { "Email/Password are incorrect." },
                    Success = false
                });
            }

            return(await GenerateAuthenticationResultAsync(user));
        }
Ejemplo n.º 13
0
        public async Task <AuthenticationResponse> RegisterAsync(UserAuthenticationRequest userReq)
        {
            var existingUser = await _userManager.FindByEmailAsync(userReq.Email);

            if (existingUser != null)
            {
                return(new AuthenticationResponse
                {
                    ErrorMessages = new[] { "User with this email already exists." },
                    Success = false
                });
            }

            var newUser = new User
            {
                Id       = Guid.NewGuid().ToString(),
                Email    = userReq.Email,
                UserName = userReq.UserName,
                LastName = userReq.LastName
            };

            var createdUser = await _userManager.CreateAsync(newUser, userReq.Password);

            if (!createdUser.Succeeded)
            {
                return(new AuthenticationResponse
                {
                    ErrorMessages = createdUser.Errors.Select(x => x.Description),
                    Success = false
                });
            }

            return(await GenerateAuthenticationResultAsync(newUser));
        }
Ejemplo n.º 14
0
        // [ApiConventionMethod(typeof(DefaultApiConventions), nameof(DefaultApiConventions.Get))]
        public async Task <IActionResult> Authenticate([FromBody] UserAuthenticationRequest user, [FromServices] IFluentEmail email)
        {
            if (!await _authentication.ValidateUserAsync(user.UserName, user.Password))
            {
                return(Unauthorized());
            }

            try
            {
                var userDefinition = await _authentication.GetUserDefinitionAsync(user.UserName);

                var template = @"Dear @Name, You are totally 
                             @Name2. <hr/>
                            <h1>Big Problems en el sistema </h1>";

                //await email
                //    .To("*****@*****.**")
                //    .Subject("Prueba de Correo")
                //     .UsingTemplate(template, new{ Name = "Francisco Areas", Name2="Managua,Nicaragua"} )
                //     .SendAsync();

                return(Ok(new { Token = await _authentication.GetTokenAuthenticateAsync(userDefinition) }));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }
Ejemplo n.º 15
0
 public static UserAuthenticationRequestBO ToPassCodeBO(UserAuthenticationRequest UserAuthenticationObj)
 {
     return(new UserAuthenticationRequestBO
     {
         ResponseId = UserAuthenticationObj.SurveyResponseId,
         PassCode = UserAuthenticationObj.PassCode
     });
 }
Ejemplo n.º 16
0
 public IActionResult Register([FromBody] UserAuthenticationRequest request)
 {
     if (AccountLogic.Register(request, "User"))
     {
         return(Ok());
     }
     return(StatusCode(StatusCodes.Status409Conflict));
 }
        public HttpResponseMessage Register1(String hsId, [FromBody] UserAuthenticationRequest hsRequest)
        {
            dynamic             eo  = new ExpandoObject();
            HttpResponseMessage hrm = Request.CreateErrorResponse(HttpStatusCode.Unauthorized, new Exception("Client Handshake is Not Authorized"));
            var e = new CCHEncrypt();

            if (ValidateConsumer.IsValidConsumer(hsId))
            {
                hrm = Request.CreateErrorResponse(HttpStatusCode.Unauthorized, new Exception("User was Not Found"));

                if (RegDateOfBirth.IsMatch(hsRequest.DateOfBirth))
                {
                    using (var gefae = new GetEnrollmentsForAllEmployers()) {
                        hsRequest.LastFourSsn = hsRequest.LastFourSsn.Trim().Length > 4
                            ? hsRequest.LastFourSsn.Substring(hsRequest.LastFourSsn.Length - 4, 4)
                            : hsRequest.LastFourSsn;

                        gefae.LastName = hsRequest.LastName;
                        gefae.LastFour = hsRequest.LastFourSsn;
                        //DateTime birthDate = DateTime.Parse(hsRequest.DateOfBirth);
                        //gefae.DateOfBirth = string.Format("{0}-{1}-{2}", birthDate.Year, birthDate.Month, birthDate.Day);
                        gefae.DateOfBirth = hsRequest.DateOfBirth;
                        gefae.GetFrontEndData();

                        if (gefae.Tables.Count > 0 &&
                            gefae.Tables[0].Rows.Count > 0)
                        {
                            DataRow dr         = gefae.Tables[0].Rows[0];
                            int     cchid      = dr.GetData <int>("CCHID");
                            int     employerId = dr.GetData <int>("employerid");
                            string  connString = dr.GetData("connectionstring");

                            //UserAccess Check dstrickland 7/8/2015
                            using (var cpaa = new CheckPersonApplicationAccess(cchid, connString)) {
                                if (!cpaa.HasAccess)
                                {
                                    return(Request.CreateErrorResponse(HttpStatusCode.Unauthorized,
                                                                       new Exception(cpaa.ErrorMessage)));
                                }
                            }

                            e.UserKey   = Request.EncryptionKey();
                            e.SecretKey = Properties.Settings.Default.SecretKey;
                            e.Add("CCHID", cchid.ToString(CultureInfo.InvariantCulture));
                            e.Add("EmployerID", employerId.ToString(CultureInfo.InvariantCulture));
                            e.Add("UserID", hsId);

                            ((IDictionary <string, object>)eo)["AuthHash"] = e.ToString();
                            hrm = Request.CreateResponse(HttpStatusCode.OK, (eo as ExpandoObject));

                            //LogUserLoginHistory(null, cchid, connString);
                        }
                    }
                }
            }
            return(hrm);
        }
Ejemplo n.º 18
0
        public bool UpdateUser(UserAuthenticationRequest request)
        {
            Epi.Web.BLL.User userImplementation = new Epi.Web.BLL.User(_userDao);

            UserBO         UserBO = request.User.ToUserBO();
            OrganizationBO OrgBO  = new OrganizationBO();

            return(userImplementation.UpdateUser(UserBO, OrgBO));
        }
Ejemplo n.º 19
0
        public async Task <IActionResult> Login(UserAuthenticationRequest userAuthenticationRequest)
        {
            var authenticatedUser = await _eventManagerApi.AuthenticateUser(userAuthenticationRequest);

            TempData["userToken"] = authenticatedUser.Token;
            TempData["userName"]  = authenticatedUser.FirstName;

            return(RedirectToAction("Index", "Event"));
        }
        public async Task <IActionResult> Authenticate(UserAuthenticationRequest request)
        {
            try
            {
                if (request == null)
                {
                    throw new ArgumentNullException(nameof(request));
                }
                var user = await this.userManager.FindByNameAsync(request.Username);

                if (user == null)
                {
                    return(this.Unauthorized(new { message = "Authentication failed" }));
                }
                var result = await this.signInManager.PasswordSignInAsync(user, request.Password, false, false);

                if (!result.Succeeded)
                {
                    return(this.Unauthorized(new { message = "Authentication failed" }));
                }
                var claims = new List <Claim>
                {
                    new Claim(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString()),
                    new Claim(JwtRegisteredClaimNames.Sub, user.Id.ToString()),
                    new Claim(JwtRegisteredClaimNames.UniqueName, user.UserName)
                };
                var userClaims = new List <Claim>();
                var userRoles  = await this.userManager.GetRolesAsync(user);

                foreach (var role in userRoles)
                {
                    var identityRole = await this.roleManager.FindByNameAsync(role);

                    userClaims.Add(new Claim("role", identityRole.Name));
                    userClaims.AddRange(await this.roleManager.GetClaimsAsync(identityRole));
                }
                userClaims.AddRange(await this.userManager.GetClaimsAsync(user));
                claims.AddRange(userClaims);
                var token    = this.authTokenGeneratorService.GenerateToken(claims);
                var response = new UserAuthenticationResponse
                {
                    IsSuccessful = true,
                    Message      = $"Authenticate: Successfully authenticated user: [{ user.Id }].",
                    Permissions  = userClaims.Where(x => x.Type != "role").Select(x => x.Value).ToList(),
                    Roles        = userRoles.ToList(),
                    Token        = token,
                    UserId       = user.Id,
                    Username     = user.UserName
                };
                return(this.Ok(response));
            }
            catch (Exception ex)
            {
                this.loggerManager.LogError(ex.ToString());
                return(StatusCode(500, "Authentication failed"));
            }
        }
        public HttpResponseMessage PasswordReset2(UserAuthenticationRequest request)
        {
            dynamic data = new ExpandoObject();

            using (GetEmployerConnString gecs = new GetEmployerConnString(Request.EmployerID())) {
                using (GetUserContentPreference gucp = new GetUserContentPreference()) {
                    gucp.CCHID = Request.CCHID();
                    gucp.GetData(gecs.ConnString);

                    data.ContactPhoneNumber = gucp.ContactPhoneNumber;
                }
            }
            string         userName = Request.UserName();
            MembershipUser mu       = Membership.GetUser(userName);

            if (mu == null)
            {
                data.Fail         = true;
                data.ErrorMessage = "Unexpected Error locating User Membership";
            }
            else
            {
                if (string.IsNullOrEmpty(request.SecretAnswer))
                {
                    data.Fail         = true;
                    data.ErrorMessage = "Missing Password Security Secret Answer";
                }
                else
                {
                    try {
                        // Reset the password using the secret answer; the new password is a system-generated one
                        string newPwd = mu.ResetPassword(request.SecretAnswer);

                        // Use the system-generated password to change to the new user-provided password
                        if (mu.ChangePassword(newPwd, request.NewPassword))
                        {
                            mu.Comment = string.Empty;
                            Membership.UpdateUser(mu);

                            data.Success = true;
                        }
                        else
                        {
                            data.Fail         = true;
                            data.ErrorMessage = "Wrong Password Security Secret Answer";
                        }
                    }
                    catch (Exception exc) {
                        data.Fail         = true;
                        data.ErrorMessage = exc.Message;
                    }
                }
            }
            HttpResponseMessage hrm = Request.CreateResponse(HttpStatusCode.OK, (object)data);

            return(hrm);
        }
Ejemplo n.º 22
0
        public void UpdatePassCode(string ResponseId, string Passcode)
        {
            // convert DTO to  UserAuthenticationRquest
            _PassCodeDTO.ResponseId = ResponseId;
            _PassCodeDTO.PassCode   = Passcode;
            UserAuthenticationRequest AuthenticationRequestObj = Mapper.ToUserAuthenticationObj(_PassCodeDTO);

            SurveyHelper.UpdatePassCode(AuthenticationRequestObj, _iSurveyAnswerRepository);
        }
Ejemplo n.º 23
0
 public async Task <MUser> Authenticate(UserAuthenticationRequest request)
 {
     try
     {
         var url = $"{ApiUrl}/User/Authenticate";
         return(await url.WithBasicAuth(Username, Password).PostJsonAsync(request).ReceiveJson <MUser>());
     }
     catch (FlurlHttpException)
     {
         return(default);
Ejemplo n.º 24
0
        public void UpdatePassCode(string responseId, string passcode)
        {
            // convert DTO to  UserAuthenticationRquest
            var passCodeDTO = new PassCodeDTO {
                ResponseId = responseId, PassCode = passcode
            };
            UserAuthenticationRequest authenticationRequest = passCodeDTO.ToUserAuthenticationObj();

            SurveyHelper.UpdatePassCode(authenticationRequest, _securityDataService);
        }
Ejemplo n.º 25
0
        public IActionResult Login([FromBody] UserAuthenticationRequest request)
        {
            User user = Auth.Authenticate(request);

            if (user == null)
            {
                return(NotFound());
            }
            return(StatusCode(StatusCodes.Status202Accepted, new UserAuthenticationResult(user.Id, user.Token, options.Value.TokenExpirationMinutes)));
        }
Ejemplo n.º 26
0
        public async Task <IActionResult> Authenticate([FromBody] UserAuthenticationRequest request)
        {
            var token = await _authService.AuthenticateAsync(request.Email, request.Password);

            var response = new AuthSuccessResponse {
                Token = token
            };

            return(token != null?Ok(response) : Unauthorized());
        }
Ejemplo n.º 27
0
        public void GetUserAuthenticationResponse()
        {
            var request = new UserAuthenticationRequest()
            {
                EmailAddress = "*****@*****.**",
                Password     = "******"
            };
            var response = this.FutureStarDAL.UserAuthentication(request);

            Assert.IsNotNull(response);
        }
Ejemplo n.º 28
0
        public void TestGuestAccess()
        {
            //for guest will use  token binding with that device
            var request = new UserAuthenticationRequest()
            {
                UserName = "******", Token = Guid.NewGuid().ToString()
            };
            var response = this.FutureStarDAL.UserAuthentication(request);

            Assert.IsFalse(string.IsNullOrEmpty(response.Token));
        }
        public bool UpdateUser(UserAuthenticationRequest request)
        {
            Epi.Web.Enter.Interfaces.DataInterfaces.IDaoFactory entityDaoFactory = new EF.EntityDaoFactory();
            Epi.Web.Enter.Interfaces.DataInterface.IUserDao     IUserDao         = entityDaoFactory.UserDao;
            Epi.Web.BLL.User Implementation = new Epi.Web.BLL.User(IUserDao);

            UserBO         UserBO = Mapper.ToUserBO(request.User);
            OrganizationBO OrgBO  = new OrganizationBO();

            return(Implementation.UpdateUser(UserBO, OrgBO));
        }
Ejemplo n.º 30
0
        public UserAuthenticationResponse SetPassCode(UserAuthenticationRequest request)
        {
            var response = new UserAuthenticationResponse();

            SurveyResponseProvider surveyResponseImplementation = new SurveyResponseProvider(_surveyResponseDao);

            Epi.Cloud.Common.BusinessObjects.UserAuthenticationRequestBO PassCodeBO = request.ToPassCodeBO();
            surveyResponseImplementation.SavePassCode(PassCodeBO);

            return(response);
        }
        public string Authenticate(UserAuthenticationRequest userAuthenticationRequest)
        {
            var encryptedPassword = _hashProvider.Hash(userAuthenticationRequest.Password);
            userAuthenticationRequest.Username = userAuthenticationRequest.Username.ToLower();
            var user = _userStorageApplication.GetAll()
                .Where(
                    u =>
                        u.Username == userAuthenticationRequest.Username &&
                        u.Password == encryptedPassword)
                .FirstOrDefault();

            if (user == null)
            {
                throw new UnauthorizedAccessException();
            }

            var accessToken = _securityAccessTokenProvider.CreateAccessToken(user.Id, userAuthenticationRequest);

            return accessToken;
        }
        public string CreateAccessToken(string userId, UserAuthenticationRequest userAuthenticationRequest)
        {
            var sessionDurationRequest = new SessionDurationRequest()
            {
                Days = userAuthenticationRequest.Duration.Days,
                Hours = userAuthenticationRequest.Duration.Hours,
                Minutes = userAuthenticationRequest.Duration.Minutes,
                Seconds = userAuthenticationRequest.Duration.Seconds
            };

            var session = _sessionProvider.GetSession(userId);
            if (session == null)
            {
                session = _sessionProvider.CreateSession(userId, sessionDurationRequest);
            }
            else
            {
                session = _sessionProvider.ValidateSession(session);
            }

            return _encryptionProvider.Encrypt(JsonConvert.SerializeObject(session));
        }
Ejemplo n.º 33
0
        public string CreateUser(User user)
        {
            user.Password = _hashProvider.Hash(user.Password);
            user.Username = user.Username.ToLower();
            var newUser = _userSecurityStorageProvider.Add(user);
            if (!_securityContext.EnableLoginUserOnCreation)
            {
                return null;
            }

            var loginUserOnCreationDuration = _securityContext.LoginUserOnCreationDuration;
            var userAuthenticationRequest = new UserAuthenticationRequest()
            {
                Duration = new UserAuthorizationDurationRequest()
                {
                    Days = loginUserOnCreationDuration.Days,
                    Hours = loginUserOnCreationDuration.Hours,
                    Minutes = loginUserOnCreationDuration.Minutes,
                    Seconds = loginUserOnCreationDuration.Seconds
                }
            };

            return _securityAccessTokenProvider.CreateAccessToken(newUser.Id, userAuthenticationRequest);
        }
Ejemplo n.º 34
0
 /// <summary>
 /// User authentication request processing.
 /// </summary>
 /// <param name="netRequest"><see cref="UserAuthenticationRequest"/> to verify user data from.</param>
 /// <param name="settings"><see cref="LoginServiceSettings"/> object.</param>
 /// <returns><see cref="UserAuthenticationResponse"/> struct.</returns>
 public abstract UserAuthenticationResponse User_Auth( UserAuthenticationRequest netRequest, LoginServiceSettings settings );