Download the PHP package chenbool/jwt without Composer

On this page you can find all versions of the php package chenbool/jwt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package jwt

PHP JWT

基于 PHP 的 JSON Web Token (JWT) 加密/解密库,符合 RFC 7519 标准。

特性

项目结构

安装

JWT 简介

JSON Web Token (JWT) 是一种开放标准 (RFC 7519),用于在各方之间安全地传输信息。JWT 可以作为 JSON 对象在各方之间安全地传输信息。

JWT 优点

  1. 服务端不需要保存传统会话信息,没有跨域传输问题,减小服务器开销
  2. JWT 构成简单,占用很少的字节,便于传输
  3. JSON 格式通用,不同语言之间都可以使用

JWT 组成

JWT 由三部分组成:

部分 说明
Header(头部) 声明类型和签名算法
Payload(载荷) 包含定义信息和自定义信息
Signature(签名) 签名验证信息

标准声明字段

字段 说明
iss JWT 签发者
sub JWT 所面向的用户
aud 接收 JWT 的一方
exp JWT 的过期时间
nbf 定义在什么时间之前不能访问
iat JWT 的签发时间
jti JWT 的唯一身份标识

使用方法

1. 基本使用

2. 异常处理

异常类说明

异常类 说明
SignatureInvalidException 签名无效异常
BeforeValidException Token 未生效异常
ExpiredException Token 过期异常

环境要求

相关链接


All versions of jwt with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chenbool/jwt contains the following files

Loading the files please wait ...