Skip to content

Laravel demo application showing implementation of SAML authentication as a Service Provider.

Notifications You must be signed in to change notification settings

taiyeoguns/laravel-saml-sp-demo

Repository files navigation

Laravel SAML SP Demo

Demo - https://laravel-saml-sp-demo.herokuapp.com

Overview

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.

Installation

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

IdP Setup

  • Login to SSOCircle or create an account.
  • Click on Manage Metadata and select Add 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.

Test

  • 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.

Further Information

About

Laravel demo application showing implementation of SAML authentication as a Service Provider.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published