Download the PHP package aiya-zhao/php-jwt without Composer

On this page you can find all versions of the php package aiya-zhao/php-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 php-jwt

要求

// 前端接口token验证配置 $config_api = [ 'jwt_secret' => 'abc', // 秘钥 'ttl' => 60 2, // 过期时间 分钟 'refresh_ttl' => 60 4, // 刷新时间 分钟 'alg' => 'sha256' // 签名算法 ];

// 后台接口token验证配置 $config_admin = [ 'jwt_secret' => 'bcd', 'ttl' => 60 24 2, 'refresh_ttl' => 60 24 4, 'alg' => 'sha256' ];

$token_api = JWT::config($config_api)->setSub(123)->getToken(); // 获取token echo $token_api; // 输出token $head_arr = JWT::getHead(); // 获取头信息 $body_arr = JWT::getBody(); // 获取载荷信息 $jwt = JWT::parseToekn($token_api); // 解析token信息 $head_arr = $jwt->getHead(); // 获取解析token的头信息 $check_token = JWT::checkToken($token_api); // 验证token有效期 $token_admin = "xxx.xxx.xxx"; // 后台token $jwt_admin = JWT::config($config_admin)->parseToekn($token_admin); // 解析后台接口token信息 $head_arr_admin = JWT::getHead(); // 获取头信息 $refresh_token = JWT::refreshToken(); // 刷新token echo $refresh_token; // 输出刷新后的token $sub = JWT::getSub(); // 获取主题


All versions of php-jwt with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
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 aiya-zhao/php-jwt contains the following files

Loading the files please wait ...