◆ __construct()
JsonWebToken constructor.
- Paramètres
-
KeyAbstract | $key | key for signing/validating |
string | $algorithm | algorithm to use for signing/validating |
◆ create()
create |
( |
|
$payload, |
|
|
|
$expirationOffset = 0 |
|
) |
| |
Create a signed token string for a payload
- Paramètres
-
array | \ArrayObject | $payload | traversable set of claims, claim => value |
int | $expirationOffset | seconds from now that token will expire. If not specified, an "exp" claim will not be added or updated |
- Renvoie
- string encoded and signed jwt string
- Exceptions
-
◆ decode()
decode |
( |
|
$jwtString, |
|
|
|
$assertClaims = array() |
|
) |
| |
Decode a JWT string, validating signature and well defined registered claims, and optionally validate against a list of supplied claims
- Paramètres
-
string | $jwtString | string containing the JWT to decode |
array | \Traversable | $assertClaims | associative array, claim => value, of claims to assert |
- Renvoie
- object|false
◆ setAlgorithm()
setAlgorithm |
( |
|
$algorithm | ) |
|
- Paramètres
-
string | $algorithm | algorithm to use for signing/validating |
- Renvoie
- JsonWebToken
- Exceptions
-
◆ $algorithm
◆ $claims
◆ $key
La documentation de cette classe a été générée à partir du fichier suivant :
- XoopsCore25-2.5.11-Beta1/htdocs/class/libraries/vendor/xoops/xmf/src/Jwt/JsonWebToken.php