22 lines
553 B
PHP
22 lines
553 B
PHP
<?php
|
|
|
|
namespace Pshowsso\Scope68f5e85e9608b\League\OAuth2\Client\Test;
|
|
|
|
use Pshowsso\Scope68f5e85e9608b\Lcobucci\JWT\Signer;
|
|
use Pshowsso\Scope68f5e85e9608b\Lcobucci\JWT\Signer\Key;
|
|
final class KeyDumpSigner implements Signer
|
|
{
|
|
public function algorithmId(): string
|
|
{
|
|
return 'keydump';
|
|
}
|
|
public function sign(string $payload, Key $key): string
|
|
{
|
|
return $key->contents();
|
|
}
|
|
public function verify(string $expected, string $payload, Key $key): bool
|
|
{
|
|
return $expected === $key->contents();
|
|
}
|
|
}
|