protected void performLogin(DLoginPayload loginPayload)
 {
     if (!isLoggingIn)
     {
         loginController.OnLoginError += onLoginError;
         this.loginPayload             = loginPayload;
         toggleInteraction(isInteractable: false);
         showGeneralError(string.Empty);
         CoroutineRunner.StopAllForOwner(this);
         CoroutineRunner.Start(submitActions(loginPayload), this, "LoginFormSubmitValidation");
         AccountFlowData accountFlowData = Service.Get <MembershipService>().GetAccountFlowData();
         accountFlowData.FlowType = AccountFlowType.login;
     }
 }
 private IEnumerator submitActions(DLoginPayload loginPayload)
 {
     if (inputFieldValidatorGroup != null)
     {
         inputFieldValidatorGroup.StartValidation();
         while (!inputFieldValidatorGroup.IsValidationComplete())
         {
             yield return(null);
         }
         if (inputFieldValidatorGroup.CheckForValidationErrors())
         {
             toggleInteraction(isInteractable: true);
             inputFieldValidatorGroup.ResetValidationComplete();
             yield break;
         }
     }
     loginController.Login(loginPayload);
 }
Exemplo n.º 3
0
    public void Login(DLoginPayload payload)
    {
        CPIDCredentials cpidCreds = default(CPIDCredentials);

        cpidCreds.username = payload.Username;
        cpidCreds.password = payload.Password;
        Service.Get <EventDispatcher>().AddListener <PlayerStateServiceEvents.MigrationDataRecieved>(onLoginSuccess);
        Service.Get <EventDispatcher>().AddListener <PlayerStateServiceErrors.LegacyAccountMigrationError>(onLoginFailed);
        if (networkServiceManager != null)
        {
            if (networkServiceManager.PlayerStateService != null)
            {
                networkServiceManager.PlayerStateService.MigrateLegacy(cpidCreds);
            }
            else
            {
                Log.LogError(this, "networkServiceManager.PlayerStateService not initialized for classic migration login");
            }
        }
        else
        {
            Log.LogError(this, "NetworkServiceManager not initialized for classic migration login");
        }
    }
 public abstract void Login(DLoginPayload payload);
 public override void Login(DLoginPayload payload)
 {
     loginService.Login(payload.Username, payload.Password);
 }