2017 © Pedro Peláez
 

library opensso

image

maen/opensso

  • Monday, June 30, 2014
  • by maen-bn
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

OpenSSO Authenication for Laravel 4

This is a provider for adding a OpenSSO driver to your authentication system in Laravel 4.1, (*1)

Installation

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

Configuration

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'

Usage

Now your Auth driver is using OpenSSO you will be able to use the Laravel Auth class to authenication users., (*7)

Examples

//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();

The Versions

30/06 2014

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Benjamin Norcombe

laravel authentication laravel 4 laravel 4.1 opensso