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

Build Status Latest Stable Version Total Downloads License

JWT

一个简单的 PHP JSON Web Tokens (JWT) 加密/解密插件 RFC 7519.

一:JWT介绍:

全称JSON Web Token,基于JSON的开放标准(RFC 7519),以token的方式代替传统的Cookie-Session模式,用于各服务器、客户端传递信息签名验证

二:JWT优点:

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

三:JWT组成

  1. jwt由三部分组成:

    • 头部(header)
    • 载荷(payload) 包含一些定义信息和自定义信息
    • 签证(signature)
  2. 具体构成:

    header:{
      "typ": "JWT", //声明类型为jwt
      "alg": "HS256" //声明签名算法为SHA256
    }

    载荷(payload)

    {
      "iss": "http://www.helloweba.net",
      "aud": "http://www.helloweba.net",
      "iat": 1525317601,
      "nbf": 1525318201,
      "exp": 1525318201,
      "data": {
        "userid": 1
      }
    }

    载荷包括两部分:标准声明和其他声明

标准声明字段:

名称 描述
iss jwt签发者
sub jwt所面向的用户
aud 接收jwt的一方
exp jwt的过期时间,过期时间必须要大于签发时间
nbf 定义在什么时间之前,某个时间点后才能访问
iat jwt的签发时间
jti jwt的唯一身份标识,主要用来作为一次性token

安装

使用 composer 管理依赖并下载:

案例

案例 RS256 (openssl)


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 ....