PHP code example of maatify / jwt
1. Go to this page and download the library: Download maatify/jwt library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
maatify / jwt example snippets
use JwtHandler\JWTAssist;
class JwtCheck extends JWTAssist
{
protected string $ssl_secret = '6GSSLr%70SecrectH1IAbtestzoHB0!0bI';
protected string $ssl_key = 'M7u9SSLR3&0testwXRAIbKEYGoYJjK';
protected string $ssl_cipher_algo = 'AES-128-ECB';
public function Hash(): string
{
return $this->Encode('www.maatify.dev', 60, ['array of data']);
}
public function Dehash(string $jwt_token): \stdClass
{
return $this->Decode($jwt_token);
}