deegitalbe / laravel-trustup-io-authentification
将您的Laravel项目连接到我们的集中式认证服务
v3.0
2024-04-29 20:22 UTC
Requires
- php: ^8.2
- henrotaym/laravel-flare-exception-handler: ^3.0
- illuminate/contracts: ^10.0||^11.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^2.34
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- spatie/laravel-ray: ^1.35
- dev-main
- v3.0
- v2.1.0
- v2.0.2
- v2.0.1
- v2.0
- v1.3.0
- v1.2.0
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.0
- 0.0.19
- 0.0.18
- v0.0.18-alpha.3
- v0.0.18-alpha.2
- v0.0.18-alpha.1
- v0.0.18-alpha.0
- 0.0.17
- 0.0.16
- 0.0.15
- 0.0.14
- 0.0.13
- 0.0.12
- 0.0.11
- 0.0.10
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-laravel-11
- dev-laravel-10
- dev-pierrewasilewski/tdd-388-modifier-le-package-dauthentification-pour-que-lid-de
- dev-feature/rename_auth_url_varialbe
- dev-docker-integration-compatibility
- dev-feature/laravel-10-compatibility
- dev-hotfix/error-when-cookie-is-invalid
- dev-feature/user-extending-laravel-model
This package is auto-updated.
Last update: 2024-08-30 17:41:30 UTC
README
将您的Laravel项目连接到我们的集中式认证服务
安装
需要包
composer require deegitalbe/laravel-trustup-io-authentification
发布配置
php artisan vendor:publish --tag="trustup-io-authentification-config"
这将发布config文件夹中的trustup-io-authentification.php
定义角色
您应该在config文件trustup-io-authentification.php
中定义具有访问权限的角色。
'roles' => [ 'Super Admin', 'Employee', 'Translator' ],
定义守卫
在config文件auth.php
中重新定义您的守卫
'guards' => [ 'web' => [ 'driver' => 'session', 'provider' => 'users', 'driver' => 'trustup.io', ], 'api' =>[ 'driver' => 'trustup.io' ] ],
激活Docker
如果您的应用程序使用docker-integration,请定义此环境变量
TRUSTUP_IO_AUTH_DOCKER_ACTIVATED=true
添加中间件以保护您的受限制路由
use Illuminate\Support\Facades\Route; use Deegitalbe\LaravelTrustupIoAuthentification\Http\Middleware\TrustUpIoAuthMiddleware; Route::middleware(TrustUpIoAuthMiddleware::class)->group(function() { // Your restricted routes ... }); Route::middleware(TrustUpIoAuthMiddleware::class.':Super Admin|Translator')->group(function() { // Your restricted routes only accessible by super admins or translators ... });
Docker兼容性
更新包到最新版本
composer require deegitalbe/laravel-trustup-io-authentification
强制配置发布并设置正确的值(模型、角色、守卫等)
php artisan vendor:publish --tag="trustup-io-authentification-config" --force
定义环境变量
TRUSTUP_IO_AUTH_DOCKER_ACTIVATED=true
测试
composer test
变更日志
请参阅变更日志以获取有关最近更改的更多信息。
贡献
请参阅贡献指南以获取详细信息。
安全漏洞
请审查我们的安全策略以了解如何报告安全漏洞。
鸣谢
许可证
MIT许可证(MIT)。请参阅许可证文件以获取更多信息。