for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 Spomky-Labs
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace OAuth2Framework\Component\Server\Response;
use OAuth2Framework\Component\Server\Endpoint\Authorization\Authorization;
final class OAuth2Exception extends \Exception implements \Throwable
{
/**
* @var array
private $data;
* @var null|Authorization
private $authorization;
* OAuth2Exception constructor.
* @param int $code
* @param array $data
* @param \Exception|null $previous
* @param Authorization|null $authorization
public function __construct(int $code, array $data, ?Authorization $authorization = null, ? \Exception $previous = null)
$this->data = $data;
$this->authorization = $authorization;
parent::__construct('', $code, $previous);
}
* @return array
public function getData(): array
return $this->data;
* @return null|Authorization
public function getAuthorization(): ?Authorization
return $this->authorization;