megaads / sso-client
用于Laravel的Sso客户端包
1.2.4
2024-07-25 01:25 UTC
Requires
- php: ^8.1
- laravel/breeze: ^1.23
- laravel/framework: ^10.10
- megaads/sso: 2.1.*
- dev-master
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.43
- 1.1.42
- 1.1.41
- 1.1.40
- 1.1.39
- 1.1.38
- 1.1.37
- 1.1.36
- 1.1.35
- 1.1.34
- 1.1.33
- 1.1.32
- 1.1.31
- 1.1.30
- 1.1.29
- 1.1.28
- 1.1.27
- 1.1.26
- 1.1.25
- 1.1.24
- 1.1.23
- 1.1.22
- 1.1.21
- 1.1.19
- 1.1.18
- 1.1.17
- 1.1.16
- 1.1.15
- 1.1.13
- 1.1.12.2
- v1.1.12.1
- 1.1.12
- v1.1.11
- v1.1.10
- v1.1.9
- v1.1.8
- v1.1.7
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-release-version-1.1
- dev-release-version-1.2
This package is auto-updated.
Last update: 2024-09-16 09:11:49 UTC
README
- 安装
composer require megaads/sso-client
- 在项目的 app.php 配置文件中注册注册应用服务提供者
Megaads\SsoClient\SsoClientServiceProvider::class
- 创建Laravel认证
php artisan make:auth php artisan migrate
- 发布包配置文件
php artisan vendor:publish --provider="Megaads\SsoClient\SsoClientServiceProvider" --tag=config --force
文件发布后,打开并编辑配置文件
- 在
Kernel.php
文件中注册自定义认证中间件'sso' => \Megaads\SsoClient\Middleware\CustomAuthenticate::class,
- 在
Kernel.php
中更改中间件如下:protected $middleware = [ \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, //Add bellow lines👇🏻 \App\Http\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class ];