PHP Class Nelmio\SecurityBundle\EventListener\ExternalRedirectListener

Show file Open project: nelmio/NelmioSecurityBundle Class Usage Examples

Public Methods

Method Description
__construct ( boolean $abort = true, string $override = null, string $forwardAs = null, mixed $targetValidator = null, Psr\Log\LoggerInterface $logger = null, Symfony\Component\Routing\Generator\UrlGeneratorInterface $generator = null )
isExternalRedirect ( $source, $target )
onKernelResponse ( FilterResponseEvent $e )

Method Details

__construct() public method

public __construct ( boolean $abort = true, string $override = null, string $forwardAs = null, mixed $targetValidator = null, Psr\Log\LoggerInterface $logger = null, Symfony\Component\Routing\Generator\UrlGeneratorInterface $generator = null )
$abort boolean If true, the offending redirects are turned into 403 responses, can't be combined with $override
$override string Absolute path, complete URL or route name that must be used instead of the offending redirect's url
$forwardAs string Name of the route-/query string parameter the blocked url will be passed to destination location
$targetValidator mixed array of hosts to be whitelisted, or regex that matches whitelisted hosts, or implementation of TargetValidator
$logger Psr\Log\LoggerInterface A logger, if it's present, detected offenses are logged at the warning level
$generator Symfony\Component\Routing\Generator\UrlGeneratorInterface Router or equivalent that can generate a route, only if override is a route name

isExternalRedirect() public method

public isExternalRedirect ( $source, $target )

onKernelResponse() public method

public onKernelResponse ( FilterResponseEvent $e )
$e Symfony\Component\HttpKernel\Event\FilterResponseEvent