taiyeoguns / laravel-saml-sp-demo

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

Home Page:https://laravel-saml-sp-demo.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

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


Languages

Language:PHP 89.6%Language:Blade 8.6%Language:JavaScript 1.2%Language:Vue 0.6%