protected function TwitterAuthController::getRedirectResponse in Open Social 8
Same name and namespace in other branches
- 8.9 modules/custom/social_auth_twitter/src/Controller/TwitterAuthController.php \Drupal\social_auth_twitter\Controller\TwitterAuthController::getRedirectResponse()
- 8.2 modules/custom/social_auth_twitter/src/Controller/TwitterAuthController.php \Drupal\social_auth_twitter\Controller\TwitterAuthController::getRedirectResponse()
- 8.3 modules/custom/social_auth_twitter/src/Controller/TwitterAuthController.php \Drupal\social_auth_twitter\Controller\TwitterAuthController::getRedirectResponse()
- 8.4 modules/custom/social_auth_twitter/src/Controller/TwitterAuthController.php \Drupal\social_auth_twitter\Controller\TwitterAuthController::getRedirectResponse()
- 8.5 modules/custom/social_auth_twitter/src/Controller/TwitterAuthController.php \Drupal\social_auth_twitter\Controller\TwitterAuthController::getRedirectResponse()
- 8.6 modules/custom/social_auth_twitter/src/Controller/TwitterAuthController.php \Drupal\social_auth_twitter\Controller\TwitterAuthController::getRedirectResponse()
- 8.7 modules/custom/social_auth_twitter/src/Controller/TwitterAuthController.php \Drupal\social_auth_twitter\Controller\TwitterAuthController::getRedirectResponse()
- 8.8 modules/custom/social_auth_twitter/src/Controller/TwitterAuthController.php \Drupal\social_auth_twitter\Controller\TwitterAuthController::getRedirectResponse()
Returns the redirect response.
Parameters
string $type: Type of action, "login" or "register".
Return value
\Drupal\Core\Routing\TrustedRedirectResponse|\Symfony\Component\HttpFoundation\RedirectResponse Returns a RedirectResponse.
2 calls to TwitterAuthController::getRedirectResponse()
- TwitterAuthController::userLogin in modules/
custom/ social_auth_twitter/ src/ Controller/ TwitterAuthController.php - Response for path 'user/login/twitter'.
- TwitterAuthController::userRegister in modules/
custom/ social_auth_twitter/ src/ Controller/ TwitterAuthController.php - Response for path 'user/register/twitter'.
File
- modules/
custom/ social_auth_twitter/ src/ Controller/ TwitterAuthController.php, line 82
Class
- TwitterAuthController
- Manages requests to Twitter API.
Namespace
Drupal\social_auth_twitter\ControllerCode
protected function getRedirectResponse($type) {
$sdk = $this
->getSdk($type);
if ($sdk instanceof RedirectResponse) {
return $sdk;
}
$this->authManager
->setSdk($sdk);
$url = $this->authManager
->getAuthenticationUrl($type);
return new TrustedRedirectResponse($url);
}