Results

11.02.2020
cilogon_auth 8.x-1.1 :: src/Controller/CILogonAuthRedirectController.php
        // ensure that the user, not a malicious script, is making the request.
        $query = $this->requestStack->getCurrentRequest()->query;
        $state_token = $query->get('state');
        if ($state_token && CILogonAuthStateToken::confirm($state_token)) {
            return AccessResult::allowed();
        }
        return AccessResult::forbidden();
    }
17.03.2018
client_connection_square 8.x-1.0-alpha4 :: src/Controller/OauthToken.php
    // Get previous form uri from temp store.
    $collection = $this->getTempStore()->get('client_connection_square');
    $uri = $collection->get($request->query->get('state'));
    $collection->delete($request->query->get('state'));
    if ($uri) {
      $url = Url::fromUri($uri, $options)->toString();
    }
    else {
      $url = Url::fromRoute('client_connection.settings')->toString();
    }
    // $request is not passed in to _custom_access.
    // @see https://www.drupal.org/node/2786941
    if (\Drupal::csrfToken()->validate(\Drupal::request()->query->get('state'))) {
      return AccessResult::allowed();
    }
    return AccessResult::forbidden($this->t('Invalid token'));
  }

}
20.07.2020
feeds_youtube 8.x-1.x-dev :: src/Feeds/Fetcher/Form/FeedsYouTubeFetcherFeedForm.php
      if (!empty($code)) {
        $state = \Drupal::request()->query->get('state');
        $tempstore_state = $this->privateTempStoreFactory->get('feeds_youtube')->get('state');
        if (strval($tempstore_state) !== strval($state)) {
          \Drupal::messenger()->addError($this->t('The session state did not match. Please try again.'));
        }
        else {
          $client = $this->plugin->getClientFactory($feed->id());
03.08.2020
id4me 2.0.x-dev :: src/Controller/RedirectController.php
    // ensure that the user, not a malicious script, is making the request.
    $query = $this->requestStack->getCurrentRequest()->query;
    $state_token = $query->get('state');
    if ($state_token && StateToken::confirm($state_token)) {
      return AccessResult::allowed();
    }
    return AccessResult::forbidden();
  }
    else {
      // Process the login or connect operations.
      $this->id4meService->setState($query->get('state'));
      $authorizationTokens = $this->id4meService->getAuthorizationTokens($query->get('code'));
      $userInfo = $this->id4meService->getUserInfo();

      $account = $this->authmapService->userLoadByIdentifier(
        $authorizationTokens->getIdTokenDecoded()->getIss(),
        $authorizationTokens->getIdTokenDecoded()->getSub()
24.04.2018
iyo 8.x-1.0 :: src/Controller/ItsyouonlineAuthorizeController.php
      return $redirect->send();
    } else {
      if (\Drupal::request()->query->get('state') !== $hash) {
        ItsyouonlineUtils::logger()->error(t('Authorize callback error, oauth - state does not match'));
        throw new ServiceUnavailableHttpException();
      }

      $params = array(
        'client_id' => $clientId,
17.01.2018
open_connect 8.x-1.x-dev :: src/Controller/RedirectController.php
    // Confirm anti-forgery state token. This round-trip verification helps to
    // ensure that the user, not a malicious script, is making the request.
    if ($this->csrfToken->validate($request->query->get('state', ''), self::TOKEN_KEY)) {
      // Check operation.
      $configuration = $request->getSession()->get('open_connect', []);
      $configuration += ['operation' => 'login'];
      if ($configuration['operation'] === 'login' xor $account->isAuthenticated()) {
        // 'login' for anonymous user or 'connect' for authenticated user.
        $result = AccessResult::allowed();
04.04.2018
openid_connect_rest 8.x-1.0-rc2 :: src/Controller/ApiController.php
      $currentRequest = $this->requestStack->getCurrentRequest();

      $state_token = $currentRequest->query->get('state');
      $state_token = $this->findStateToken($state_token);
      if (!empty($state_token) && is_object($state_token)) {
        if ($state_token->expires >= ((new DrupalDateTime())->format('U'))) {
          return AccessResult::allowed();
        }
        $state_token->delete();
    // State token can be safely deleted from database.
    $currentRequest = $this->requestStack->getCurrentRequest();
    $state_token = $currentRequest->query->get('state');
    $this->deleteStateToken($state_token);

    if ($authorized && $user->isAuthenticated()) {
      $authenticated = TRUE;
      $message = $this->t('You have been successfully authenticated by @provider_id', [
        '@provider_id' => $provider_id,
04.04.2018
openid_connect_rest 8.x-1.0-rc2 :: openid_connect_rest.module
    $currentRequest = \Drupal::request();

    $state_token = $currentRequest->query->get('state');
    $authorization_code = $currentRequest->query->get('code');

    if (!empty($authorization_code) && !empty($state_token)) {
      $rest_authentication_mapping = AuthorizationMapping::create([
        'id' => \Drupal::service('uuid')->generate(),
        'authorization_code' => $authorization_code,
08.02.2018
ppoidc 8.x-1.2 :: src/Controller/RedirectController.php
    // ensure that the user, not a malicious script, is making the request.
    $query = $this->requestStack->getCurrentRequest()->query;
    $state_token = $query->get('state');
    if ($state_token && StateToken::confirm($state_token)) {
      return AccessResult::allowed();
    }
    return AccessResult::forbidden();
  }
07.09.2018
simple_openid_server 8.x-1.x-dev :: src/Form/AuthorizeForm.php
    $client_id = $this->getRequest()->query->get('client_id');
    $redirect_uri = $this->getRequest()->query->get('redirect_uri');
    $state = $this->getRequest()->query->get('state');

    if (!isset($redirect_uri)) {
      return new JsonResponse(array('error' => 'invalid_request'), JsonResponse::HTTP_BAD_REQUEST);
    }
    else if ($response_type !== 'code' || $client_id !== $this->getClientId()) {
      return new TrustedRedirectResponse($redirect_uri . '?error=invalid_request&state=' . $state);
    $client_id = $this->getRequest()->query->get('client_id');
    $redirect_uri = $this->getRequest()->query->get('redirect_uri');
    $state = $this->getRequest()->query->get('state');

    $code = array('sub' => $sub, 'client_id' => $client_id, 'redirect_uri' => $redirect_uri);

    $form_state->setResponse(new TrustedRedirectResponse($redirect_uri . '?code='.JWT::encode($code, 'code_secret').'&state=' . $state));
  }
19.02.2018
social_auth_drupal 8.x-1.x-dev :: src/Controller/DrupalAuthController.php
    // Retreives $_GET['state'].
    $retrievedState = $this->request->getCurrentRequest()->query->get('state');
    if (empty($retrievedState) || ($retrievedState !== $state)) {
      $this->userManager->nullifySessionKeys();
      drupal_set_message($this->t('Drupal login failed. Unvalid oAuth2 State.'), 'error');
      return $this->redirect('user.login');
    }
23.08.2019
social_auth_esia 8.x-1.0-rc2 :: src/Controller/EsiaAuthController.php
    $state_stored = $private_collection->get('state');

    if ($state_stored !== $this->request->query->get('state')) {
      $this->messenger()->addError('ESIA login is failed.');
      return $this->redirect('user.login');
    }

    $private_collection->set('code', $this->request->query->get('code'));
10.02.2020
social_auth_steemconnect 8.x-2.x-dev :: src/Controller/SteemconnectAuthController.php
    // Retreives $_GET['state'].
    $retrievedState = $this->request->getCurrentRequest()->query->get('state');
    if (empty($retrievedState) || ($retrievedState !== $state)) {
      $this->userManager->nullifySessionKeys();
      $this->messenger->addError($this->t('Steemconnect login failed. Unvalid oAuth2 State.'));
      return $this->redirect('user.login');
    }
09.12.2021
userway 8.x-1.4 :: src/Controller/AccountController.php
  public function index() {
    $accountId = Drupal::request()->query->get('accountId');
    $status = Drupal::request()->query->get('state');
    $database = Drupal::database();
    $query = $database->query("SELECT account, status FROM {userway_data}");
    $dbRecord = $query->fetchAssoc();

    if ($dbRecord) {
      $database->update('userway_data')
16.01.2023
dependent_country_state 1.0.6 :: src/Form/StateForm.php
      '#title' => $this->t('State'),
      '#placeholder' => 'New Delhi',
      '#default_value' => !empty($this->getRequest->getCurrentRequest()->query->get('state')) ? $this->getRequest->getCurrentRequest()->query->get('state') : '',
    ];

    $form['state_search']['country'] = [
      '#type' => 'select',
      '#title' => $this->t('Country'),
      '#options' => $options,
16.01.2023
dependent_country_state 1.0.6 :: src/Form/AddPincodeForm.php
        '#validated' => TRUE,
        '#options' => $optionState,
        '#default_value' => $pincodeData->stateId ?? $this->getRequest->getCurrentRequest()->query->get('state'),
        '#prefix' => '<div id="state_list">',
        '#suffix' => '</div>',
        '#empty_option' => $this->t('- Select State -'),
      ];

    }
      '#title' => $this->t('Area Name'),
      '#placeholder' => 'Mayur Vihar',
      '#default_value' => $pincodeData->area_name ?? $this->getRequest->getCurrentRequest()->query->get('state'),
    ];

    $form['pincode'] = [
      '#type' => 'textfield',
      '#size' => '30',
      '#title' => $this->t('Pincode'),
      '#title' => $this->t('Pincode'),
      '#placeholder' => '110091',
      '#default_value' => $pincodeData->pincode ?? $this->getRequest->getCurrentRequest()->query->get('state'),
    ];

    $form['action'] = ['#type' => 'actions'];

    $form['state_search']['submit'] = [
      '#type' => 'submit',
16.01.2023
dependent_country_state 1.0.6 :: src/Form/PincodeForm.php
        '#validated' => TRUE,
        '#options' => $optionState,
        '#default_value' => $this->getRequest->getCurrentRequest()->query->get('state') ?? '',
        '#prefix' => '<div id="state_list">',
        '#suffix' => '</div>',
        '#empty_option' => $this->t('- Select State -'),
      ];

    }
    $stateId = $this->getRequest->getCurrentRequest()->query->get('state') ?? 0;
    if ($stateId > 0) {
      $cityList = $this->getData->getAllCityByStateId($stateId);
      $optionCity = ['' => 'Select City'];
      foreach ($cityList as $value) {
        $optionCity[$value->id] = $value->city_name;
      }
16.01.2023
dependent_country_state 1.0.6 :: src/Form/AddStateForm.php
      '#title' => $this->t('State'),
      '#placeholder' => 'New Delhi',
      '#default_value' => $stateData[0]->state_name ?? $this->getRequest->getCurrentRequest()->query->get('state'),
    ];

    $form['action'] = ['#type' => 'actions'];

    $form['state_search']['submit'] = [
      '#type' => 'submit',
16.01.2023
dependent_country_state 1.0.6 :: src/Form/CityForm.php
      '#suffix' => '</div>',
      '#options' => $optionState,
      '#default_value' => !empty($this->getRequest->getCurrentRequest()->query->get('state')) ? $this->getRequest->getCurrentRequest()->query->get('state') : '',
    ];

    $form['state_search']['city'] = [
      '#type' => 'textfield',
      '#size' => '30',
      '#title' => $this->t('City'),
16.01.2023
dependent_country_state 1.0.6 :: src/Form/AddCtForm.php
      '#validated' => TRUE,
      '#options' => $optionState,
      '#default_value' => $cityData[0]->stateId ?? $this->getRequest->getCurrentRequest()->query->get('state'),
      '#empty_option' => $this->t('- Select State -'),
      '#prefix' => '<div id="state_list">',
      '#suffix' => '</div>',
    ];

    $form['city'] = [
      '#title' => $this->t('City Name'),
      '#placeholder' => 'New Delhi',
      '#default_value' => $cityData[0]->city_name ?? $this->getRequest->getCurrentRequest()->query->get('state'),
    ];

    $form['action'] = ['#type' => 'actions'];

    $form['state_search']['submit'] = [
      '#type' => 'submit',

Pages

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc