Метод | Описание | |
---|---|---|
__construct ( array $header = [], $encryptionEngine = 'OpenSSL' ) | Constructor. | |
isExpired ( ) : boolean | Checks whether the token is expired based on the 'exp' value. | |
isValid ( resource | string $key, string $algo = null ) : boolean | Checks that the JWS has been signed with a valid private key by verifying it with a public $key and the token is not expired. | |
setPayload ( array $payload ) | Sets the payload of the current JWS with an issued at value in the 'iat' property. |
public __construct ( array $header = [], $encryptionEngine = 'OpenSSL' ) | ||
$header | array | An associative array of headers. The value can be any type accepted by json_encode or a JSON serializable object |
public setPayload ( array $payload ) | ||
$payload | array |