nixilla/php-jwt
最新稳定版本:v0.1.1
Composer 安装命令:
composer require nixilla/php-jwt
包简介
Json Web Token for PHP
关键字:
README 文档
README
<?php require_once './vendor/autoload.php'; $jwt = JWT::encode($token, $key); $decoded = JWT::decode($jwt, $key); ?>
Installation
{
"require": {
"nixilla/php-jwt": "dev-master"
}
}
PHP-JWT
A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec
Example
<?php require_once './vendor/autoload.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); ?>
Tests
Run the tests using phpunit:
git clone https://github.com/jwmickey/php-jwt.git && \ cd php-jwt && \ mkdir bin && \ curl -sS https://getcomposer.org/installer | php -- --install-dir=bin && \ ./bin/composer.phar install --dev && \ ./bin/phpunit
License
统计信息
- 总下载量: 293.06k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2013-05-21