2017 © Pedro Peláez
 

library cas

Add CAS server SSO authentication to Laravel 4 and 5

image

xavrsl/cas

Add CAS server SSO authentication to Laravel 4 and 5

  • Tuesday, January 31, 2017
  • by XavRsl
  • Repository
  • 8 Watchers
  • 71 Stars
  • 17,769 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 34 Forks
  • 11 Open issues
  • 15 Versions
  • 4 % Grown

The README.md

CAS

CAS server SSO authentication in Laravel 4.x & 5.x, (*1)

Installation

Require this package in your composer.json and run composer update., (*2)

For Laravel 4 use v1.1.* :, (*3)

"xavrsl/cas": "1.1.*"

For Laravel 5 use v1.2.* :, (*4)

"xavrsl/cas": "1.2.*"

After updating composer, add the ServiceProvider to the providers array:, (*5)

For Laravel 4:, (*6)

app/config/app.php, (*7)

    'Xavrsl\Cas\CasServiceProvider',

As well as the Facade :, (*8)

    'Cas' => 'Xavrsl\Cas\Facades\Cas',

For Laravel 5:, (*9)

config/app.php, (*10)

    Xavrsl\Cas\CasServiceProvider::class,

As well as the Facade :, (*11)

    'Cas'       => Xavrsl\Cas\Facades\Cas::class,

Then publish the package's config using one of those methods :, (*12)

For Laravel 4 :, (*13)

    $ php artisan config:publish xavrsl/cas

For Laravel 5 :, (*14)

    $ php artisan vendor:publish

Configuration

Configuration should be pretty straightforward for anyone who's ever used the phpCAS client. Using the .env file will allow you to have different environments without even touching the cas.php config file. I've added the possibility to easily turn your application into a CAS Proxy, a CAS Service or both. You only need to set the cas_proxy setting to true (if you need to proxy services) and set the cas_service to whatever proxy you want to allow (this is all explained in the config file)., (*15)

A new config variable (cas_pretend_user) available in the 1.2 release allows you to pretend to be a selected CAS user. The idea came with the usage of laravel homestead. My application was running on a private network, on a fake domain. The CAS server was not able to redirect to that application. So activating the CAS plugin on that application was not possible, but I needed a user id to query my LDAP and allow/disallow the user in my application. You only need to give it a user id and the application will act just as if you ware logged in with that CAS user., (*16)

Usage

Authenticate against the CAS server. This should be called before trying to retrieve the CAS user id., (*17)

    Cas::authenticate();

Then get the current user id this way :, (*18)

    Cas::getCurrentUser();

OR, (*19)

  Cas::user();

The Versions

31/01 2017

dev-master

9999999-dev

Add CAS server SSO authentication to Laravel 4 and 5

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas

31/01 2017

v1.2.6

1.2.6.0

Add CAS server SSO authentication to Laravel 4 and 5

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas

23/09 2016

v1.2.5

1.2.5.0

Add CAS server SSO authentication to Laravel 4 and 5

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas

26/05 2016

v1.2.4

1.2.4.0

Add CAS server SSO authentication to Laravel 4 and 5

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas

24/05 2016

v1.2.3

1.2.3.0

Add CAS server SSO authentication to Laravel 4 and 5

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas

24/05 2016

v1.2.2

1.2.2.0

Add CAS server SSO authentication to Laravel 4 and 5

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas

04/05 2015

1.2.1

1.2.1.0

Add CAS server SSO authentication to Laravel 4 and 5

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas

04/05 2015

dev-develop

dev-develop

Add CAS server SSO authentication to Laravel 4 and 5

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas

17/02 2015

v1.2.0

1.2.0.0

Add CAS server SSO authentication to Laravel 4 and 5

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas

11/02 2015

v1.1.3

1.1.3.0

Add CAS server SSO authentication to laravel 4.x

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas

14/08 2014

v1.1.2

1.1.2.0

Add CAS server SSO authentication to laravel 4.x

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas

01/07 2014

v1.1.1

1.1.1.0

Add CAS server SSO authentication to laravel 4.x

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas

01/07 2014

v1.1

1.1.0.0

Add CAS server SSO authentication to laravel 4.x

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas

25/06 2014

dev-change/ioc

dev-change/ioc

Add CAS server SSO authentication to laravel 4.x

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas

12/06 2014

v1.0

1.0.0.0

Add CAS server SSO authentication to laravel 4.x

  Sources   Download

MIT

The Requires

 

by Xavier Roussel

laravel sso cas phpcas