Метод |
Описание |
|
__construct ( GenTux\Jwt\Drivers\JwtDriverInterface $jwt, string | null $secret = null, string | null $algorithm = null ) |
|
|
__toString ( ) : string |
Convert into string |
|
algorithm ( ) : string |
Get the algorithm to use |
|
createToken ( GenTux\Jwt\JwtPayloadInterface | array $payload, string | null $secret = null, string | null $algo = null ) : JwtToken |
Create a new token with the provided payload |
|
jsonSerialize ( ) : mixed |
Specify data which should be serialized to JSON |
|
payload ( string | null $path = null, string | null $secret = null, string | null $algo = null ) : array |
Get the payload from the current token |
|
secret ( ) : string |
Get the secret to use for token operations |
|
setAlgorithm ( string $algo ) : self |
Set the algorithm to use |
|
setSecret ( string $secret ) : self |
Set the secret to use for token operations |
|
setToken ( string $token ) : self |
Set the current JWT token |
|
token ( ) : string |
Get the current JWT token |
|
validate ( string | null $secret = null, string | null $algo = null ) : boolean |
Validate a token |
|
validateOrFail ( string | null $secret = null, string | null $algo = null ) : boolean |
Validate the token or throw an exception |
|