Method |
Description |
|
decode ( string $jwt, string | Array | null $key = null, boolean $verify = true ) : object |
Decodes a JWT string into a PHP object. |
|
encode ( object | array $payload, string $key, string $algo = 'HS256', $keyId = null ) : string |
Converts and signs a PHP object or array into a JWT string. |
|
jsonDecode ( string $input ) : object |
Decode a JSON string into a PHP object. |
|
jsonEncode ( object | array $input ) : string |
Encode a PHP object into a JSON string. |
|
sign ( string $msg, string | resource $key, string $method = 'HS256' ) : string |
Sign a string with a given key and algorithm. |
|
urlsafeB64Decode ( string $input ) : string |
Decode a string with URL-safe Base64. |
|
urlsafeB64Encode ( string $input ) : string |
Encode a string with URL-safe Base64. |
|
verify ( string $msg, string $signature, string | resource $key, string $method = 'HS256' ) : boolean |
Verify a signature with the mesage, key and method. Not all methods
are symmetric, so we must have a separate verify and sign method. |
|