Jwt
- Full name:
\OAuth2\Encryption\Jwt
- This class implements:
\OAuth2\Encryption\EncryptionInterface
See Also:
- https://github.com/F21/jwt -
Methods
encode
Parameters:
Parameter | Type | Description |
---|---|---|
$payload |
mixed | |
$key |
mixed | |
$algo |
string |
decode
Parameters:
Parameter | Type | Description |
---|---|---|
$jwt |
string | |
$key |
null | |
$allowedAlgorithms |
array|bool |
verifySignature
private verifySignature(mixed $signature, mixed $input, mixed $key, string $algo = 'HS256'): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$signature |
mixed | |
$input |
mixed | |
$key |
mixed | |
$algo |
string |
Throws:
sign
Parameters:
Parameter | Type | Description |
---|---|---|
$input |
mixed | |
$key |
mixed | |
$algo |
string |
Throws:
generateRSASignature
Parameters:
Parameter | Type | Description |
---|---|---|
$input |
mixed | |
$key |
mixed | |
$algo |
string |
Throws:
urlSafeB64Encode
Parameters:
Parameter | Type | Description |
---|---|---|
$data |
string |
urlSafeB64Decode
Parameters:
Parameter | Type | Description |
---|---|---|
$b64 |
string |
generateJwtHeader
Override to create a custom header
Parameters:
Parameter | Type | Description |
---|---|---|
$payload |
mixed | |
$algorithm |
mixed |
hash_equals
Parameters:
Parameter | Type | Description |
---|---|---|
$a |
string | |
$b |
string |
Automatically generated on 2025-03-18