Download the PHP package wiseadmin/wise-jwt without Composer

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

wiseadmin/wise-jwt

WiseAdmin JWT 令牌管理包 — 签发/校验/吊销/续签,支持 HMAC/RSA/ECDSA/EdDSA,生产级方案

PHP Version ThinkPHP Packagist


特性

模块 说明
10 种签名算法 HS256/384/512、RS256/384/512、ES256/384/512、EdDSA
零外部依赖 纯 PHP 实现全部算法,不依赖第三方 JWT 库
黑名单吊销 Cache / Redis 双驱动黑名单,吊销即生效
自动续签 refresh_ttl 窗口内自动签发新 Token
多提取器 Bearer Header / Cookie / Query 参数,支持链式组合
声明校验 过期/生效/签发者/受众四类可配置校验规则
Auth 中间件 JwtAuth 中间件,路由级别鉴权
流式签发 Builder 构建器,语义化签发
事件驱动 签发/解析/吊销/无效全生命周事件

安装


配置

发布配置文件:

配置文件 config/wise-jwt.php:


使用指南

1. 签发 Token

2. 流式签发(Builder)

3. 解析与校验 Token

4. 续签 Token

5. 吊销 Token(加入黑名单)

6. 中间件鉴权

中间件自动从 Bearer Header 提取 Token,校验通过后将 payload 注入请求上下文:

7. 自定义提取器

默认使用 BearerHeaderExtractor(从 Authorization: Bearer xxx 提取),也支持链式组合:

8. 事件监听


算法选择指南

算法 类型 密钥 适用场景
HS256 HMAC 单一共享密钥 单体应用、内部服务
HS384 HMAC 单一共享密钥 更高安全要求
HS512 HMAC 单一共享密钥 最高 HMAC 强度
RS256 RSA 私钥签发 + 公钥校验 微服务、跨系统
RS384 RSA 私钥签发 + 公钥校验 更高安全要求
RS512 RSA 私钥签发 + 公钥校验 最高 RSA 强度
ES256 ECDSA 私钥签发 + 公钥校验 移动端(签名短)
ES384 ECDSA 私钥签发 + 公钥校验 更高安全要求
ES512 ECDSA 私钥签发 + 公钥校验 最高 ECDSA 强度
EdDSA Ed25519 私钥签发 + 公钥校验 现代应用,性能最优

目录结构


License

MIT


All versions of wise-jwt with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
topthink/framework Version ^8.0
wiseadmin/wise-support Version 1.0.*
ext-json Version *
ext-openssl Version *
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 wiseadmin/wise-jwt contains the following files

Loading the files please wait ...