cblink / aliyun-gateway-backend-auth
This package's canonical repository appears to be gone and the package has been frozen as a result.
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
Installation
composer require cblink/aliyun-gateway-backend-auth -vvv
Configuration
you need to copy config/aliyun-gateway.php
file to config folder。Here are some examples
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', ] ];
This Laravel auth driver. You can easily set your auth driver to aliyun-gateway-api
auth.php
<?php return [ // ... 'guards' => [ // 'custom' => [ 'driver' => 'aliyun-gateway-api' ] ] ];