EmailVerificationGateSubscriber
in package
implements
EventSubscriberInterface
Locks an authenticated-but-unverified user to the e-mail verification screen: any web request to another page is redirected to app_verify_code. This closes the hole where an unverified account could reach its dashboard after login.
Table of Contents
Interfaces
- EventSubscriberInterface
Constants
- ALLOWED_ROUTES : mixed = ['app_verify_code', 'app_resend_verification_co...
Properties
- $security : Security
- $urlGenerator : UrlGeneratorInterface
Methods
- __construct() : mixed
- getSubscribedEvents() : array<string|int, mixed>
- onKernelRequest() : void
Constants
ALLOWED_ROUTES
private
mixed
ALLOWED_ROUTES
= ['app_verify_code', 'app_resend_verification_code', 'app_logout']
Properties
$security read-only
private
Security
$security
$urlGenerator read-only
private
UrlGeneratorInterface
$urlGenerator
Methods
__construct()
public
__construct(Security $security, UrlGeneratorInterface $urlGenerator) : mixed
Parameters
- $security : Security
- $urlGenerator : UrlGeneratorInterface
getSubscribedEvents()
public
static getSubscribedEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>onKernelRequest()
public
onKernelRequest(RequestEvent $event) : void
Parameters
- $event : RequestEvent