You are here

public function AuthHelper::__construct in Auth0 Single Sign On 8.2

Initialize the Helper.

Parameters

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger factory.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

File

src/Util/AuthHelper.php, line 50
Contains \Drupal\auth0\Util\AuthHelper.

Class

AuthHelper
Controller routines for auth0 authentication.

Namespace

Drupal\auth0\Util

Code

public function __construct(LoggerChannelFactoryInterface $logger_factory, ConfigFactoryInterface $config_factory) {
  $this->logger = $logger_factory
    ->get(AuthHelper::AUTH0_LOGGER);
  $this->config = $config_factory
    ->get('auth0.settings');
  $this->domain = $this->config
    ->get(AuthHelper::AUTH0_DOMAIN);
  $this->customDomain = $this->config
    ->get(AuthHelper::AUTH0_CUSTOM_DOMAIN);
  $this->clientId = $this->config
    ->get(AuthHelper::AUTH0_CLIENT_ID);
  $this->clientSecret = $this->config
    ->get(AuthHelper::AUTH0_CLIENT_SECRET);
  $this->redirectForSso = $this->config
    ->get(AuthHelper::AUTH0_REDIRECT_FOR_SSO);
  $this->auth0JwtSignatureAlg = $this->config
    ->get(AuthHelper::AUTH0_JWT_SIGNING_ALGORITHM, AUTH0_DEFAULT_SIGNING_ALGORITHM);
  $this->secretBase64Encoded = FALSE || $this->config
    ->get(AuthHelper::AUTH0_SECRET_ENCODED);
  self::setTelemetry();
}