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

ActiveProject

leo108/php\_cas\_server
=======================

PHP CAS Server

2201.2k47[12 issues](https://github.com/leo108/php_cas_server/issues)PHP

Since Oct 27Pushed 5y ago15 watchersCompare

[ Source](https://github.com/leo108/php_cas_server)[ Packagist](https://packagist.org/packages/leo108/php_cas_server)[ RSS](/packages/leo108-php-cas-server/feed)WikiDiscussions master Synced 2mo 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.

[中文文档](https://github.com/leo108/php_cas_server/blob/master/readme_zh.md)

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;= 5.5.9

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

[](#installation)

### By composer (Recommend)

[](#by-composer-recommend)

1. `composer create-project leo108/php_cas_server php_cas_server dev-master`
2. `npm install` or `yarn`
3. `gulp`

### By release tarballs

[](#by-release-tarballs)

[Download Link](https://github.com/leo108/php_cas_server/releases)

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

[](#configuration)

If you install by tarball, you have to copy `.env.example` to `.env`, and then run `php artisan key:generate`

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

27

—

LowBetter than 49% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 93% 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/5349de95f58718519b6bff1c26fc8fea971b2aae6ac01e0a152ffa1c13f2caff?d=identicon)[leo108](/maintainers/leo108)

---

Top Contributors

[![leo108](https://avatars.githubusercontent.com/u/1551716?v=4)](https://github.com/leo108 "leo108 (40 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)")

---

Tags

cascas-protocolcas-serverphp-casphp-cas-server

### Embed Badge

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

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

PHPackages © 2026

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