Starter kit for JWT auth and role based access
- Lumen 5.4.
- JWT Auth for Lumen Application. [1]
- Dingo to easily and quickly build your own API. [1]
- Lumen Generator to make development even easier and faster.
- CORS and Preflight Request support.
- Entrust Lumen for role based authentication.
- Lumen Vendor Publish to be able to use
php artisan vendor:publish
.
[1] Added via this package.
Clone this repo
Install package:
composer install
Generate JWT_SECRET
that will be added to config/jwt.php
using below command:
php artisan jwt:generate
Rename .env.example
to .env
and configure for authenticating via database, don't forget to firstly create the database
Set the API_PREFIX
parameter in .env
file (usually api
).
Set JWT_SECRET
in .env
to string that generated using php artisan jwt:generate
previously
Run php artisan migrate --seed
Download postman collection here please see routes/api.php
and play around with the postman collection for role based auth