Skip to content

helderrscorreia/php-jwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

php-jwt

Generate, read and validate JWT tokens.

Usage

First import the JWT.php into your PHP project.

import_once 'JWT.php';

Generate a new token from a payload array

JWT::generateToken([
   'iss' => 'localhost',
   'exp' => '12031032123'
   'name' => 'User',
   'email' => 'a@a.com'
])

Check if a received token is valid

JWT::isTokenValid($receivedToken)

Retrieve the received token payload

$payload = JWT::getPayload($receivedToken)

About

Generate, read and validate JWT tokens.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages