Exemplo n.º 1
0
 public Dictionary<string, string> BuildDictionaryForVerification(IVerification verification)
 {
     Dictionary<string, string> parameters = new Dictionary<string, string>();
     parameters.Add("apikey", verification.ApiKey);
     parameters.Add("providerkey", verification.ProviderKey);
     return parameters;
 }
Exemplo n.º 2
0
 public PasswordResetController(IVerify verify, IPassword password, IUserMaster userMaster, IVerification verification)
 {
     _verify       = verify;
     _iPassword    = password;
     _userMaster   = userMaster;
     _verification = verification;
 }
Exemplo n.º 3
0
        private void InitializeGuagle(IVerification verifier)
        {
            var grid = GuaguaGrid;

            //Clear
            grid.RowDefinitions.Clear();
            grid.ColumnDefinitions.Clear();
            grid.Children.Clear();
            // Initialize
            for (int i = 0; i < this.Model.RowCount; i++)
            {
                grid.RowDefinitions.Add(new RowDefinition());
            }
            for (int j = 0; j < this.Model.ColumnCount; j++)
            {
                grid.ColumnDefinitions.Add(new ColumnDefinition());
            }
            // Add Content
            var index = 0;
            var codes = verifier.CodeList.OfType <GuagleCode>().ToList();

            for (int i = 0; i < this.Model.RowCount; i++)
            {
                for (int j = 0; j < this.Model.ColumnCount; j++)
                {
                    var ci = new CoveredItem(codes[index++].CodeText);
                    ci.CodeChanged += ci_CodeChanged;
                    Grid.SetRow(ci, i);
                    Grid.SetColumn(ci, j);
                    grid.Children.Add(ci);
                }
            }
        }
Exemplo n.º 4
0
        public Dictionary <string, string> BuildDictionaryForVerification(IVerification verification)
        {
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            parameters.Add("apikey", verification.ApiKey);
            parameters.Add("providerkey", verification.ProviderKey);
            return(parameters);
        }
Exemplo n.º 5
0
 public VerificationInfo(IVerification toVerification)
 {
     Result   = toVerification.Result;
     Actual   = toVerification.Actual;
     Expected = toVerification.Expected;
     Message  = toVerification.Message;
     Data     = toVerification.Data;
 }
Exemplo n.º 6
0
 public Submit(ISolutions solutions, IChallenges challenges, IVerification verification, IBroadcast broadcast, DiscordSocketClient client)
 {
     _solutions    = solutions;
     _challenges   = challenges;
     _verification = verification;
     _broadcast    = broadcast;
     _client       = client;
 }
Exemplo n.º 7
0
        public VerificationResult SendVerification(IVerification verification)
        {
            Dictionary<string, string> parameters = _requestBuilderHelper.BuildDictionaryForVerification(verification);

            VerificationResult verificationResult = new VerificationResult();
            XDocument resultDocument = GetResultDocument(parameters, Method.Verify, verificationResult);
            return verificationResult;
        }
Exemplo n.º 8
0
 public CompetitionAdmin(IChallenges challenges, IScheduler scheduler, ISolutions solutions, IVerification verification, DiscordSocketClient client, IYololParser parser)
 {
     _challenges   = challenges;
     _scheduler    = scheduler;
     _verification = verification;
     _client       = client;
     _parser       = parser;
     _solutions    = solutions;
 }
Exemplo n.º 9
0
        public void Add(IVerification verification)
        {
            if (ReferenceEquals(verification, null))
            {
                throw new ArgumentNullException(nameof(verification));
            }

            _verificatons.Add(verification);
        }
Exemplo n.º 10
0
        public VerificationResult SendVerification(IVerification verification)
        {
            Dictionary <string, string> parameters = _requestBuilderHelper.BuildDictionaryForVerification(verification);

            VerificationResult verificationResult = new VerificationResult();
            XDocument          resultDocument     = GetResultDocument(parameters, Method.Verify, verificationResult);

            return(verificationResult);
        }
 public VerifyModel(
     UserManager <ApplicationUser> userManager,
     IVerification verification,
     ILogger <VerifyModel> logger)
 {
     _userManager  = userManager;
     _verification = verification;
     _logger       = logger;
 }
Exemplo n.º 12
0
        public Menu()
        {
            ConfigurationService.Init();

            _flatDataAccess  = new FlatDataAccess();
            _houseDataAccess = new HouseDataAccess();
            _userDataAccess  = new UserDataAccess();

            _sendMessageService = new TwilioClass();
        }
Exemplo n.º 13
0
 public VerificationResult SendVerification(IVerification verification)
 {
     _sendVerificationCalled = true;
     return(new VerificationResult()
     {
         ErrorMessage = string.Empty,
         RemainingMessageCount = 999,
         ResultCode = "200",
         TimeStamp = ""            //TODO: Get valid timestamp format
     });
 }
Exemplo n.º 14
0
 public VerificationResult SendVerification(IVerification verification)
 {
     _sendVerificationCalled = true;
     return new VerificationResult()
                {
                    ErrorMessage = string.Empty,
                    RemainingMessageCount = 999,
                    ResultCode = "200",
                    TimeStamp = "" //TODO: Get valid timestamp format
                };
 }
Exemplo n.º 15
0
 public RegisterModel(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     IVerification verificationService,
     ILogger <RegisterModel> logger)
 {
     _verificationService = verificationService;
     _signInManager       = signInManager;
     _userManager         = userManager;
     _logger = logger;
 }
Exemplo n.º 16
0
        /// <summary>
        /// A wire that verifies each response.
        /// </summary>
        public Verified(IWire origin, IVerification verification) : base(request =>
        {
            var response =
                RuntimeInformation.OSDescription == "Browser"
                ?
                origin.Response(request).Result
                :
                AsyncContext.Run(() => origin.Response(request));

            verification.Verify(response);
            return(new TaskFactory().StartNew <IDictionary <string, string> >(() => response));
        })
        { }
        public T Resolve <T>(IVerification toVerification)
        {
            IKernel kernel  = new StandardKernel();
            var     modules = new List <INinjectModule>
            {
                new AppFmkModule(),
                // new SeleniumModule(browserName)
            };

            kernel.Load(modules);

            return(kernel.Get <T>(new ConstructorArgument("toVerification", toVerification)));
        }
Exemplo n.º 18
0
        private void btnRequest_Click(object sender, RoutedEventArgs e)
        {
            IVerification verifier          = null;
            var           strRequestReturnd = this.Model.RandomRequest(out verifier);

            if (!String.IsNullOrWhiteSpace(strRequestReturnd))
            {
                this.InitializeGuagle(verifier);
                this.Model.Prompt = strRequestReturnd;
            }
            else
            {
                this.Model.Prompt = null;
            }
        }
Exemplo n.º 19
0
 public RegistrationController(
     IUserMaster userMaster,
     IPassword password,
     ISavedAssignedRoles savedAssignedRoles,
     IVerify verify,
     IVerification verification,
     IAgentCheckInStatus agentCheckInStatus)
 {
     _iUserMaster        = userMaster;
     _iPassword          = password;
     _savedAssignedRoles = savedAssignedRoles;
     _verify             = verify;
     _verification       = verification;
     _agentCheckInStatus = agentCheckInStatus;
 }
        /// <summary>
        /// Check input data using verification method in interface variable and input kind of storage.
        /// </summary>
        /// <param name="inputData">
        /// Input password.
        /// </param>
        /// <param name="verification">
        /// Type of checking.
        /// </param>
        /// <param name="storage">
        /// Type of storage.
        /// </param>
        /// <returns>
        /// True if password is correct.
        /// </returns>
        public bool VerifyInputData(string inputData, IVerification verification, IRepository storage)
        {
            if (verification == null || storage == null)
            {
                throw new ArgumentNullException();
            }

            if (!verification.Verify(inputData))
            {
                return(false);
            }

            repository = storage;
            repository.Create(inputData);
            return(true);
        }
Exemplo n.º 21
0
 public LoginController(IUserMaster userMaster,
                        IPassword password,
                        ISavedAssignedRoles savedAssignedRoles,
                        IAgentCheckInStatus agentCheckInStatus,
                        IVerify verify,
                        IProfile profile, ICategory category, IVerification verification)
 {
     _iUserMaster        = userMaster;
     _password           = password;
     _savedAssignedRoles = savedAssignedRoles;
     _agentCheckInStatus = agentCheckInStatus;
     _verify             = verify;
     _iProfile           = profile;
     _category           = category;
     _verification       = verification;
 }
Exemplo n.º 22
0
 /// <summary>
 /// An <see cref="IWire"/> implemented using ASP.NET Core.
 /// </summary>
 public AspNetCoreWire(IAspHttpClients clients, TimeSpan timeout)
 {
     this.clients = clients;
     this.timeout = timeout;
     this.methods =
         new MapOf <HttpMethod>(
             new KeyValuePair <string, HttpMethod>("delete", HttpMethod.Delete),
             new KeyValuePair <string, HttpMethod>("get", HttpMethod.Get),
             new KeyValuePair <string, HttpMethod>("head", HttpMethod.Head),
             new KeyValuePair <string, HttpMethod>("options", HttpMethod.Options),
             new KeyValuePair <string, HttpMethod>("post", HttpMethod.Post),
             new KeyValuePair <string, HttpMethod>("put", HttpMethod.Put),
             new KeyValuePair <string, HttpMethod>("trace", HttpMethod.Trace)
             );
     this.requestVerification =
         new Verifications.Joined(
             new Verifications.Verification(
                 req => new Address.Exists(req).Value(),
                 req => new ArgumentException("No target URI has been specified for the request.")
                 ),
             new Verifications.Verification(
                 req => new Method.Exists(req).Value(),
                 req => new ArgumentException("No http Method has been specified for the request.")
                 ),
             new Verifications.Verification(
                 req => this.methods.ContainsKey(new Method.Of(req).AsString()),
                 req => new ArgumentException(
                     new Formatted(
                         "Unknown method '{0}'. Known methods are {1}",
                         new Method.Of(req).AsString(),
                         new Yaapii.Atoms.Text.Joined(", ",
                                                      this.methods.Keys
                                                      ).AsString()
                         ).AsString()
                     )
                 )
             );
 }
        public IVerification VerifyDisplayStyleWith(string displayValue)
        {
            IVerification info   = Resolver.Resolve <IVerification>();
            string        script = "var element = arguments[0];";

            script += "return element.style.display;";

            IJavaScriptExecutor js = (IJavaScriptExecutor)GetDriver();
            string displayStyle    = js.ExecuteScript(script, GetAutomationElement()).ToString();

            info.Expected = displayValue;
            info.Actual   = displayStyle;
            if (displayStyle.Contains(displayValue))
            {
                info.Result = true;
            }
            else
            {
                info.Result = false;
            }

            return(info);
        }
Exemplo n.º 24
0
 public static void SetUpClass()
 {
     controller = GetClient().Verification;
     applyConfiguration();
 }
Exemplo n.º 25
0
 public VerifyApiController(IVerification verification, UserManager <ApplicationUser> manager)
 {
     _verification = verification;
     _userManager  = manager;
 }
Exemplo n.º 26
0
 /// <summary>
 /// JSON data received as a response from the given wire.
 /// </summary>
 public JsonResponse(IWire wire, IVerification verification, IDictionary <string, string> request) : this(new Verified(wire, verification), request)
 {
 }
Exemplo n.º 27
0
 public VerificationResult SendVerification(IVerification verification)
 {
     ValidateObject(verification);
     return _httpInterface.SendVerification(verification);
 }
Exemplo n.º 28
0
 public VerificationResult SendVerification(IVerification verification)
 {
     ValidateObject(verification);
     return(_httpInterface.SendVerification(verification));
 }
Exemplo n.º 29
0
 /// <summary>
 /// JSON data received as a response from the given wire.
 /// </summary>
 public JsonResponse(IWire wire, IVerification verification) : this(new Verified(wire, verification))
 {
 }
Exemplo n.º 30
0
 public void Verify(IVerification verification)
 {
     verification.Verify(this.ruleTree);
 }
Exemplo n.º 31
0
 public AccountController(IAccountServices services, IVerification phoneServices)
 {
     _services      = services;
     _phoneServices = phoneServices;
 }
Exemplo n.º 32
0
        public String RandomRequest(out IVerification verifier)
        {
            verifier = null;
            try
            {
                int nRandom = 0;

                nRandom = Helper.RandomObj.Next(DB.GroupList.Count);
                var objGroup = DB.GroupList[nRandom];
                if (objGroup == null)
                {
                    return(null);
                }

                nRandom = Helper.RandomObj.Next(objGroup.CompanyList.Count);
                var objCompany = objGroup.CompanyList[nRandom];
                if (objCompany == null)
                {
                    return(null);
                }

                nRandom = Helper.RandomObj.Next(objCompany.ProductList.Count);
                var objProduct = objCompany.ProductList[nRandom];
                if (objProduct == null)
                {
                    return(null);
                }

                nRandom = Helper.RandomObj.Next(objProduct.LotList.Count);
                var objLot = objProduct.LotList[nRandom];
                if (objLot == null)
                {
                    return(null);
                }

                nRandom = Helper.RandomObj.Next(objLot.TransactionList.Count);
                var objTransaction = objLot.TransactionList[nRandom];
                if (objTransaction == null)
                {
                    return(null);
                }

                verifier          = objTransaction.Verfication;
                _strRequestBackup = _strRequest = String.Format("{0};{1};{2};{3};{4}",
                                                                objGroup.SID,
                                                                objCompany.SID,
                                                                objProduct.SID,
                                                                objLot.SID,
                                                                objTransaction.SID);
                return(DB.Request(_strRequest));
            }
            catch (Exception ex)
            {
                ExceptionHandler.ThrowException(ex);
                return(null);
            }
            finally
            {
                this.SendPropertyChanged(() => CanRequestAgain);
            }
        }
Exemplo n.º 33
0
 private bool IsVerified(IVerification verification)
 {
     return(verification.IsVerified(RuleList));
 }
Exemplo n.º 34
0
 public VerifyRegistrationController(IVerification verificationRepository)
 {
     _verificationRepository = verificationRepository;
 }