PHP Класс GenTux\Jwt\Drivers\FirebaseDriver

Наследование: implements GenTux\Jwt\Drivers\JwtDriverInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( integer $leeway = null )
createToken ( array $payload, string $secret, string $algorithm = 'HS256' ) : string Create a new token with the provided payload
decodeToken ( string $token, string $secret, string $algorithm = 'HS256' ) : array Decode the provided token into an array
validateToken ( string $token, string $secret, string $algorithm = 'HS256' ) : boolean Validate that the provided token

Приватные методы

Метод Описание
convertObjectToArray ( mixed $data ) : array Recursively convert the provided object to an array

Описание методов

__construct() публичный Метод

public __construct ( integer $leeway = null )
$leeway integer for checking timestamps

createToken() публичный Метод

Create a new token with the provided payload
public createToken ( array $payload, string $secret, string $algorithm = 'HS256' ) : string
$payload array
$secret string
$algorithm string
Результат string

decodeToken() публичный Метод

Decode the provided token into an array
public decodeToken ( string $token, string $secret, string $algorithm = 'HS256' ) : array
$token string
$secret string
$algorithm string
Результат array

validateToken() публичный Метод

Validate that the provided token
public validateToken ( string $token, string $secret, string $algorithm = 'HS256' ) : boolean
$token string
$secret string
$algorithm string
Результат boolean