Ejemplo n.º 1
0
        private bool ValidateAndCleanRequestMessage(WorkflowAuthorisationArgs args)
        {
            if (args == null)
            {
                return(false);
            }

            return(_WorkflowAuthorisationTokenValidator.IsValid(args.Token));
        }
        public bool Validate(WorkflowArgs args)
        {
            if (args == null)
            {
                return(false);
            }

            if (!_AuthorisationTokenValidator.IsValid(args.Token))
            {
                return(false);
            }

            if (_Config.WorkflowKeyCountMin > args.Items.Length ||
                args.Items.Length > _Config.WorkflowKeyCountMax)
            {
                return(false);
            }

            return(args.Items.All(_TemporaryExposureKeyValidator.Valid));
        }