TokenTypeSupport
in
Table of Contents
Methods
- retrieveTokenHeaders() : void
- This method will retrieve the protect and unprotected headers of the token for the given index.
- supports() : bool
- This method returns true if the token in argument is supported, otherwise false.
Methods
retrieveTokenHeaders()
This method will retrieve the protect and unprotected headers of the token for the given index.
public
retrieveTokenHeaders(JWT $jwt, int $index, array<string|int, mixed> &$protectedHeader, array<string|int, mixed> &$unprotectedHeader) : void
The index is useful when the token is serialized using the Json General Serialization mode. For example the JWE Json General Serialization Mode allows several recipients to be set. The unprotected headers correspond to the share unprotected header and the selected recipient header.
Parameters
- $jwt : JWT
- $index : int
- $protectedHeader : array<string|int, mixed>
- $unprotectedHeader : array<string|int, mixed>
supports()
This method returns true if the token in argument is supported, otherwise false.
public
supports(JWT $jwt) : bool
Parameters
- $jwt : JWT