Coder Social home page Coder Social logo

authentication-api-php's Introduction

Authentication API PHP

restfulapi

database


Table of contents

Prerequiste

  • Postman - Download and Install Postman - Implementation with postman latest version.
  • Code Editor - Download and Install VS Code - Code editor that i use to create this project.
  • XAMPP - Download and Install XAMPP - XAMPP is a free and open-source cross-platform web server solution stack package developed by Apache Friends, consisting mainly of the Apache HTTP Server, MariaDB database, and interpreters for scripts written in the PHP and Perl programming languages. So, i don't need to install mysql anymore.

Installation

Clone

$ git clone https://github.com/Ertilu/authentication-api-php.git to xampp/htdocs/
$ cd xampp/htdocs/authentication-api-php
$ import the database using phpmyadmin

How to run the app ?

  1. Turn on Web Server and MySQL can using Third-party tool like xampp, etc.
  2. Create a database with the name db_inventory, and Import file db_api_login to phpmyadmin
  3. Open Postman desktop application or Chrome web app extension that has installed before
  4. Choose HTTP Method and enter request url.(ex. localhost/api)
  5. You can see all the end point here

Documentation

AUTHENTICATION Routes

POST Request

 1. "/api/create_user.php" => Create user and return token. 
    a. Required Body: 
       1) firstname: string
       2) lastname: string
       3) email: string
       4) password: string
       5) * date_created and date_updated: (auto created)

 2. "/api/login.php" => Log In user and return token. 
    a. Required Body:
       1) email: string
       2) password: string
       
 3. "/api/update_user.php" => Create user and return token. 
    a. Required Body: 
       1) firstname: string
       2) lastname: string
       3) email: string
       4) password: string
       6) jwt: string (jwt token generated after you login to the system)

LEVELLING SYSTEM Routes

POST Request

 1. "/api/add_xp" => Add xp to to user to level up user when you call this API.
    b. Required Body: 
       1) jwt: string (jwt token generated after you login to the system)

License


ISC

authentication-api-php's People

Contributors

ertilu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.