dorianneto / api-notes

API notes with Lumen + JWT Auth

Home Page:http://hsa.dorianneto.com.br/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

api-notes

Travis Codacy Badge

It is a simple authenticated API to get notes assigned to an user.

Highlights

  • Simple API
  • Fully documented
  • Fully unit tested
  • Utilizes JWT to Authentication
  • Developed in Lumen v5.3

System Requirements

You need PHP >= 5.6.4 to use this API, but the latest stable version of PHP is recommended.

api-notes is verified and tested on PHP 5.6 and 7.0.

It's necessary have installed OpenSSL, PDO and Mbstring PHP Extension.

This api is authenticated by JWT, then, it's interesting that you read the JWT Auth wiki

Installation

Follow steps below to can install the api:

  1. $ composer install
  2. $ php artisan jwt:secret and put the code in .env file
  3. create .env file
  4. $ php artisan migrate
  5. $ php artisan db:seed

Enjoy it! ❤️

API

See the full documentation through this link.

Route Description
POST api/auth Generates an JWT token to enable an user to use the API
POST api/logout Invalidates the JWT token (require JWT token to authorize access)
GET api/notes Returns all notes from an user (require JWT token to authorize access)
GET api/notes/{id} Returns only one note from an user (require JWT token to authorize access)
POST api/notes Stores an note assigned to an user (require JWT token to authorize access)
PUT api/notes/{id} Updates an note assigned to an user (require JWT token to authorize access)
DELETE api/notes/{id} Deletes an note assigned to an user (require JWT token to authorize access)
POST api/sign_up Stores an new user
POST api/reset Sends email to reset password from an user
PUT api/reset/{token} Resets the user password

I'm suggest you to use Postman to test the API. See the collection v1 or v2 to you import in your Postman

License

api-notes is open-sourced software licensed under the MIT License (MIT). Please see LICENSE for more information.

About

API notes with Lumen + JWT Auth

http://hsa.dorianneto.com.br/

License:MIT License


Languages

Language:HTML 41.1%Language:JavaScript 39.1%Language:PHP 17.2%Language:CSS 2.5%Language:ApacheConf 0.2%