You are here

public function CasSubscriber::__construct in CAS 8

Constructs a new CasSubscriber.

Parameters

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request.

\Drupal\Core\Routing\RouteMatchInterface $route_matcher: The route matcher.

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

\Drupal\Core\Session\AccountInterface $current_user: The current user.

\Drupal\Core\Condition\ConditionManager $condition_manager: The condition manager.

\Drupal\cas\Service\CasHelper $cas_helper: The CAS Helper service.

\Drupal\cas\Service\CasRedirector $cas_redirector: The CAS Redirector Service.

File

src/Subscriber/CasSubscriber.php, line 121

Class

CasSubscriber
Provides a CasSubscriber.

Namespace

Drupal\cas\Subscriber

Code

public function __construct(RequestStack $request_stack, RouteMatchInterface $route_matcher, ConfigFactoryInterface $config_factory, AccountInterface $current_user, ConditionManager $condition_manager, CasHelper $cas_helper, CasRedirector $cas_redirector) {
  $this->requestStack = $request_stack;
  $this->routeMatcher = $route_matcher;
  $this->configFactory = $config_factory;
  $this->currentUser = $current_user;
  $this->conditionManager = $condition_manager;
  $this->casHelper = $cas_helper;
  $this->casRedirector = $cas_redirector;
  $settings = $this->configFactory
    ->get('cas.settings');
  $this->gatewayCheckFrequency = $settings
    ->get('gateway.check_frequency');
  $this->gatewayPaths = $settings
    ->get('gateway.paths');
  $this->forcedLoginPaths = $settings
    ->get('forced_login.paths');
  $this->forcedLoginEnabled = $settings
    ->get('forced_login.enabled');
}