PHPackages                             yassine-as/laravel-cas-auth - 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. yassine-as/laravel-cas-auth

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

yassine-as/laravel-cas-auth
===========================

CAS Authentication package for Laravel applications

v1.0.0(1y ago)12MITPHPPHP ^7.4|^8.2

Since May 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Asyassin10/laravel-cas-auth)[ Packagist](https://packagist.org/packages/yassine-as/laravel-cas-auth)[ RSS](/packages/yassine-as-laravel-cas-auth/feed)WikiDiscussions main Synced today

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

Laravel CAS Authentication
==========================

[](#laravel-cas-authentication)

A Laravel package for Central Authentication Service (CAS) integration with additional authorization capabilities.

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

[](#installation)

You can install the package via composer:

```
composer require yassine-as/laravel-cas-auth
```

Publish Configuration
---------------------

[](#publish-configuration)

After installing the package, publish the configuration file:

```
php artisan vendor:publish --provider="YassineAs\CasAuth\Providers\CasAuthServiceProvider" --tag="cas-config"
```

Configuration
-------------

[](#configuration)

Update your `.env` file with the necessary CAS configuration:

```
CAS_HOST=your-cas-server.example.com
CAS_DEBUG=false
CAS_VERBOSE_ERRORS=false
CAS_API_ENDPOINT=https://your-api-endpoint.com
CAS_API_KEY=your-api-key

```

Usage
-----

[](#usage)

### Middleware

[](#middleware)

Add the middleware to your routes or controllers:

```
// In routes/web.php
Route::middleware(['cas.auth'])->group(function () {
    // Protected routes that require CAS authentication
    Route::get('/dashboard', 'DashboardController::class ,"index"');
});
```

### Facade Usage

[](#facade-usage)

You can use the CasAuth facade in your controllers:

```
use YassineAs\CasAuth\Facades\CasAuth;

class ProfileController extends Controller
{
    public function index()
    {
        $user = CasAuth::getUser();
        $attributes = CasAuth::getAttributes();

        return view('profile', compact('user', 'attributes'));
    }

    public function logout()
    {
        CasAuth::logout();
        return redirect()->route('home');
    }
}
```

### Accessing User Details

[](#accessing-user-details)

In your controller methods, you can access the user details that were set by the middleware:

```
public function dashboard(Request $request)
{
    $userDetails = $request->attributes->get('userDetails');

    return view('dashboard', compact('userDetails'));
}
```

Testing
-------

[](#testing)

```
composer test
```

Security
--------

[](#security)

If you discover any security issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Yassine ait sidi brahim](https://github.com/Asyassin10)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance46

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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

409d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/79702243?v=4)[Yassine Ait sidi brahim](/maintainers/Asyassin10)[@Asyassin10](https://github.com/Asyassin10)

---

Top Contributors

[![Asyassin10](https://avatars.githubusercontent.com/u/79702243?v=4)](https://github.com/Asyassin10 "Asyassin10 (2 commits)")[![YassineBti](https://avatars.githubusercontent.com/u/153202148?v=4)](https://github.com/YassineBti "YassineBti (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yassine-as-laravel-cas-auth/health.svg)

```
[![Health](https://phpackages.com/badges/yassine-as-laravel-cas-auth/health.svg)](https://phpackages.com/packages/yassine-as-laravel-cas-auth)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[jeremy379/laravel-openid-connect

OpenID Connect support to the PHP League's OAuth2 Server. Compatible with Laravel Passport.

59437.0k9](/packages/jeremy379-laravel-openid-connect)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3417.0k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

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