Skip to content

code-ql-testing/php-jwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP-JWT

A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec

Example

<?php
  include_once 'JWT.php';

  $key = "example_key";
  $token = array(
    "iss" => "http://example.org",
    "aud" => "http://example.com",
    "iat" => 1356999524,
    "nbf" => 1357000000
  );

  $jwt = JWT::encode($token, $key);
  $decoded = JWT::decode($jwt, $key);

  print_r($decoded);
?>

License

3-Clause BSD.

About

PHP package for JWT

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 99.0%
  • Shell 1.0%