PHPackages                             notwes/laravel-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. notwes/laravel-uls

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

notwes/laravel-uls
==================

Adds ULS authentication support to your application

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

Since Dec 10Pushed 8y agoCompare

[ Source](https://github.com/NotWes/laravel-uls)[ Packagist](https://packagist.org/packages/notwes/laravel-uls)[ RSS](/packages/notwes-laravel-uls/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (9)Versions (7)Used By (0)

VATUSA ULS Handling for Laravel 5.x
===================================

[](#vatusa-uls-handling-for-laravel-5x)

![PHP from Packagist](https://camo.githubusercontent.com/0b1dd887f71c471bbc12b17d29db37b577daef485278ae893f1d2ed2c9298b05/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7661747573612f6c61726176656c2d756c732e7376673f7374796c653d666c61742d737175617265)[![Latest Stable Version](https://camo.githubusercontent.com/1124f1904f2802b641a4872b4f1ce4916e70bae9b23127c46d4fdc25b99f3f2e/68747470733a2f2f706f7365722e707567782e6f72672f7661747573612f6c61726176656c2d756c732f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/vatusa/laravel-uls)[![Total Downloads](https://camo.githubusercontent.com/78eda619dfa6233a0ef3932ed540cf003324bd4fb84bec8630d12b29b5414d86/68747470733a2f2f706f7365722e707567782e6f72672f7661747573612f6c61726176656c2d756c732f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/vatusa/laravel-uls)[![GitHub license](https://camo.githubusercontent.com/7151818e385e84da4d016d1f2a84691c8338e7381992994f71c50eb08afd07cf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7661747573612f6c61726176656c2d756c732e7376673f7374796c653d666c61742d737175617265)](https://github.com/VATUSA/laravel-uls/blob/master/LICENSE)[![GitHub issues](https://camo.githubusercontent.com/5cd5fad484f6c4e9a2dbb0be3df3097a8027a882b4d08c8db96ff53cfe195b35/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f7661747573612f6c61726176656c2d756c732e7376673f7374796c653d666c61742d737175617265)](https://github.com/vatusa/laravel-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/laravel-uls` package in your `composer.json` and update your dependencies: ```
    $ composer require vatusa/laravel-uls
    ```
2. Generate the configuration file

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

[](#configuration)

The defaults are set in `config/uls.php`. Copy this file to your own config directory to modify the values. You can publish the config using this command:

```
$ php artisan vendor:publish --provider="VATUSA\Uls\UlsServiceProvider"
```

```
return [
    /*
    |--------------------------------------------------------------------------
    | Laravel ULS
    |--------------------------------------------------------------------------
    */

    /*
     * ULS Version to use
     *
     * By default we'll use 2
     */
    'version' => env('ULS_VERSION', 2),

    /*
     * Set the JSON Web Key retrieved from VATUSA's Facility Management
     */
    'jwk' => json_decode(env('ULS_JWK', []), true),

    /*
     * Facility 3 letter identifier
     */
    'facility' => env('ULS_FACILITY', 'ZZZ')
];
```

### Lumen

[](#lumen)

On Laravel Lumen, load your configuration file manually in `bootstrap/app.php`:

```
$app->configure('uls');
```

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();
    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

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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

Every ~14 days

Total

6

Last Release

3002d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cc275df7ac3eec20564e88c74f19625c76c2ae48270c283d80788e176eb37b5?d=identicon)[NotWes](/maintainers/NotWes)

---

Top Contributors

[![Tim-R](https://avatars.githubusercontent.com/u/1031999?v=4)](https://github.com/Tim-R "Tim-R (1 commits)")

---

Tags

laravelvatusauls

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/notwes-laravel-uls/health.svg)

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

###  Alternatives

[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)[pschocke/laravel-telegram-login-widget

Easily integrate Telegrams login widget into your Laravel application to send Telegram messages

1610.4k](/packages/pschocke-laravel-telegram-login-widget)

PHPackages © 2026

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