cblink / aliyun-gateway-backend-auth
该软件包的官方仓库似乎已丢失,因此该软件包已被冻结。
v0.2.0
2021-06-29 02:56 UTC
Requires
- php: ^7.2|^8.0
- illuminate/auth: ^5.0|^6.0|^7.0|^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- mockery/mockery: ^1.2
- orchestra/testbench: ^5.1
- phpunit/phpunit: ~8.0
This package is auto-updated.
Last update: 2023-01-29 03:09:41 UTC
README
安装
composer require cblink/aliyun-gateway-backend-auth -vvv
配置
您需要将config/aliyun-gateway.php
文件复制到config文件夹中。以下是一些示例
aliyun-gateway.php
<?php return [ // aliyun gateway signature key 'key' => '', // aliyun gateway signature secret 'secret' => '', // 定义需要从网关中国转换到user的信息,暂时只支持header方式 // 格式 [ auth()->{key} => {header key} ] 'users' => [ // 以下部分根据实际接口的系统参数定义,如没有在控制台中配置,以下信息可能为null 'id' => 'x-app-id', 'client_ip' => 'x-app-client-ip', 'domain' => 'x-app-domain', 'request_id' => 'x-app-request-id', 'ua' => 'x-app-client-ua', ] ];
这是一个Laravel认证驱动。您可以将认证驱动轻松设置为aliyun-gateway-api
auth.php
<?php return [ // ... 'guards' => [ // 'custom' => [ 'driver' => 'aliyun-gateway-api' ] ] ];