public function authentication(HttpRequestEvent $event)
 {
     if ($event->getRequest()->get($this->paramName) !== $this->key) {
         throw new InvalidRequestException(self::MESSAGE_AUTHENTICATION_FAILED);
     }
 }
Exemplo n.º 2
0
 public function testGetRequest()
 {
     $request = new Request();
     $event = new HttpRequestEvent($request);
     $this->assertSame($request, $event->getRequest());
 }