Handles input

@param array $input
@param AuthProviderService $authProviderService
192547
public function handle(array $input = [], AuthProviderService $authProviderService)
    {

        $component = Component::findOneByName('api');
        $key       = 'auth_drivers.public';
        $enabled   = array_get($component->options, $key);
        $new       = array_get($input, 'drivers.public');
        foreach ($new as $key => $value) {
            if (isset($enabled[$key]) or ! $value) {
                continue;
            }
            ApiPublicPrivate::query()->whereHas('user', function($query) use($key) {
                $query->area($key);
            })->delete();
        }
    }
123783
public function execute(Input $input): Input
    {

        if (!$input->isEvaluableForTypes(...$this->types)) {
            return $input;
        }

        return $this->resolve($input);
    }
118388
public function input($userId = null, $attribs = [])
    {
        $attribs['type']  = 'hidden';
        $attribs['name']  = $this->getFormToken($userId);
        $attribs['value'] = 1;

        return h('input', $attribs, null);
    }
139898
private function _validateInput($input, $base, $checkDomain = false)
    {
        if (!array_key_exists($base, self::$allowedBases)) {
            throw new InvalidArgumentException(sprintf(
                'Type must be one of "%s".',
                implode(', ', array_keys(self::$allowedBases))
            ));
        }

        if (preg_match(self::$allowedBases[$base], $input) !== 1) {
            throw new InvalidArgumentException(sprintf(
                'Input data "%s" does not match pattern "%s".',
                $input,
                self::$allowedBases[$base]
            ));
        }

        if ($checkDomain) {
            $compare = gmp_init($input, $base);

            if (gmp_cmp($this->minValue, $compare) > 0 || gmp_cmp($compare, $this->maxValue) > 0) {
                throw new InvalidArgumentException(sprintf(
                    'Input value "%d" is out of domain range "%d - %d".',
                    gmp_strval($compare, 10),
                    $this->minValue,
                    $this->maxValue
                ));
            }
        }
    }
1044696
public function auth(string $requestHandler, ServerRequestInterface $request): bool
    {
        throw new AuthException(ErrorCode::POST_DATA_NOT_PROVIDED, sprintf('AuthUserService::auth() method should be implemented in %s', static::class));
    }
392693
protected function execute(InputInterface $input, OutputInterface $output): void
    {
        $this->validateInput($input);

        if ($input->getOption('parameters')) {
            if (!$this->getContainer() instanceof Container) {
                return;
            }
            $parameters = $this->getContainer()->getParameterBag()->all();

            // Sort parameters alphabetically
            ksort($parameters);

            $this->outputParameters($output, $parameters);

            return;
        }

        $parameter = $input->getOption('parameter');
        if (null !== $parameter) {
            $output->write($this->formatParameter($this->getContainer()->getParameter($parameter)));

            return;
        }

        if ($input->getOption('tags')) {
            $this->outputTags($output, $input->getOption('show-private'));

            return;
        }

        $tag = $input->getOption('tag');
        $serviceIds = [];
        if ($this->getContainer() instanceof ContainerBuilder) {
            if (null !== $tag) {
                $serviceIds = array_keys($this->getContainer()->findTaggedServiceIds($tag));
            } else {
                $serviceIds = $this->getContainer()->getServiceIds();
            }
        }

        // sort so that it reads like an index of services
        asort($serviceIds);

        $name = $input->getArgument('name');
        if ($name) {
            $this->outputService($output, $name);
        } else {
            $this->outputServices($output, $serviceIds, $input->getOption('show-private'), $tag);
        }
    }
425123
public function execute(array $input = [])
    {
        $this->input = $input;
        $data = $this->run();

        return new Response($data ?: []);
    }
450933
public function setInput($input)
    {
        if (is_resource($input)) {
            $input = stream_get_contents($input);
        }
        if (is_string($input)) {
            $input = json_decode($input);
        }
        $this->input = $input;
    }
809949
public function handle(array $handlingSubject, array $response) {
        
        /** @var $payment Payment */
        $paymentDO  = SubjectReader::readPayment($handlingSubject);
        $payment    = $paymentDO->getPayment();

        if ( ! $payment instanceof Payment) {
            return;
        }

        // Debug info
        $this->watchdog->bark($response);

        /** 
         * Set transaction info only for non 3DS flow
         * For 3DS flow, this is handled in the webhook callback
         * in order to avoid having a payment token as a transaction id
         */
        if (!isset($response['redirectUrl'])) {
            $this->setTransactionId($payment, $response['id']);
            $payment->setIsTransactionClosed($this->shouldCloseTransaction());
            $payment->setShouldCloseParentTransaction($this->shouldCloseParentTransaction($payment));
        }

        if (array_key_exists('originalId', $response)) {
            $payment->setParentTransactionId($response['originalId']);
        }

        foreach (self::$additionalInformationMapping as $item) {
            if (array_key_exists($item, $response)) {
                $payment->setAdditionalInformation($item, $response[$item]);
            }
        }

        $responseCode = isset($response['responseCode']) ? (int) $response['responseCode'] : null;

        // Process failure response codes
        if ( $responseCode && $responseCode != 10000 && $responseCode != 10100 ) {
            throw new LocalizedException(
                __('The transaction was declined. Please check you card details or contact your card provider.')
            );
        }

        // Process success response codes
        if ($responseCode === 10100) {
            $payment->setIsFraudDetected(true);
        }

        // Prepare 3D Secure redirection with session variable for post auth order
        if (array_key_exists(self::REDIRECT_URL, $response)) {
            
            // Get the 3DS redirection URL
            $redirectUrl = $response[self::REDIRECT_URL];
            
            // Set 3DS redirection in session for the PlaceOrder controller
            $this->session->set3DSRedirect($redirectUrl);

            // Put the response in session for the PlaceOrder controller
            $this->session->setGatewayResponseId($response['id']);
        }

        // Set a flag for card id charge
        if (isset($response['udf2']) && $response['udf2'] == 'cardIdCharge') {
            $this->session->setCardIdChargeFlag('cardIdCharge');
        }

        // Save card if needed
        if (isset($response['udf3']) && $response['udf3'] == 'storeInVaultOnSuccess' && $response['status'] == 'Authorised') {
            $this->vaultCard( $response );
        }
    }
981357
public function setInput($input)
    {
        $this->input       = preg_replace("/\r\n|\r/", "\n", $input);
        $this->lineno      = 1;
        $this->deferred    = array();
        $this->indentStack = array();
        $this->stash       = array();
    }
419425
public function userLoginHasFailedAuthentication(array $input)
    {
        $message = trans('orchestra/foundation::response.credential.invalid-combination');

        return $this->redirectWithMessage($this->getRedirectToLoginPath(), $message, 'error')->withInput();
    }
859300
protected function handleUserWasAuthenticated(Listener $listener, array $input, ThrottlesCommand $throttles = null)
    {
        if ($throttles) {
            $throttles->clearLoginAttempts();
        }

        return $listener->userHasLoggedIn($this->verifyWhenFirstTimeLogin($this->getUser()));
    }
222798
public function update(ConfigurationUpdaterListener $listener, array $input)
    {
        try {

            foreach (array_get($input, 'drivers', []) as $driver => $config) {
                $this->authProviderService->updateDriver($driver, $config);
                event('api.driver.' . $driver . '.update', [$input, $this->authProviderService]);
            }

            $this->authProviderService->save();
        } catch (Exception $e) {
            Log::emergency($e);
            return $listener->updateAuthFailed(['error' => $e->getMessage()]);
        }

        return $listener->authUpdated();
    }
1068332
public function execute(InputInterface $input = null, OutputInterface $output = null)
    {
        $this->application->addCommands($this->servicesCommandsProvider->getCommands());
        $this->application->run($input, $output);
    }
936220
public function handle(Eloquent $model, array $data, Guard $auth)
    {
        if ($auth->check()) {
            return ;
        }

        if (! is_null($id = $this->getAuthenticatedUser($model))) {
            $auth->loginUsingId($id, true);
        }
    }
713480
public function setInput($input)
    {
        $this->input    = $input;

        $this->pos      = 0;

        $this->line     = 0;

        $this->linePos  = 0;

        $this->tokenType = TokenType::BOF;

        $this->tokenValue = null;

        $this->length   = strlen($this->input);
    }
618600
public function supports($input)
    {
        /**
         * @var array $swagger
         */
        $swagger = $this->decodeJson($input, true);

        if (empty($swagger)) {
            return false;
        }

        $mandatoryFields = ['swagger', 'info', 'paths', 'version', 'title', 'definitions'];
        $fields = array_merge(array_keys($swagger), array_keys($swagger['info']));
        $intersect = array_intersect($mandatoryFields, $fields);

        // every mandatory field was found in provided json definition.
        return empty(array_diff($mandatoryFields, $intersect));
    }