class ContextListener implements ListenerInterface
ContextListener manages the SecurityContext persistence through a session.
__construct(TokenStorageInterface $tokenStorage, iterable $userProviders, string $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, AuthenticationTrustResolverInterface $trustResolver = null) | ||
setLogoutOnUserChange(bool $logoutOnUserChange) deprecated Enables deauthentication during refreshUser when the user has changed. | ||
handle(GetResponseEvent $event) Reads the Security Token from the session. | ||
onKernelResponse(FilterResponseEvent $event) Writes the security token into the session. | ||
TokenInterface|null | refreshUser(TokenInterface $token) Refreshes the user by reloading it from the user provider. | |
static | handleUnserializeCallback($class) |
TokenStorageInterface | $tokenStorage | |
iterable | $userProviders | |
string | $contextKey | |
LoggerInterface | $logger | |
EventDispatcherInterface | $dispatcher | |
AuthenticationTrustResolverInterface | $trustResolver |
deprecated
Enables deauthentication during refreshUser when the user has changed.
bool | $logoutOnUserChange |
Reads the Security Token from the session.
GetResponseEvent | $event |
Writes the security token into the session.
FilterResponseEvent | $event |
Refreshes the user by reloading it from the user provider.
TokenInterface | $token |
TokenInterface|null |
RuntimeException |
$class |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Security/Http/Firewall/ContextListener.html