-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74818d3
commit d5048c7
Showing
4 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
namespace League\OAuth2\Client\Test; | ||
|
||
use Lcobucci\JWT\Signer; | ||
use 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(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters