public static function AuthenticationSubscriber::getSubscribedEvents in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php \Drupal\Core\EventSubscriber\AuthenticationSubscriber::getSubscribedEvents()
File
- core/
lib/ Drupal/ Core/ EventSubscriber/ AuthenticationSubscriber.php, line 142
Class
- AuthenticationSubscriber
- Authentication subscriber.
Namespace
Drupal\Core\EventSubscriberCode
public static function getSubscribedEvents() {
// The priority for authentication must be higher than the highest event
// subscriber accessing the current user. Especially it must be higher than
// LanguageRequestSubscriber as LanguageManager accesses the current user if
// the language module is enabled.
$events[KernelEvents::REQUEST][] = [
'onKernelRequestAuthenticate',
300,
];
// Access check must be performed after routing.
$events[KernelEvents::REQUEST][] = [
'onKernelRequestFilterProvider',
31,
];
$events[KernelEvents::EXCEPTION][] = [
'onExceptionSendChallenge',
75,
];
$events[KernelEvents::EXCEPTION][] = [
'onExceptionAccessDenied',
80,
];
return $events;
}