PHPackages                             aaronosher/php-uls - 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. aaronosher/php-uls

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

aaronosher/php-uls
==================

Adds VATUSA ULS authentication support to your application

v1.0.0(8y ago)06GPL-3.0+PHPPHP &gt;=7.1.0

Since Dec 25Pushed 8y ago1 watchersCompare

[ Source](https://github.com/aaronosher/php-uls)[ Packagist](https://packagist.org/packages/aaronosher/php-uls)[ RSS](/packages/aaronosher-php-uls/feed)WikiDiscussions master Synced 2w ago

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

VATUSA ULS Handling for PHP &gt;=7.1.0
======================================

[](#vatusa-uls-handling-for-php-710)

![PHP from Packagist](https://camo.githubusercontent.com/2c462bf07261891ef0bce1c9133d222b34e0665224323a2b32c8ec143f471d88/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6161726f6e6f736865722f7068702d756c732e7376673f7374796c653d666c61742d737175617265)[![Latest Stable Version](https://camo.githubusercontent.com/0b4ca6b7c794c26e79d9c1e11fc3328213a5ef8ee09cc2b18fb308f0ff141e06/68747470733a2f2f706f7365722e707567782e6f72672f6161726f6e6f736865722f7068702d756c732f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/aaronosher/php-uls)[![Total Downloads](https://camo.githubusercontent.com/45c62c5cb1271aa408fdde3703915a825f6508b1c0abf8b2603403d0c267d69a/68747470733a2f2f706f7365722e707567782e6f72672f6161726f6e6f736865722f7068702d756c732f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/aaronosher/php-uls)[![GitHub license](https://camo.githubusercontent.com/6766781b3bb3d5bfc71676392159c21d0bfab8c87f91454dd86355fe5b81e400/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6161726f6e6f736865722f7068702d756c732e7376673f7374796c653d666c61742d737175617265)](https://github.com/aaronosher/php-uls/blob/master/LICENSE)[![GitHub issues](https://camo.githubusercontent.com/e0928ab88c003786405afdb1ae5815407a627a19887568594ed5cd7daa8ffa29/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6161726f6e6f736865722f7068702d756c732e7376673f7374796c653d666c61742d737175617265)](https://github.com/aaronosher/php-uls/issues)

About
-----

[](#about)

Provides a wrapper around the web-token libraries for use with VATUSA's Unified Login Scheme.

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

[](#installation)

1. Require the `vatusa/php-uls` package in your `composer.json` and update your dependencies: ```
    $ composer require vatusa/laravel-uls
    ```
2. Generate the configuration file

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

[](#configuration)

For php-uls to work you need to configure your jwk, uls version, and facility id. These are set through an options array in the constructor:

```
$options = [
    "version" => 2,
    "jwk" => $jwk,
    "facility" => "ZZZ"
];
$uls = new \Vatusa\Uls\Uls($options);
```

Usage
-----

[](#usage)

Using laravel-uls is fairly easy.

1. Get your JSON Web Key from your facility's Technical Configuration page.  (**NOTE**: You must hold a ATM, DATM or WM role for that facility to generate/see the generated JSON Web Key)
2. Store the JWK, unedited, in the config above (or, *recommended* quoted with single quotes in the .env file as ULS\_JWK='... JWK from VATUSA...')
3. To generate the redirect url, use:

    ```
    $uls->redirectUrl()
    ```

    To handle the developmental returns, specify a boolean argument of true

    ```
    $uls->redirectUrl(true)
    ```
4. To verify a token, assume $token is the full token received from VATUSA's ULS endpoint

    ```
    $uls = new Uls($options);
    if ($uls->verifyToken($token)) {
       // Token was true
    }
    ```

    The laravel-uls library conducts header verifications to ensure that the accepted algorithms are received. Additionally, it conducts the following claims checks, including:

    - Ensures the audience is you (IE, the token isn't meant for another facility)
    - The token is not expired
    - The Issued at time is logical (ie, not in the future)

    Because of this, a number of exceptions may be thrown:

    - InvalidArgumentException
    - Jose\\Component\\Checker\\InvalidClaimException
    - Jose\\Component\\Checker\\InvalidHeaderException
5. To get the information of the user associated with the token, use:

    ```
    $uls->getInfo();
    ```

    This will return an array of the decoded JSON from ULS. Details of the array can be found in the VATUSA Technical Manual M1022 at .

License
-------

[](#license)

Released under the GNU Public License 3.0, see [LICENSE](LICENSE).

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

3109d ago

### Community

Maintainers

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

---

Top Contributors

[![erinosher](https://avatars.githubusercontent.com/u/4386583?v=4)](https://github.com/erinosher "erinosher (17 commits)")

---

Tags

vatusauls

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/aaronosher-php-uls/health.svg)

```
[![Health](https://phpackages.com/badges/aaronosher-php-uls/health.svg)](https://phpackages.com/packages/aaronosher-php-uls)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[simplesamlphp/saml2

SAML2 PHP library from SimpleSAMLphp

30518.0M41](/packages/simplesamlphp-saml2)[web-auth/webauthn-lib

FIDO2/Webauthn Support For PHP

1237.8M121](/packages/web-auth-webauthn-lib)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

51390.8k3](/packages/web-auth-webauthn-framework)

PHPackages © 2026

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