Basically this is a starter kit for you to integrate Lumen with JWT Authentication
Run the following command to populate database tables and seeds.
`
bash
$ docker-compose exec php php artisan migrate --seed
`
localhost:8084
> Note:
- You can now use:
- `
POST /auth/login`
?> with email and password, obtain a JWT token
- `
GET /posts`
?> anyone gets a list of all the posts in the database
- `
POST /posts`
?> any authenticated user (using JWT, for instance) can create a post
- `
PUT /posts/:post_id `
?> the Owner of :post_id (authenticated using JWT, for instance) can modify the post
And remember, JWT requires you to provide the token as a header.
Classes of Nahidul Hasan | > | Lumen PHP JWT API Authentication | > | Download .zip .tar.gz | > | Support forum | > | Blog | > | Latest changes |
|
|
Groups | Applications | Files |
Groups |
PHP 5 | Classes using PHP 5 specific features | View top rated classes |
Web services | Web data clipping, SOAP or XML-RPC clients and servers | View top rated classes |
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Files |
File | Role | Description | ||
---|---|---|---|---|
app (2 files, 8 directories) | ||||
bootstrap (1 file) | ||||
config (2 files) | ||||
database (3 directories) | ||||
docker (1 file, 2 directories) | ||||
public (2 files) | ||||
routes (1 file) | ||||
tests (2 files) | ||||
.env.example | Data | Auxiliary data | ||
artisan | Example | Example script | ||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
docker-compose.yml | Data | Auxiliary data | ||
docker-compose.yml.example | Data | Auxiliary data | ||
phpunit.xml | Data | Auxiliary data | ||
readme.md | Doc. | Documentation |
Files | / | app |
Files | / | app | / | Events |
File | Role | Description |
---|---|---|
Event.php | Class | Class source |
ExampleEvent.php | Class | Class source |
Files | / | app | / | Http | / | Controllers |
File | Role | Description |
---|---|---|
AuthController.php | Class | Class source |
Controller.php | Class | Class source |
ExampleController.php | Class | Class source |
PostController.php | Class | Class source |
Files | / | app | / | Http | / | Middleware |
File | Role | Description |
---|---|---|
Authenticate.php | Class | Class source |
ExampleMiddleware.php | Class | Class source |
Files | / | app | / | Jobs |
File | Role | Description |
---|---|---|
ExampleJob.php | Class | Class source |
Job.php | Class | Class source |
Files | / | app | / | Providers |
File | Role | Description |
---|---|---|
AppServiceProvider.php | Class | Class source |
AuthServiceProvider.php | Class | Class source |
EventServiceProvider.php | Class | Class source |
Files | / | config |
Files | / | database | / | migrations |
File | Role | Description |
---|---|---|
2017_12_14_060409_create_users_table.php | Class | Class source |
2017_12_14_103515_create_posts_table.php | Class | Class source |
Files | / | database | / | seeds |
File | Role | Description |
---|---|---|
DatabaseSeeder.php | Class | Class source |
UsersTableSeeder.php | Class | Class source |
Files | / | docker | / | php |
File | Role | Description |
---|---|---|
custom.ini | Data | Auxiliary data |
Dockerfile | Data | Auxiliary data |
Files | / | tests |
File | Role | Description |
---|---|---|
ExampleTest.php | Class | Class source |
TestCase.php | Class | Class source |
Download all files: lumen-jwt-api.tar.gz lumen-jwt-api.zip NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
|