PHPackages                             uicosss/shibboleth - 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. uicosss/shibboleth

ActiveLibrary

uicosss/shibboleth
==================

v1.0.6(1mo ago)059MITPHP

Since Dec 4Pushed 1mo agoCompare

[ Source](https://github.com/uicosss/shibboleth)[ Packagist](https://packagist.org/packages/uicosss/shibboleth)[ RSS](/packages/uicosss-shibboleth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (12)Used By (0)

University of Illinois
======================

[](#university-of-illinois)

Shibboleth
----------

[](#shibboleth)

PHP library for using Shibboleth for authentication and authorization.

Usage
-----

[](#usage)

To use the library, you need to:

### Composer

[](#composer)

```
composer require uicosss/shibboleth
require_once 'vendor/autoload.php';

```

### Deploy asset files

[](#deploy-asset-files)

This script will copy all the asset files to the full path provided. Can then modify these templates as desired. Along with copying the allowed.netids.example file where needed. File permissions may need to be adjusted to modify the deployed files.

```
php vendor/uicosss/shibboleth/scripts/deploy-assets.php /full/path/to/deploy/assets

```

### ENV Config

[](#env-config)

These environment (`$_ENV`) variables must be set within the application using this package.

```
APP_DOCUMENT_ROOT - e.g. APP_DOCUMENT_ROOT=/var/www/app/assets - Primary absolute directory path, without trailing slash, to where to find an allowed.netids file. This must be set in the application's ENV variables.
APP_STATE - e.g. APP_STATE=LOCAL - [optional] Current application state: local/dev/qa/prod. This is used to force Shib to auth in local environments. This must be set in the application's ENV variables.
WEBMASTER_EMAIL - An email address that will be displayed on auth issue pages.
WEBMASTER_URL - Website that users will be linked to on auth issue pages.
WEBMASTER_OFFICE_TITLE - Name of department or group that users will see on auth issue pages.

```

### Instantiate an object

[](#instantiate-an-object)

With or without `$authorizationContext` as a parameter. `$authorizationContext` is an optional parameter that defines a secondary absolute directory path, without trailing slash, to where to find an allowed.netids file. This can be useful when different authorization is needed from the global `APP_DOCUMENT_ROOT` authorization file, for a specific part of the application.

```
$Shibboleth = new Uicosss\Shibboleth\Shibboleth();
// or with $authorizationContext
$Shibboleth = new Uicosss\Shibboleth\Shibboleth('/var/www/app/alt/assets');

```

### Checking if authenticated

[](#checking-if-authenticated)

This is the first check when using this library. It confirms that there is a user logged in via Shibboleth.

```
if (!$Shibboleth->isAuthenticated()) {
    $Shibboleth->authenticationMarkup();
    die;
}

```

### Checking if authorized

[](#checking-if-authorized)

This is the second check when using this library. It checks any allowed.netids file it can find to verify permissions for the user.

```
if (!$Shibboleth->isAuthorized()) {
    $Shibboleth->forbiddenMarkup();
    die;
}

```

### Rendering auth issues shortcut

[](#rendering-auth-issues-shortcut)

A built-in method can automatically handle authentication and authorization issues and render HTML markup. Pass an absolute path to the directory containing the HTML files either copied from the package or custom-made. The filenames should still match what is expected `authentication.html` and `forbidden.html`.

```
$Shibboleth->renderAuthIssues('/var/www/app/assets');

```

Testing
-------

[](#testing)

You can run the unit tests by executing this command from the project root.

```
./vendor/bin/phpunit --colors --verbose

```

To only execute one of the tests add this to the command

```
./vendor/bin/phpunit --colors --verbose --filter testMethodName

```

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance97

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

Every ~20 days

Total

6

Last Release

53d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b0db56be644f70265d7f503db52651bcd6b67af1b5b9596ff47789929c74b658?d=identicon)[dpazuic](/maintainers/dpazuic)

![](https://www.gravatar.com/avatar/79e893fc35425da0d33ee9a5216937ebfe40870750e4e5b84982c3e3fcbd7893?d=identicon)[jjonesuic](/maintainers/jjonesuic)

![](https://www.gravatar.com/avatar/c074c8b798ec22846cc089336620b0959c4145b2d8fef07028610e5fc74102c0?d=identicon)[sa-osss-web-1](/maintainers/sa-osss-web-1)

![](https://www.gravatar.com/avatar/4dc30b9f49197aa31b451a52cba32de14e99eb53ba41d780d0d1acbc61523dd4?d=identicon)[ereyes28](/maintainers/ereyes28)

---

Top Contributors

[![jjonesuic](https://avatars.githubusercontent.com/u/127133062?v=4)](https://github.com/jjonesuic "jjonesuic (28 commits)")[![thedanpaz](https://avatars.githubusercontent.com/u/25891292?v=4)](https://github.com/thedanpaz "thedanpaz (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/uicosss-shibboleth/health.svg)

```
[![Health](https://phpackages.com/badges/uicosss-shibboleth/health.svg)](https://phpackages.com/packages/uicosss-shibboleth)
```

PHPackages © 2026

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