Files
drmaterac.pl/modules/pshowsso/vendor/patrickbussmann/oauth2-apple/test/ext/KeyDumpSigner5.php
2025-10-20 14:10:54 +02:00

26 lines
632 B
PHP

<?php
namespace Pshowsso\Scope68f5e85e9608b\League\OAuth2\Client\Test;
use Pshowsso\Scope68f5e85e9608b\Lcobucci\JWT\Signature;
use Pshowsso\Scope68f5e85e9608b\Lcobucci\JWT\Signer;
final class KeyDumpSigner implements Signer
{
public function getAlgorithmId()
{
return 'keydump';
}
public function modifyHeader(array &$headers)
{
$headers['alg'] = $this->getAlgorithmId();
}
public function verify($expected, $payload, $key)
{
return $expected === $key->contents();
}
public function sign($payload, $key)
{
return new Signature($key->contents());
}
}