Skip to content

Commit

Permalink
Change error code as per OIDF draft 41
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Ivančić committed Dec 5, 2024
1 parent 8c80c69 commit 21b84cd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Server/Exceptions/OidcServerException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use League\OAuth2\Server\Exception\OAuthServerException;
use Psr\Http\Message\ResponseInterface;
use SimpleSAML\OpenID\Codebooks\ErrorsEnum;
use Throwable;

use function http_build_query;
Expand Down Expand Up @@ -253,7 +254,16 @@ public static function invalidTrustChain(
): OidcServerException {
$errorMessage = 'Trust chain validation failed.';

$e = new self($errorMessage, 12, 'trust_chain_validation_failed', 400, $hint, $redirectUri, $previous, $state);
$e = new self(
$errorMessage,
12,
ErrorsEnum::InvalidTrustChain->value,
400,
$hint,
$redirectUri,
$previous,
$state,
);
$e->useFragmentInHttpResponses($useFragment);

return $e;
Expand Down

0 comments on commit 21b84cd

Please sign in to comment.