You are here

public static function AccessDeniedSubscriber::getSubscribedEvents in SAML Authentication 8.2

Same name and namespace in other branches
  1. 8.3 src/EventSubscriber/AccessDeniedSubscriber.php \Drupal\samlauth\EventSubscriber\AccessDeniedSubscriber::getSubscribedEvents()
  2. 4.x src/EventSubscriber/AccessDeniedSubscriber.php \Drupal\samlauth\EventSubscriber\AccessDeniedSubscriber::getSubscribedEvents()

File

src/EventSubscriber/AccessDeniedSubscriber.php, line 59

Class

AccessDeniedSubscriber
Redirects logged-in users when access is denied to /saml/login.

Namespace

Drupal\samlauth\EventSubscriber

Code

public static function getSubscribedEvents() {

  // Use a higher priority than
  // \Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber, because there's
  // no need to log the exception if we can redirect.
  $events[KernelEvents::EXCEPTION][] = [
    'onException',
    75,
  ];
  return $events;
}