Пример #1
0
        internal Silanis.ESL.API.Auth ToAPIAuthentication()
        {
            Silanis.ESL.API.Auth auth = new Silanis.ESL.API.Auth();

            auth.Scheme = Scheme();

            foreach (Challenge challenge in challenges)
            {
                Silanis.ESL.API.AuthChallenge authChallenge = new Silanis.ESL.API.AuthChallenge();

                authChallenge.Question = challenge.Question;
                authChallenge.Answer   = challenge.Answer;
                auth.AddChallenge(authChallenge);
            }

            if (!String.IsNullOrEmpty(PhoneNumber))
            {
                Silanis.ESL.API.AuthChallenge challenge = new Silanis.ESL.API.AuthChallenge();

                challenge.Question = PhoneNumber;
                auth.AddChallenge(challenge);
            }

            return(auth);
        }
Пример #2
0
		internal Silanis.ESL.API.Auth ToAPIAuthentication ()
		{
			Silanis.ESL.API.Auth auth = new Silanis.ESL.API.Auth ();

			auth.Scheme = Scheme ();

			foreach (Challenge challenge in challenges)
			{
				Silanis.ESL.API.AuthChallenge authChallenge = new Silanis.ESL.API.AuthChallenge();

				authChallenge.Question = challenge.Question;
				authChallenge.Answer = challenge.Answer;
				auth.AddChallenge (authChallenge);
			}

			if (!String.IsNullOrEmpty (PhoneNumber))
			{
				Silanis.ESL.API.AuthChallenge challenge = new Silanis.ESL.API.AuthChallenge ();

				challenge.Question = PhoneNumber;
				auth.AddChallenge (challenge);
			}

			return auth;
		}
Пример #3
0
        private Silanis.ESL.API.Auth CreateTypicalAPIAuthentication()
        {
            Silanis.ESL.API.Auth          result        = new Silanis.ESL.API.Auth();
            Silanis.ESL.API.AuthChallenge authChallenge = new Silanis.ESL.API.AuthChallenge();
            authChallenge.Question  = "What is the name of your dog?";
            authChallenge.Answer    = "Max";
            authChallenge.MaskInput = true;
            result.AddChallenge(authChallenge);
            result.Scheme = Silanis.ESL.API.AuthScheme.CHALLENGE;

            return(result);
        }
        private Silanis.ESL.API.Auth CreateTypicalAPIAuthentication()
        {
            Silanis.ESL.API.Auth result = new Silanis.ESL.API.Auth();
            Silanis.ESL.API.AuthChallenge authChallenge = new Silanis.ESL.API.AuthChallenge();
            authChallenge.Question = "What is the name of your dog?";
            authChallenge.Answer = "Max";
            authChallenge.MaskInput = true;
            result.AddChallenge(authChallenge);
            result.Scheme = Silanis.ESL.API.AuthScheme.CHALLENGE;

            return result;
        }