laravel-admin 单点登录扩展

0.0.2 2019-03-22 13:39 UTC

This package is auto-updated.

Last update: 2024-11-11 21:49:44 UTC


README

install

composer require dm-laravel-admin-ext/sso

configure

publish config.php and migration

php artisan vendor:publish --provider="DM\SSO\SSOServiceProvider"

migrate:

php artisan migrate

this command will create oss tables to authorize.

you can create sso client through command

php artisan sso:create

add middleware to Http/kernel.php

protected $middlewareGroups = [
    'web' => [
        ...
        // sso 
        \DM\SSO\Http\Middleware\SSOLoginWithTicket::class,
    ],

usage

Get redirect url to client

$url = SSOController::loginTo($app_id);