PHPackages                             liyunde/laravel5-multi-cas - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. liyunde/laravel5-multi-cas

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

liyunde/laravel5-multi-cas
==========================

Multi CAS server SSO authentication for Laravel 5

v1.2.0(9y ago)133MITPHPPHP &gt;=5.5

Since Dec 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/liyunde/laravel5-multi-cas)[ Packagist](https://packagist.org/packages/liyunde/laravel5-multi-cas)[ RSS](/packages/liyunde-laravel5-multi-cas/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (2)Used By (0)

MultiCAS
========

[](#multicas)

\[!\[Latest Version on Packagist\]\[ico-version\]\]\[link-packagist\] [!\[Software License\]\[ico-license\]](LICENSE.md)\[!\[Build Status\]\[ico-travis\]\]\[link-travis\] \[!\[Total Downloads\]\[ico-downloads\]\]\[link-downloads\]

Multi CAS server SSO authentication in Laravel 5.x

this version base on xavrsl/cas v1.2.5 Compatible with the original version usage,thank author.

this version only use on multi diffent domain cas server in same project

Installation
------------

[](#installation)

Require this package in your composer.json and run composer update.

For Laravel 5:

```
composer require liyunde/laravel5-multi-cas

```

After updating composer, add the ServiceProvider to the providers array:

For Laravel 5:

config/app.php

```
    MultiCas\CasServiceProvider::class,
```

As well as the Facade :

```
	'Cas'       => MultiCas\Facades\Cas::class,
```

Then publish the package's config using one of those methods :

For Laravel 5 :

```
    $ php artisan vendor:publish

```

Configuration
=============

[](#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).

A new config variable (cas\_pretend\_user) available in the 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.

Usage
=====

[](#usage)

Authenticate against the CAS server. This should be called before trying to retrieve the CAS user id.

```
	Cas::authenticate();
	OR
	Cas::default()->authenticate();
```

Then get the current user id this way :

```
	Cas::getCurrentUser();
	OR
	Cas::user();

	Cas::default()->user();
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3488d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11486125?v=4)[liyunde](/maintainers/liyunde)[@liyunde](https://github.com/liyunde)

---

Top Contributors

[![XavRsl](https://avatars.githubusercontent.com/u/1185840?v=4)](https://github.com/XavRsl "XavRsl (25 commits)")[![liyunde](https://avatars.githubusercontent.com/u/11486125?v=4)](https://github.com/liyunde "liyunde (9 commits)")[![umt-dev-123](https://avatars.githubusercontent.com/u/136470301?v=4)](https://github.com/umt-dev-123 "umt-dev-123 (4 commits)")[![andremuller](https://avatars.githubusercontent.com/u/110772?v=4)](https://github.com/andremuller "andremuller (2 commits)")[![jmandrade](https://avatars.githubusercontent.com/u/1674999?v=4)](https://github.com/jmandrade "jmandrade (1 commits)")[![loren138](https://avatars.githubusercontent.com/u/1224505?v=4)](https://github.com/loren138 "loren138 (1 commits)")[![pies](https://avatars.githubusercontent.com/u/37940?v=4)](https://github.com/pies "pies (1 commits)")[![samyerkes](https://avatars.githubusercontent.com/u/1301322?v=4)](https://github.com/samyerkes "samyerkes (1 commits)")[![gpspake](https://avatars.githubusercontent.com/u/3385690?v=4)](https://github.com/gpspake "gpspake (1 commits)")[![fancyoung](https://avatars.githubusercontent.com/u/243587?v=4)](https://github.com/fancyoung "fancyoung (1 commits)")

---

Tags

laravelSSOcasphpCASMultiCAS

### Embed Badge

![Health badge](/badges/liyunde-laravel5-multi-cas/health.svg)

```
[![Health](https://phpackages.com/badges/liyunde-laravel5-multi-cas/health.svg)](https://phpackages.com/packages/liyunde-laravel5-multi-cas)
```

###  Alternatives

[xavrsl/cas

Add CAS server SSO authentication to Laravel 4 and 5

7637.1k](/packages/xavrsl-cas)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
