You are here

public function CasForcedAuthSubscriber::__construct in CAS 2.x

Constructs a new CasSubscriber.

Parameters

\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/CasForcedAuthSubscriber.php, line 96

Class

CasForcedAuthSubscriber
Event subscriber for implementing CAS forced authentication.

Namespace

Drupal\cas\Subscriber

Code

public function __construct(RouteMatchInterface $route_matcher, ConfigFactoryInterface $config_factory, AccountInterface $current_user, ConditionManager $condition_manager, CasHelper $cas_helper, CasRedirector $cas_redirector) {
  $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->forcedLoginPaths = $settings
    ->get('forced_login.paths');
  $this->forcedLoginEnabled = $settings
    ->get('forced_login.enabled');
}