PHP Class GenTux\Jwt\Drivers\FirebaseDriver

Inheritance: implements GenTux\Jwt\Drivers\JwtDriverInterface
Afficher le fichier Open project: generationtux/jwt-artisan Class Usage Examples

Méthodes publiques

Méthode Description
__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

Private Methods

Méthode Description
convertObjectToArray ( mixed $data ) : array Recursively convert the provided object to an array

Method Details

__construct() public méthode

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

createToken() public méthode

Create a new token with the provided payload
public createToken ( array $payload, string $secret, string $algorithm = 'HS256' ) : string
$payload array
$secret string
$algorithm string
Résultat string

decodeToken() public méthode

Decode the provided token into an array
public decodeToken ( string $token, string $secret, string $algorithm = 'HS256' ) : array
$token string
$secret string
$algorithm string
Résultat array

validateToken() public méthode

Validate that the provided token
public validateToken ( string $token, string $secret, string $algorithm = 'HS256' ) : boolean
$token string
$secret string
$algorithm string
Résultat boolean