PHPackages                             simonmarcellinden/jwt - 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. simonmarcellinden/jwt

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

simonmarcellinden/jwt
=====================

Efficient JWT auth for Laravel/Lumen. Easy integration, secure, lightweight.

0234

Since Jan 16Compare

[ Source](https://github.com/SimonMarcelLinden/jwt)[ Packagist](https://packagist.org/packages/simonmarcellinden/jwt)[ RSS](/packages/simonmarcellinden-jwt/feed)WikiDiscussions Synced yesterday

READMEChangelog (4)DependenciesVersions (4)Used By (0)

JWT for Laravel/Lumen
=====================

[](#jwt-for-laravellumen)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e83fb7f6e4d64d333b132c25e56a8a03cd64d03bf0b514aab7635ce50c58dd00/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73696d6f6e6d617263656c6c696e64656e2f6a7774)](https://packagist.org/packages/simonmarcellinden/jwt)[![Total Downloads](https://camo.githubusercontent.com/1339dc444bf4e62a80f4139f1bbbc8157975a8ab2711e0711f918db2b3392cce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f53696d6f6e4d617263656c4c696e64656e2f6a7774)](https://packagist.org/packages/simonmarcellinden/jwt)

Enhance your Laravel and Lumen applications with this efficient JWT package, designed to streamline user authentication using JSON Web Tokens. Experience robust security with minimal complexity. A perfect choice for developers seeking a user-friendly, secure authentication solution.

Lumen Installation
------------------

[](#lumen-installation)

**Install via Composer**

```
$ composer require simonmarcellinden/jwt
```

---

**Install config File**

Use `php artisan jwt:config` for install the config file automatically.

Alternatively, copy the `config` file from `simonmarcellinden/jwt/config/config.php`. to the `config` folder of your Lumen application and rename it to `jwt.php`.

Register your config by adding the following in the bootstrap/app.php before middleware declaration.

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

---

**Bootstrap file changes**Add the following snippet to the `bootstrap/app.php` file under the providers section as follows:

```
$app->register(\SimonMarcelLinden\JWT\JWTServiceProvider::class);
```

---

**Generate secret key**

```
php artisan jwt:generate
```

This will update your `.env` file with something like JWT\_SECRET=AABBCCDDEE

---

**Activate or deactivate JWT routes**

```
php artisan jwt:routes {action}
```

This option allows you to globally enable or disable the routes provided by this package. By default, all routes are enabled.

---

**Update Seeder and run the migrations**

Update your main seeder

```
