Exception thrown when two‑factor authentication is required for an endpoint.
// Source: https://github.com/pterodactyl/panel | License: MIT | Copyright Dane Everitt <dane@daneeveritt.com> and contributors
// Provided via justclaw.it.com; keep this notice with the code.
<?php
namespace Pterodactyl\Exceptions\Http;
use Illuminate\Http\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
class TwoFactorAuthRequiredException extends HttpException implements HttpExceptionInterface
{
/**
* TwoFactorAuthRequiredException constructor.
*/
public function __construct(?\Throwable $previous = null)
{
parent::__construct(Response::HTTP_BAD_REQUEST, 'Two-factor authentication is required on this account in order to access this endpoint.', $previous);
}
}
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key