PHP Class Pagekit\Session\Csrf\Event\CsrfListener

Inheritance: implements Pagekit\Event\EventSubscriberInterface
Show file Open project: pagekit/pagekit

Protected Properties

Property Type Description
$provider Pagekit\Session\Csrf\Provider\CsrfProviderInterface

Public Methods

Method Description
__construct ( Pagekit\Session\Csrf\Provider\CsrfProviderInterface $provider ) Constructor.
onRequest ( $event, $request ) Checks for the CSRF token and throws 401 exception if invalid.
subscribe ( )

Method Details

__construct() public method

Constructor.
public __construct ( Pagekit\Session\Csrf\Provider\CsrfProviderInterface $provider )
$provider Pagekit\Session\Csrf\Provider\CsrfProviderInterface

onRequest() public method

Checks for the CSRF token and throws 401 exception if invalid.
public onRequest ( $event, $request )
$event

subscribe() public method

public subscribe ( )

Property Details

$provider protected property

protected CsrfProviderInterface,Pagekit\Session\Csrf\Provider $provider
return Pagekit\Session\Csrf\Provider\CsrfProviderInterface