neoan3 wrapper for JSON WEB TOKEN using Firebase

v1.0.2 2024-06-19 15:14 UTC

This package is auto-updated.

Last update: 2024-10-19 16:08:29 UTC


README

Simple JWT implementation suited for neoan3 developers.

Installation

composer require neoan3-apps/jwt

Quick start

require dirname(__FILE__).'/vendor/autoload.php'

use Neoan3\Apps\JWT;

$mySecret = '123456';

JWT::expiresAt('+1 hour');

// encode

$token = JWT::encode($mySecret);

// verify & decode

$decoded = JWT::decode($token, $mySecret);

if($decoded['error'] === false){

  print_r($decoded['decoded']);
  
}