You are here

public function CasGatewayAuthSubscriber::__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/CasGatewayAuthSubscriber.php, line 116

Class

CasGatewayAuthSubscriber
Event subscriber for implementing CAS gateway 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->gatewayEnabled = $settings
    ->get('gateway.enabled');
  $this->gatewayRecheckTime = $settings
    ->get('gateway.recheck_time');
  $this->gatewayPaths = $settings
    ->get('gateway.paths');
  $this->gatewayMethod = $settings
    ->get('gateway.method');
}