Add Symfony Deprecation Contracts package
- Created CHANGELOG.md to maintain version history. - Added README.md with usage instructions for the trigger_deprecation() function. - Initialized composer.json for the Symfony Deprecation Contracts library, specifying dependencies and autoloading.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace League\OAuth2\Client\Test;
|
||||
|
||||
use Lcobucci\JWT\Signature;
|
||||
use 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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user