Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 159 | All time: 8,987 This week: 455 |
Version | License | PHP version | Categories | |||
lumen-jwt-api 1.0.0 | The PHP License | 5 | PHP 5, Web services |
Description | Author | |
This package can be used to create an API that supports JSON Web tokens (JWT). Innovation Award
|
Basically this is a starter kit for you to integrate Lumen with JWT Authentication
Run the following command to populate database tables and seeds.
$ docker-compose exec php php artisan migrate --seed
> 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.
Files (44) |
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 (44) | / | app |
Files (44) | / | app | / | Events |
File | Role | Description |
---|---|---|
Event.php | Class | Class source |
ExampleEvent.php | Class | Class source |
Files (44) | / | 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 (44) | / | app | / | Http | / | Middleware |
File | Role | Description |
---|---|---|
Authenticate.php | Class | Class source |
ExampleMiddleware.php | Class | Class source |
Files (44) | / | app | / | Jobs |
File | Role | Description |
---|---|---|
ExampleJob.php | Class | Class source |
Job.php | Class | Class source |
Files (44) | / | app | / | Providers |
File | Role | Description |
---|---|---|
AppServiceProvider.php | Class | Class source |
AuthServiceProvider.php | Class | Class source |
EventServiceProvider.php | Class | Class source |
Files (44) | / | config |
Files (44) | / | 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 (44) | / | database | / | seeds |
File | Role | Description |
---|---|---|
DatabaseSeeder.php | Class | Class source |
UsersTableSeeder.php | Class | Class source |
Files (44) | / | docker |
File | Role | Description | ||
---|---|---|---|---|
nginx (1 file) | ||||
php (2 files) | ||||
Dockerfile | Data | Auxiliary data |
Files (44) | / | docker | / | php |
File | Role | Description |
---|---|---|
custom.ini | Data | Auxiliary data |
Dockerfile | Data | Auxiliary data |
Files (44) | / | public |
Files (44) | / | tests |
File | Role | Description |
---|---|---|
ExampleTest.php | Class | Class source |
TestCase.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.