Download the PHP package ziffdavis/laravel-onelogin without Composer
On this page you can find all versions of the php package ziffdavis/laravel-onelogin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ziffdavis/laravel-onelogin
More information about ziffdavis/laravel-onelogin
Files in ziffdavis/laravel-onelogin
Package laravel-onelogin
Short Description Simplified integration of OneLogin for Laravel applications.
License MIT
Rated 2.00 based on 1 reviews
Informations about the package laravel-onelogin
THIS PACKAGE HAS MOVED
This package has moved to https://github.com/ziffmedia/laravel-onelogin
Furthermore, the new package has reached 1.0, production worthy status and should be used in place of any application where ziffdavis/laravel-onelogin was once used.
Laravel onelogin
A Laravel package for allowing onelogin to provide authentication and users to your application. This library wraps onelogin's onelogin/php-saml library.
Features:
- simplified configuration process
- top level (configurable)
login
andlogout
routes - support for autologin
- ability to map any User attributes via a login event
- loose SAML workflow for localhost/local environments, strict when in production
Installation
composer require ziffdavis/laravel-onelogin
Next, publish the configuration file:
artisan vendor:publish --provider='ZiffDavis\Laravel\Onelogin\OneloginServiceProvider'
Note for Laravel 5.7+
If your application uses Laravel 5.7 or greater, please make sure this package is updated to v0.0.7 or greater.
Configuration & Setup
Go into your onelogin administration screen, create an application with the "SAML Test Connector (IdP w/attr)" template. The onelogin tutorial is a great reference at https://developers.onelogin.com/saml/php
Once you have an app in onelogin minimally setup, utilize the App > SSO tab to get the necessary values to put inside the configuration file. See ./config/onelogin.php for details on which fields are necessary.
The User Setup
(The following setup assumes your users will be populated by onelogin the first time they successfully try to log into your application.)
Out the box, this package is designed to work with the typical user schema provided with laravel with minimal changes. Typical changes to make look like this:
- remove the
2014_10_12_100000_create_password_resets_table.php
migration file - remove the
$table->timestamp('email_verified_at')->nullable();
and$table->string('password');
columns from the2014_10_12_000000_create_users_table.php
migration
(Optional) Laravel Nova...
Laravel Nova's default installation adds authentication routes to your application, it is wise to remove them
inside your application's NovaServiceProvider
:
User Attributes and New User Workflow
By default, the following actions happen on successful login (From the OneloginController):
To customize this experience, create an Event inside your applications EventServiceProvider
's boot() method: