2017 © Pedro Peláez
 

library laravel-cas

UKSW CAS auth module for Laravel 5.1

image

csi-uksw/laravel-cas

UKSW CAS auth module for Laravel 5.1

  • Thursday, April 20, 2017
  • by csi-uksw
  • Repository
  • 2 Watchers
  • 3 Stars
  • 104 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 3 Versions
  • 5 % Grown

The README.md

Installation

Versions

Version 1.0 requires PHP 5.5.9+., (*1)

Laravel 5.1

To install this package pull it in through Composer., (*2)

composer require csi-uksw/laravel-cas

After Composer is done, you need to tell your application to use the CAS service provider., (*3)

Open config/app.php and add the service provider, (*4)

CSI_UKSW\Laravel\CAS\CASServiceProvider::class, (*5)

after, (*6)

Illuminate\Auth\AuthServiceProvider::class, (*7)

As well the Facade :, (*8)

'CAS' => CSI_UKSW\Laravel\CAS\Facades\CAS::class, (*9)

Configuration

Basic

To set up your CAS for connections you have to publish CAS config. This will provide all the configuration values for your connection., (*10)

php artisan vendor:publish --provider="CSI_UKSW\Laravel\CAS\CASServiceProvider"

After that please edit your app/cas.php. Using the .env file will allow you to have different environments without even touching the app/cas.php config file., (*11)

Middleware

Optionally you can use provided Auth Middleware., (*12)

After publishing please edit your app/Http/Kernel.php, (*13)

protected $routeMiddleware = [
    'auth.cas' => \CSI_UKSW\Laravel\CAS\Http\Middleware\CASAuthMiddleware::class
];

Usage

Authenticate:, (*14)

CAS::authenticate(), (*15)

Logout:, (*16)

CAS::logout(), (*17)

Get username:, (*18)

CAS::getUser(), (*19)

Get user attributes:, (*20)

CAS::getAttributes(), (*21)

Check if is authenticated:, (*22)

CAS::isAuthenticated(), (*23)

Route middleware:, (*24)

Route::group(['middleware' => 'auth.cas'], function () {
   get('cas', function(){
       echo 'authorized only';
   });
});

The Versions

20/04 2017

dev-master

9999999-dev

UKSW CAS auth module for Laravel 5.1

  Sources   Download

MIT

The Requires

 

cas csi uksw

20/04 2017

1.0.1

1.0.1.0

UKSW CAS auth module for Laravel 5.1

  Sources   Download

MIT

The Requires

 

cas csi uksw

19/11 2015

1.0.0

1.0.0.0

UKSW CAS auth module for Laravel 5.1

  Sources   Download

MIT

The Requires

 

cas csi uksw