PHP Class Lcobucci\JWT\Parser

Since: 0.1.0
Author: Luís Otávio Cobucci Oblonczyk ([email protected])
Afficher le fichier Open project: lcobucci/jwt Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Lcobucci\Jose\Parsing\Decoder $decoder, Factory $claimFactory ) Initializes the object
parse ( string $jwt ) : Token Parses the JWT and returns a token

Méthodes protégées

Méthode Description
parseClaims ( string $data ) : array Parses the claim set from a string
parseHeader ( string $data ) : array Parses the header from a string
parseSignature ( array $header, string $data ) : Lcobucci\JWT\Signature | null Returns the signature from given data
splitJwt ( string $jwt ) : array Splits the JWT string into an array

Method Details

__construct() public méthode

Initializes the object
public __construct ( Lcobucci\Jose\Parsing\Decoder $decoder, Factory $claimFactory )
$decoder Lcobucci\Jose\Parsing\Decoder
$claimFactory Lcobucci\JWT\Claim\Factory

parse() public méthode

Parses the JWT and returns a token
public parse ( string $jwt ) : Token
$jwt string
Résultat Token

parseClaims() protected méthode

Parses the claim set from a string
protected parseClaims ( string $data ) : array
$data string
Résultat array

parseHeader() protected méthode

Parses the header from a string
protected parseHeader ( string $data ) : array
$data string
Résultat array

parseSignature() protected méthode

Returns the signature from given data
protected parseSignature ( array $header, string $data ) : Lcobucci\JWT\Signature | null
$header array
$data string
Résultat Lcobucci\JWT\Signature | null

splitJwt() protected méthode

Splits the JWT string into an array
protected splitJwt ( string $jwt ) : array
$jwt string
Résultat array