承接 scaffoldeducation/jwt-manager-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

scaffoldeducation/jwt-manager-php

Composer 安装命令:

composer require scaffoldeducation/jwt-manager-php

包简介

PHP library to manage JWT authentication

README 文档

README

PHP library to manage JWT authentication

Installation

Requires PHP 7.1.

The recommended way to install is through Composer.

composer require scaffoldeducation/jwt-manager-php

Migration

To execute migration on a Lumen system, you will need import JwtManagerServiceProvider in you application:

Open .\bootstrap\app.php and add this line: $app->register(JwtManager\JwtManagerServiceProvider::class);

You can custom blacklist table name at your .env file (default: oauth_jwt_blacklist):

OAUTH_TABLE_BLACKLIST=oauth_jwt_blacklist

Now execute on your terminal this command: php artisan migratre

Usage

Import this library in your application and use:

// expire and renew is seconds (900 = 15 minutes)
$jwt = new JwtManager(string $appSecret, string $context, int $expire, int $renew);

// generete a new token
$token = $jwt->generate(string $audience, string $subject, array $payload);

// to invalid this token, use:
$jwt->turnInvalid($token);

Sample

it's a good idea to look in the sample folder to understand how it works.

First verify if all dependencies is installed (if need anyelse)

composer install --no-dev --prefer-dist

and run

php sample/jwtManager-sample.php

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2020-07-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固