fusionauth/jwt-auth-webtoken-provider 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fusionauth/jwt-auth-webtoken-provider

最新稳定版本:1.0.0

Composer 安装命令:

composer require fusionauth/jwt-auth-webtoken-provider

包简介

This package uses web-token/jwt-framework as a provider for tymon/jwtauth

README 文档

README

Integration

This library adds support to web-token/jwt-framework as an alternative to lcobucci/jwt in tymon/jwt-auth, which is probably the most used Laravel package for JWT authentication.

The main goal here is to provide JWKS support instead of using public keys stored locally.

Installation

You can install this library via Composer.

composer require fusionauth/jwt-auth-webtoken-provider

Then, you should add one of PHP JWT Framework's Signature libraries according to the algorithm you want to use:

  • HMAC algorithms (HS256, HS384 or HS512):
    composer require web-token/jwt-signature-algorithm-hmac
  • RSASSA-PKCS1 v1_5 algorithms (RS256, RS384 or RS512):
    composer require web-token/jwt-signature-algorithm-rsa
  • ECDSA algorithms (ES256, ES384 or ES512):
    composer require web-token/jwt-signature-algorithm-ecdsa

Usage

This requires composer 2.2 or greater.

Publish this package config file (which overrides the one from tymon/jwt-auth):

php artisan vendor:publish --provider="FusionAuth\JWTAuth\WebTokenProvider\Providers\WebTokenServiceProvider"

Using JWKS

Instead of providing a local public key and use JWKS, edit your .env file to add these lines:

JWT_JWKS_URL=https://your.application.address.to/jwks.json
JWT_JWKS_URL_CACHE=86400

Packagist

You can find this on https://packagist.org/packages/fusionauth/jwt-auth-webtoken-provider

This packagist listing is updated using a GitHub webhook.

Release

  • sb release
  • sb publish

Questions and support

If you have a question or support issue regarding this client library, we'd love to hear from you.

If you have a paid edition with support included, please open a ticket in your account portal. Learn more about paid editions here.

Otherwise, please post your question in the community forum.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/FusionAuth/fusionauth-laravel-jwt-auth-webtoken-provider.

License

This code is available as open source under the terms of the Apache v2.0 License.

统计信息

  • 总下载量: 19.95k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 8
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2023-06-30