norotaro/wn-guardian-plugin 问题修复 & 功能扩展

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

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

norotaro/wn-guardian-plugin

Composer 安装命令:

composer require norotaro/wn-guardian-plugin

包简介

README 文档

README

Allows to easily restrict access to routes declared by plugins in routes.php.

Using the AuthorizationControl middleware provided with this plugin your routes will be accesibles only by the clients registered in the back-end.

Installation

Run the following command in a project's root directory:

composer require norotaro/wn-guardian-plugin
php artisan winter:up

Managing clients

Clients are managed on the Guardian menu found in the back-end. Each client provides minimal data fields - Name, Shortname, Active and Authorization Codes.

Each Authorization Code is represented by a Value and an Active field.

Client authorization

When a client make a request it needs to authenticate sending the following headers:

  • User-Agent: {{shortname}}
  • Authorization: {{activeCode}}

Where {{shortname}} is a short name of a client created in the back-end and {{activeCode}} is one of the code created for that client and that is active.

AuthorizationControl middleware

Access to routes are restricted by applying the AuthorizationControl middleware.

<?php
Route::middleware([\Norotaro\Guardian\Middlewares\AuthorizationControl::class])
    ->group(function () {
    // All routes here will require authorization
});

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-06-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固