2017 © Pedro Peláez
 

library php-jwt

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

image

50onred/php-jwt

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

  • Wednesday, January 14, 2015
  • by sleekslush
  • Repository
  • 4 Watchers
  • 0 Stars
  • 38 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 639 Forks
  • 0 Open issues
  • 5 Versions
  • 9 % Grown

The README.md

Build Status, (*1)

PHP-JWT

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

Installation

Use composer to manage your dependencies and download PHP-JWT:, (*3)

composer require firebase/php-jwt

Example

 "http://example.org",
    "aud" => "http://example.com",
    "iat" => 1356999524,
    "nbf" => 1357000000
);

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

print_r($decoded);

/*
 NOTE: This will now be an object instead of an associative array. To get
 an associative array, you will need to cast it as such:
*/

$decoded_array = (array) $decoded;

?>

Tests

Run the tests using phpunit:, (*4)

$ pear install PHPUnit
$ phpunit --configuration phpunit.xml.dist
PHPUnit 3.7.10 by Sebastian Bergmann.
.....
Time: 0 seconds, Memory: 2.50Mb
OK (5 tests, 5 assertions)

License

3-Clause BSD., (*5)

The Versions

14/01 2015

dev-master

9999999-dev https://github.com/50onred/php-jwt

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

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.2.0

 

by Craig Slusher
by Neuman Vong
by Anant Narayanan

14/01 2015

1.0.3

1.0.3.0 https://github.com/50onred/php-jwt

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

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.2.0

 

by Craig Slusher
by Neuman Vong
by Anant Narayanan

14/01 2015

1.0.2

1.0.2.0 https://github.com/50onred/php-jwt

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

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.2.0

 

by Craig Slusher
by Neuman Vong
by Anant Narayanan

13/01 2015

v1.0.1

1.0.1.0 https://github.com/50onred/php-jwt

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

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.2.0

 

by Craig Slusher
by Neuman Vong
by Anant Narayanan

28/08 2014

1.0.0

1.0.0.0 https://github.com/firebase/php-jwt

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

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.2.0

 

by Neuman Vong
by Anant Narayanan