Download the PHP package nddcoder/laravel-sso without Composer
On this page you can find all versions of the php package nddcoder/laravel-sso. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nddcoder/laravel-sso
More information about nddcoder/laravel-sso
Files in nddcoder/laravel-sso
Package laravel-sso
Short Description Simple Laravel SSO integration (Based on zefy/laravel-sso)
License MIT
Homepage https://github.com/dangdungcntt/laravel-sso
Informations about the package laravel-sso
Simple PHP SSO integration for Laravel
This package based on Simple PHP SSO integration for Laravel package.
Requirements
- Laravel 5.5+
- PHP 7.1+
Documentation
Please read Simple PHP SSO integration for Laravel docs.
Installation
Server
Install this package using composer.
Copy config file to Laravel project config/
folder.
Create table where all brokers will be saved.
Edit your app/Http/Kernel.php
by create new middleware like this:
Now you should create brokers. You can create new broker using following Artisan CLI command:
Broker
Install this package using composer.
Copy config file to Laravel project config/
folder.
Change type
value in config/laravel-sso.php
file from server
to broker
.
Set 3 new options in your .env
file:
SSO_SERVER_URL
is your server's http url without trailing slash. SSO_BROKER_NAME
and SSO_BROKER_SECRET
must be data which exists in your server's brokers
table.
Edit your app/Http/Kernel.php
by adding \Nddcoder\LaravelSSO\Middleware\SSOAutoLogin::class
middleware to $routeMiddleware
array. It should look like this:
Then use like this:
Last but not least, you need to edit app/Http/Controllers/Auth/LoginController.php
. You should add two functions into LoginController
class which will authenticate your client through SSO server but not your Broker page.
That's all. For other Broker pages you should repeat everything from the beginning just changing your Broker name and secret in configuration file.
Example .env
options:
All versions of laravel-sso with dependencies
guzzlehttp/guzzle Version ^6.3
laravel/framework Version ^5.5
zefy/php-simple-sso Version ^1.0