public function AuthController::__construct in Auth0 Single Sign On 8.2
Same name and namespace in other branches
- 8 src/Controller/AuthController.php \Drupal\auth0\Controller\AuthController::__construct()
Initialize the controller.
Parameters
\Drupal\user\PrivateTempStoreFactory $temp_store_factory: The temp store factory.
\Drupal\Core\Session\SessionManagerInterface $session_manager: The current session.
\Drupal\Core\PageCache\ResponsePolicyInterface $page_cache: Page cache.
\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger factory.
\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\auth0\Util\AuthHelper $auth0_helper: The Auth0 helper.
\GuzzleHttp\Client $http_client: The http client.
File
- src/
Controller/ AuthController.php, line 189 - Contains \Drupal\auth0\Controller\AuthController.
Class
- AuthController
- Controller routines for auth0 authentication.
Namespace
Drupal\auth0\ControllerCode
public function __construct(PrivateTempStoreFactory $temp_store_factory, SessionManagerInterface $session_manager, ResponsePolicyInterface $page_cache, LoggerChannelFactoryInterface $logger_factory, EventDispatcherInterface $event_dispatcher, ConfigFactoryInterface $config_factory, AuthHelper $auth0_helper, Client $http_client) {
// Ensure the pages this controller servers never gets cached.
$page_cache
->trigger();
$this->helper = $auth0_helper;
$this->eventDispatcher = $event_dispatcher;
$this->tempStore = $temp_store_factory
->get(AuthController::SESSION);
$this->sessionManager = $session_manager;
$this->logger = $logger_factory
->get(AuthController::AUTH0_LOGGER);
$this->auth0Logger = $logger_factory
->get('auth0');
$this->config = $config_factory
->get('auth0.settings');
$this->domain = $this->config
->get(AuthController::AUTH0_DOMAIN);
$this->customDomain = $this->config
->get(AuthHelper::AUTH0_CUSTOM_DOMAIN);
$this->clientId = $this->config
->get(AuthController::AUTH0_CLIENT_ID);
$this->clientSecret = $this->config
->get(AuthController::AUTH0_CLIENT_SECRET);
$this->redirectForSso = $this->config
->get(AuthController::AUTH0_REDIRECT_FOR_SSO);
$this->auth0JwtSignatureAlg = $this->config
->get(AuthController::AUTH0_JWT_SIGNING_ALGORITHM);
$this->secretBase64Encoded = FALSE || $this->config
->get(AuthController::AUTH0_SECRET_ENCODED);
$this->offlineAccess = FALSE || $this->config
->get(AuthController::AUTH0_OFFLINE_ACCESS);
$this->httpClient = $http_client;
$this->auth0 = FALSE;
}