Demo - https://laravel-saml-sp-demo.herokuapp.com
Laravel 5.4 application showing implementation of SAML authentication as a Service Provider.
This demo uses the aacotroneo/laravel-saml2 package and SSOCircle as Identity Provider.
Clone Project
git clone https://github.com/taiyeoguns/laravel-saml-sp-demo.git laravelsamlspdemo
Install Composer dependencies
cd laravelsamlspdemo
composer install
Maintain database details in .env
file
cp .env.example .env
Migrate tables
php artisan migrate
Generate app key and start server
php artisan key:generate && php artisan serve
- Login to SSOCircle or create an account.
- Click on
Manage Metadata
and selectAdd new Service Provider
. - For
FQDN
, enter:http://localhost:8000
- Select all Assertion attributes,
FirstName
,LastName
,EmailAddress
- In the Laravel application, browse to:
http://localhost:8000/saml2/metadata
and copy the xml - Back in SSOCircle metadata, paste the copied xml in
Insert your metadata information
- Click
Submit
to save metadata.
- Browse to
http://localhost:8000
- Click on
Login
link. - You will be forwarded to the SSOCircle. After successful authentication at the IdP, it will redirect to the Laravel application and user will be logged in.