dev-master
9999999-dev
MIT
The Requires
- php >=5.3.3
- illuminate/support 4.1.*
by Benjamin Norcombe
laravel authentication laravel 4 laravel 4.1 opensso
Wallogit.com
2017 © Pedro Peláez
This is a provider for adding a OpenSSO driver to your authentication system in Laravel 4.1, (*1)
To install this package through composer, edit your project's composer.json file to require maen/opensso., (*2)
"require": {
"laravel/framework": "4.1.*",
"maen/opensso": "dev-master"
},
"minimum-stability" : "dev"
Next, update Composer from the terminal:, (*3)
composer update
You will need to add a opensso configuartion file to app/config/ called opensso.php and set out in the following way with the correct information for your OpenSSO installation, (*4)
return array(
"serverAddress" => "https://sso.mysite.com/",
"uri" => "myuri",
"cookiepath" => "/",
"cookiedomain" => ".mysite.com",
"cookiename" => "mycookiename",
);
Also make sure in auth/config/auth.php the driver is set to opensso., (*5)
Finally add the OpenSSO servicer provider into auth/config/app.php as follows, (*6)
'Maen\Opensso\OpenssoServiceProvider'
Now your Auth driver is using OpenSSO you will be able to use the Laravel Auth class to authenication users., (*7)
//Authenicating using the OpenSSO TokenID from a cookie
Auth::attempt();
//Authenicating using user input
$input = Input::only('username', 'password');
Auth::attempt($input);
//Retriving the OpenSSO attributes of a logged in user
$user = Auth::user();
MIT
laravel authentication laravel 4 laravel 4.1 opensso