承接 rroslaniec/cas 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rroslaniec/cas

最新稳定版本:v1.2.0

Composer 安装命令:

composer require rroslaniec/cas

包简介

Add CAS server SSO authentication to laravel 4.x

README 文档

README

CAS server SSO authentication in laravel 4.x

Installation

Require this package in your composer.json and run composer update (or run composer require xavrsl/cas:dev-master directly):

"xavrsl/cas": "dev-master"

After updating composer, add the ServiceProvider to the providers array in app/config/app.php

'Xavrsl\Cas\CasServiceProvider',

As well as the Facade :

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

You need to publish the conf so you will ffind it in app/config/packages/xavrsl/cas/

$ php artisan config:publish xavrsl/cas

Configuration

Configuration should be pretty straightforward for anyone who's ever used the PHPCas client. However, 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).

Usage

Authenticate against the CAS server

Cas::authenticate();

Exemple of Cas authentication in a route filter :

Route::group(array('https', 'before' => 'cas'), function()
{
  Route::controller('toolbar', 'ToolbarController');

  Route::controller('bibsearch', 'BibsearchController');
});

Route::controller('bibimages', 'BibimagesController');

Route::filter('cas', function()
{
  Cas::authenticate();
});

Then get the current user id this way :

Cas::getCurrentUser();

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 36
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固