PHP Classes
elePHPant
Icontem

Lumen Starter Pack: Implement a OAuth 2 based REST API server

Recommend this page to a friend!
  Info   View files Example   View files View files (57)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-01-30 (15 hours ago) RSS 2.0 feedStarStarStarStarStar 89%Total: 74 This week: 9All time: 8,655 This week: 125Up
Version License PHP version Categories
lumen-starter-pack 1.0.1The PHP License5PHP 5, User Management, Libraries, We...
Collaborate with this project Author

lumen-starter-pack - github.com

Description

This package can implement a OAuth 2 based REST API server.

It implements a module on top of Lumen Laravel micro-framework to provide a REST API based on OAuth2 authorization.

The package also provides a users module with permission control that can create, update, delete and list users.

Recommendations

Suitable out of the box REST API
REST API to replace service without a backend

  Performance   Level  

Details

Lumen Starter Pack

This package can implement a OAuth 2 based REST API server.

It implements a module on top of Lumen Laravel micro-framework to provide a REST API based on OAuth2 authorization.

The package also provides a users module with permission control that can create, update, delete and list users.

Installation

How To

  • Insert project into empty folder / git clone https://github.com/erayakartuna/lumen-starter-pack.git
  • Create an empty database table
  • Copy the .env.example to .env and insert the Database config
  • Run the following commands ` composer install php artisan migrate php artisan db:seed ` Thats it!

Usage

Routes

-------------------------------------------------------------------------------------
POST      => /login   Required Params:email,password
POST      => /refresh-token
-------------------------------------------------------------------------------------
Required Params : access_token

GET       => /admin/users             AdminUserController@index
POST      => /admin/users             AdminUserController@store
GET       => /admin/users/{user_id}   AdminUserController@show
PATCH     => /admin/users/{user_id}   AdminUserController@update
DELETE    => /admin/users/{user_id}   AdminUserController@destroy

-------------------------------------------------------------------------------------
GET       => /users   Required params: access_token   |  UserController@index
-------------------------------------------------------------------------------------

*Look inside to Unit tests to understand more*

Users Table Schema

Schema::create('users', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('name');
			$table->string('email')->unique();
			$table->string('password', 60);
			$table->boolean('is_admin',0);
			$table->rememberToken();
			$table->timestamps();
		});

User Login Informations

user@user.com
user1234

Resources

LUMEN

LUMEN API OAUTH

  Files folder image Files  
File Role Description
Files folder imageapp (1 file, 9 directories)
Files folder imagebootstrap (1 file)
Files folder imageconfig (3 files)
Files folder imagedatabase (3 directories)
Files folder imagepublic (2 files)
Files folder imageresources (2 directories)
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 phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file server.php Appl. Application script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:74
This week:9
All time:8,655
This week:125Up
 User Ratings  
 
 All time
Utility:100%StarStarStarStarStarStar
Consistency:100%StarStarStarStarStarStar
Documentation:100%StarStarStarStarStarStar
Examples:100%StarStarStarStarStarStar
Tests:91%StarStarStarStarStar
Videos:-
Overall:89%StarStarStarStarStar
Rank:1