dweik/laravel-guard-jwt-validator 问题修复 & 功能扩展

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

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

dweik/laravel-guard-jwt-validator

最新稳定版本:1.0.2

Composer 安装命令:

composer require dweik/laravel-guard-jwt-validator

包简介

Laravel guard for validate JWT token

README 文档

README

This package used for microservices to validate the JWT access token and create user if is not exists. It built on Laravel Guard model, so developer could use the auth config and helper to setup the packager programmer.

Install

Require this package with composer using the following command:

composer require dweik/laravel-guard-jwt-validator

Then you need publish the config files by execute the following command

php artisan vendor:publish --tag=laravel-guard-jwt-config

Then you have set up the JWT configuration values in config/jwt.php, and add the follow values in config/auth.php to add new guard to laravel project

    'guards' => [
        .
        .
        // add under guards value
        'jwt' => [
            'driver' => 'jwt',
            'provider' => 'guard-jwt',
        ],
    ]
    
    'providers' => [
        .
        .
        // add under providers value
        'guard-jwt' => [
             'driver' => 'guard-jwt',
             'model' => \App\Models\User::class
        ],
    ]

How to use

you can add guard to middleware or use it as default guard by changing the defaults value in config/auth.php

Changelog

V1.0.1

  • [bugfix] return an exception Token not valid if token not passed

V1.0.0

  • Validate the JWT token
  • Create user if is not exists by using the JWT payload values

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固