Exemplo n.º 1
0
 /**
  * @param AuthorizationResponse $response
  * @return bool
  * @throws \LogicException
  */
 public function validateResponse(AuthorizationResponse $response)
 {
     if (!$this->isInitiated()) {
         throw new \LogicException('State not initiated');
     }
     if (empty($response->getParams()['state'])) {
         return false;
     }
     return $response->getParams()['state'] == $this->getState();
 }