PHPackages                             signifly/laravel-janitor - 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. signifly/laravel-janitor

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

signifly/laravel-janitor
========================

Easily add login proxy to your Laravel API.

v1.3.3(2y ago)5914.8k↓21.4%9[1 PRs](https://github.com/signifly/laravel-janitor/pulls)MITPHPPHP ^7.2|^7.3|^7.4|^8.0

Since Mar 7Pushed 1y ago3 watchersCompare

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

READMEChangelog (9)Dependencies (11)Versions (10)Used By (0)

This project is no longer actively maintained.
==============================================

[](#this-project-is-no-longer-actively-maintained)

Easily add login proxy to your Laravel API
==========================================

[](#easily-add-login-proxy-to-your-laravel-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a72651e91b463b223ddd191ed759968cb96368795152507c0b58ce007efc9380/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7369676e69666c792f6c61726176656c2d6a616e69746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/signifly/laravel-janitor)[![Tests](https://github.com/signifly/laravel-janitor/workflows/Tests/badge.svg)](https://github.com/signifly/laravel-janitor/workflows/Tests/badge.svg)[![StyleCI](https://camo.githubusercontent.com/f897a25437f90909fae1591220a4a0109244a1e4f665f19f0977107170557258/68747470733a2f2f7374796c6563692e696f2f7265706f732f3137333734313231342f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/173741214)[![Quality Score](https://camo.githubusercontent.com/52bc76ea9ce1cae2aa9a5e08d8d979d95ada5b01da17920ced6aceabc7654943/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7369676e69666c792f6c61726176656c2d6a616e69746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/signifly/laravel-janitor)[![Total Downloads](https://camo.githubusercontent.com/d0094728696a80480fd17e365c41fc81a5931a8a172354257b13e28ede05cfd2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7369676e69666c792f6c61726176656c2d6a616e69746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/signifly/laravel-janitor)

The `signifly/laravel-janitor` package allows you to easily add a login proxy to your Laravel API.

You can find two articles that walk you through getting started using:

- [Passport Proxy](https://medium.com/@codingcave/api-authentication-with-laravel-janitor-part-1-laravel-passport-proxy-d1d1e05d687e)
- [JWT Proxy](https://medium.com/@codingcave/api-authentication-with-laravel-janitor-part-2-laravel-jwt-proxy-d303afe8eba9)

Documentation
-------------

[](#documentation)

To get started you have to either install `laravel/passport` or `tymon/jwt-auth`. Please refer to their documentation for how to configure those packages.

*NOTE: For now the supported versions for `tymon/jwt-auth` is `1.0.0-rc.*`.*

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

[](#installation)

You can install the package via composer:

```
composer require signifly/laravel-janitor
```

The package will automatically register itself.

You can optionally publish the config file with:

```
php artisan vendor:publish --tag="janitor-config"
```

After pulling in the package and (optionally) publishing the config, then add the routes to your `routes/api.php` file:

```
Janitor::routes();
```

It will by default add routes for the following:

- login by username and password (/login)
- refresh current user access token (/login/refresh)
- log the user out (/logout)
- send password reset email (/password/email)
- reset password (/password/reset)

You can also define a specific set of routes by passing a Closure:

```
Janitor::routes(function ($router) {
    // Login and logout routes
    $router->forAuthentication();

    // Password reset routes
    $router->forPasswordReset();
});
```

Finally, add `JANITOR_DRIVER=driver-name` to your .env file.

The supported drivers are: `passport` and `jwt`.

*NOTE: It does not support a default driver and throws an `InvalidArgumentException` if omitted.*

### Resetting passwords

[](#resetting-passwords)

In order to use the reset password implementation in an API, you have to add a custom reset password notification to your user model.

```
// App\User.php

/**
 * Send the password reset notification.
 *
 * @param  string  $token
 * @return void
 */
public function sendPasswordResetNotification($token)
{
    $this->notify(new ResetPasswordNotification($token));
}
```

The notification should format a correct link to your client app's reset password url.

Testing
-------

[](#testing)

```
composer test
```

Security
--------

[](#security)

If you discover any security issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Morten Poul Jensen](https://github.com/pactode)
- [All contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 87.2% 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 ~201 days

Recently: every ~312 days

Total

9

Last Release

1019d ago

PHP version history (4 changes)v1.0.0PHP ^7.1

v1.1.0PHP ^7.2

v1.3.0PHP ^7.2|^7.3|^7.4

v1.3.2PHP ^7.2|^7.3|^7.4|^8.0

### Community

Maintainers

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

---

Top Contributors

[![pactode](https://avatars.githubusercontent.com/u/5956778?v=4)](https://github.com/pactode "pactode (68 commits)")[![connors511](https://avatars.githubusercontent.com/u/527889?v=4)](https://github.com/connors511 "connors511 (5 commits)")[![Razorsheep](https://avatars.githubusercontent.com/u/459217?v=4)](https://github.com/Razorsheep "Razorsheep (2 commits)")[![seriousjelly](https://avatars.githubusercontent.com/u/5570468?v=4)](https://github.com/seriousjelly "seriousjelly (2 commits)")[![emilhorlyck](https://avatars.githubusercontent.com/u/25416509?v=4)](https://github.com/emilhorlyck "emilhorlyck (1 commits)")

---

Tags

auth-proxyhacktoberfestjwt-authlaravelpassport

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/signifly-laravel-janitor/health.svg)

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

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)

PHPackages © 2026

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