PHPackages                             saint\_seraphim/php\_cas\_server - 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. saint\_seraphim/php\_cas\_server

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

saint\_seraphim/php\_cas\_server
================================

PHP CAS Server

220PHP

Since Jul 20Pushed 3y agoCompare

[ Source](https://github.com/SaintSeraphim/php_cas_server)[ Packagist](https://packagist.org/packages/saint_seraphim/php_cas_server)[ RSS](/packages/saint-seraphim-php-cas-server/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP CAS Server
==============

[](#php-cas-server)

PHP CAS Server is a PHP implementation of CAS Server Protocol based on Laravel. Forked from [https://github.com/leo108/php\_cas\_server/](https://github.com/leo108/php_cas_server/)

Features
--------

[](#features)

- [CAS protocol](https://apereo.github.io/cas/4.2.x/protocol/CAS-Protocol-Specification.html) v1/v2/v3 (proxy is supported now!).
- User management, including adding/editing/searching users, enable/disable users, set/unset as administrator.
- Service management, including adding/editing/searching services, enable/disable services.
- I18n, support English and Chinese out of box, you can add language as your need.
- Customize login methods, support email + password by default, you can add custom login methods by plugins. You can also disable email login by settings.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.0

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

[](#installation)

### By composer (Recommend)

[](#by-composer-recommend)

1. `composer create-project saint_seraphim/php_cas_server php_cas_server dev-master`
2. `npm install` or `yarn`
3. `php artisan config:clear`
4. `npm install --global gulp-cli`
5. `gulp` or `sudo gulp`

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

[](#configuration)

All settings are in `.env` file.

### Basic

[](#basic)

FieldDefault ValueDescriptionAPP\_ENV`local`running environment，use `local` if in development, use `production` in productionAPP\_KEYrandom valueleft as isAPP\_DEBUG`true`enable debug mode, set to `false` to disableAPP\_LOG\_LEVEL`debug`log level, `debug`/`info`/`notice`/`warning`/`error`/`critical`/`alert`/`emergency`APP\_URL`http://localhost`your app's url, needs `http(s)://` at the beginningAPP\_LOCALE`en`language, support `en` and `cn` out of box### Database

[](#database)

You have to set all fields that begin with `DB_`, then run `php artisan migrate` to initial database schema.

### CAS Server

[](#cas-server)

FieldDefault ValueDescriptionCAS\_LOCK\_TIMEOUT`5000`CAS ticket locking time, in millisecondsCAS\_TICKET\_EXPIRE`300`CAS ticket expire time, in secondsCAS\_TICKET\_LEN`32`CAS ticket length, it's recommend at least 32CAS\_PROXY\_GRANTING\_TICKET\_EXPIRE`7200`CAS proxy-granting ticket expire time, in secondsCAS\_PROXY\_GRANTING\_TICKET\_LEN`64`CAS proxy-granting ticket length, it's recommend at least 64CAS\_PROXY\_GRANTING\_TICKET\_IOU\_LEN`64`CAS proxy-granting ticket IOU length, it's recommend at least 64CAS\_VERIFY\_SSL`true`Whether to check ssl when calling pgt urlCAS\_SERVER\_ALLOW\_RESET\_PWD`true`allow user reset password by emailCAS\_SERVER\_ALLOW\_REGISTER`true`allow user registerCAS\_SERVER\_DISABLE\_PASSWORD\_LOGIN`false`disable password loginCAS\_SERVER\_NAME`Central Authentication Service`The site name of your CAS Server### Setup behind reverse proxy

[](#setup-behind-reverse-proxy)

FieldDefault ValueDescriptionTRUSTED\_PROXIES`127.0.0.1`The IP of reserve proxy servers, separated by comma(`,`), you can specific IP or use s subnet such as `127.0.0.1` and `127.0.0.1/24`, configurations below take effect only when visiting IP in this listTRUSTED\_HEADER\_CLIENT\_IP`X_FORWARDED_FOR`User's real IP is stored in this request headerTRUSTED\_HEADER\_CLIENT\_HOST`X_FORWARDED_HOST`The host user visited is stored in this request headerTRUSTED\_HEADER\_CLIENT\_PROTO`X_FORWARDED_PROTO`The http protocol user used is stored in this request headerTRUSTED\_HEADER\_CLIENT\_PORT`X_FORWARDED_PORT`The port user visited is stored in this request headerInitial database and create administrator
-----------------------------------------

[](#initial-database-and-create-administrator)

Execute `php artisan migrate` at the root directory of this project to initial database.

Execute `php artisan make:admin --password=yourpassword` to create an administrator account.

License
-------

[](#license)

[MIT](http://opensource.org/licenses/MIT).

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/90ffacd21cd2c2fed3e9e585aa358b9448980ab8b3e2c2bda315a8d22f80d100?d=identicon)[SaintSeraphim](/maintainers/SaintSeraphim)

---

Top Contributors

[![leo108](https://avatars.githubusercontent.com/u/1551716?v=4)](https://github.com/leo108 "leo108 (40 commits)")[![SaintSeraphim](https://avatars.githubusercontent.com/u/19537701?v=4)](https://github.com/SaintSeraphim "SaintSeraphim (26 commits)")[![phy25](https://avatars.githubusercontent.com/u/331403?v=4)](https://github.com/phy25 "phy25 (2 commits)")[![satouriko](https://avatars.githubusercontent.com/u/18373361?v=4)](https://github.com/satouriko "satouriko (1 commits)")

### Embed Badge

![Health badge](/badges/saint-seraphim-php-cas-server/health.svg)

```
[![Health](https://phpackages.com/badges/saint-seraphim-php-cas-server/health.svg)](https://phpackages.com/packages/saint-seraphim-php-cas-server)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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