承接 ngabor84/laravel-jwt-auth 相关项目开发

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

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

ngabor84/laravel-jwt-auth

最新稳定版本:3.2.0

Composer 安装命令:

composer require ngabor84/laravel-jwt-auth

包简介

JWT authentication middleware for the Laravel and Lumen framework

README 文档

README

GitHub license

JWT Auth Middleware

JWT authentication middleware for the Laravel and Lumen framework.

About

This package allows you to authenticate the incoming requests with JWT authentication.

Installation

Require the ngabor84/laravel-jwt-auth package in your composer.json and update your dependencies:

composer require ngabor84/laravel-jwt-auth

Usage with Laravel

Add the service provider to the providers array in the config/app.php config file as follows:

'providers' => [
    ...
    \Middleware\Auth\Jwt\Providers\LaravelServiceProvider::class,
]

Run the following command to publish the package config file:

php artisan vendor:publish --provider="Middleware\Auth\Jwt\Providers\LaravelServiceProvider"

You should now have a config/jwt.php file that allows you to configure the basics of this package.

Usage with Lumen

Add the following snippet to the bootstrap/app.php file under the providers section as follows:

$app->register(\Middleware\Auth\Jwt\Providers\LumenServiceProvider::class);
...
$app->configure('jwt');

Create a config directory (if it's not exist), and create an jwt.php in it with the plugin configuration like this:

return [
    'secret' => env('JWT_SECRET'),
    'algo' => 'HS256',
    'expiration' => 10, // 10 minutes
    'decorateRequestWithTokenPayload' => false, // if it's true then after authentication the request will contain a tokenPayload attribute with the payload of the JWT token
];

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-11-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固