PHP Classes
elePHPant
Icontem

Lumen PHP JWT API Authentication: Create an API that supports JSON Web tokens

Recommend this page to a friend!

  Author Author  
Name: Nahidul Hasan <contact>
Classes: 4 packages by
Country: Bangladesh Bangladesh
Innovation award
Innovation award
Nominee: 2x


  Detailed description   Download Download .zip .tar.gz  
This package can be used to create an API that supports JSON Web tokens (JWT).

It provides an API that uses JWT for authentication of users that can access the API.

Separate configuration files allow configuring the several aspects of JWT.

Details

Lumen with JWT Authentication

Basically this is a starter kit for you to integrate Lumen with JWT Authentication

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
  • Configure your .env file for authenticating via database
  • Run docker-compose build
  • Run docker-compose up -d
  • Run the following command to populate database tables and seeds.

    `bash $ docker-compose exec php php artisan migrate --seed `

  • Visit 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 Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  

 

Name: Lumen PHP JWT API Authentication
Base name: lumen-jwt-api
Description: Create an API that supports JSON Web tokens
Version: -
PHP version: 5
License: The PHP License
 
  Groups   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Web services Web data clipping, SOAP or XML-RPC clients and servers View top rated classes


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Files folder imageapp (2 files, 8 directories)
Files folder imagebootstrap (1 file)
Files folder imageconfig (2 files)
Files folder imagedatabase (3 directories)
Files folder imagedocker (1 file, 2 directories)
Files folder imagepublic (2 files)
Files folder imageroutes (1 file)
Files folder imagetests (2 files)
Accessible without login Plain text file .env.example Data Auxiliary data
Accessible without login Plain text file artisan Example Example script
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file docker-compose.yml Data Auxiliary data
Accessible without login Plain text file docker-compose.yml.example Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file readme.md Doc. Documentation

Download 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.