An open API service indexing awesome lists of open source software.

https://github.com/fatonsopa/lumen-jwt

Lumen with JWT Authentication
https://github.com/fatonsopa/lumen-jwt

Last synced: about 1 year ago
JSON representation

Lumen with JWT Authentication

Awesome Lists containing this project

README

          

# Lumen with JWT Authentication
Basically this is a starter kit for you to integrate Lumen with [JWT Authentication](https://jwt.io/).
If you want to Lumen + Dingo + JWT for your current application, please check [here](https://github.com/durimjusaj/lumen-dingo-adapter).

## What's Added

- [Lumen 5.7](https://github.com/laravel/lumen/tree/v5.7.0).
- [JWT Auth](https://github.com/tymondesigns/jwt-auth) for Lumen Application. [1]
- [Dingo](https://github.com/dingo/api) to easily and quickly build your own API. [1]
- [Lumen Generator](https://github.com/flipboxstudio/lumen-generator) to make development even easier and faster.
- [FormRequest](https://github.com/urameshibr/lumen-form-request) adaptation for Lumen framework.
- [CORS and Preflight Request](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) support.

> [1] Added via [this package](https://packagist.org/packages/durimjusaj/lumen-dingo-adapter).

## Quick Start

- Clone this repo or download it's release archive and extract it somewhere
- You may delete `.git` folder if you get this code via `git clone`
- Run `composer install`
- Run `php artisan jwt:secret`
- Configure your `.env` file for authenticating via database
- Set the `API_PREFIX` parameter in your .env file (usually `api`).

## A Live PoC

- Run a PHP built in server from your root project:

```sh
php -S localhost:8000 -t public/
```

Or via artisan command:

```sh
php artisan serve
```
##
Inspired by: [krisanalfa/lumen-jwt](https://github.com/krisanalfa/lumen-jwt/)