You are here

public function FakeAuthorizationController::authorize in Lingotek Translation 3.3.x

Same name and namespace in other branches
  1. 8 tests/modules/lingotek_test/src/Controller/FakeAuthorizationController.php \Drupal\lingotek_test\Controller\FakeAuthorizationController::authorize()
  2. 8.2 tests/modules/lingotek_test/src/Controller/FakeAuthorizationController.php \Drupal\lingotek_test\Controller\FakeAuthorizationController::authorize()
  3. 4.0.x tests/modules/lingotek_test/src/Controller/FakeAuthorizationController.php \Drupal\lingotek_test\Controller\FakeAuthorizationController::authorize()
  4. 3.0.x tests/modules/lingotek_test/src/Controller/FakeAuthorizationController.php \Drupal\lingotek_test\Controller\FakeAuthorizationController::authorize()
  5. 3.1.x tests/modules/lingotek_test/src/Controller/FakeAuthorizationController.php \Drupal\lingotek_test\Controller\FakeAuthorizationController::authorize()
  6. 3.2.x tests/modules/lingotek_test/src/Controller/FakeAuthorizationController.php \Drupal\lingotek_test\Controller\FakeAuthorizationController::authorize()
  7. 3.4.x tests/modules/lingotek_test/src/Controller/FakeAuthorizationController.php \Drupal\lingotek_test\Controller\FakeAuthorizationController::authorize()
  8. 3.5.x tests/modules/lingotek_test/src/Controller/FakeAuthorizationController.php \Drupal\lingotek_test\Controller\FakeAuthorizationController::authorize()
  9. 3.6.x tests/modules/lingotek_test/src/Controller/FakeAuthorizationController.php \Drupal\lingotek_test\Controller\FakeAuthorizationController::authorize()
  10. 3.7.x tests/modules/lingotek_test/src/Controller/FakeAuthorizationController.php \Drupal\lingotek_test\Controller\FakeAuthorizationController::authorize()
  11. 3.8.x tests/modules/lingotek_test/src/Controller/FakeAuthorizationController.php \Drupal\lingotek_test\Controller\FakeAuthorizationController::authorize()
1 string reference to 'FakeAuthorizationController::authorize'
lingotek_test.routing.yml in tests/modules/lingotek_test/lingotek_test.routing.yml
tests/modules/lingotek_test/lingotek_test.routing.yml

File

tests/modules/lingotek_test/src/Controller/FakeAuthorizationController.php, line 11

Class

FakeAuthorizationController

Namespace

Drupal\lingotek_test\Controller

Code

public function authorize(Request $request) {

  // We need a flag for setting that we are already logged in.
  \Drupal::state()
    ->set('lingotek_fake.logged_in', TRUE);

  // We provide a token and redirect back.
  $url = $request
    ->get('redirect_uri');
  $url .= '&access_token=test_token';
  return new RedirectResponse($url);
}