- 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.
$ git clone https://github.com/Ertilu/authentication-api-php.git to xampp/htdocs/
$ cd xampp/htdocs/authentication-api-php
$ import the database using phpmyadmin
- Turn on Web Server and MySQL can using Third-party tool like xampp, etc.
- Create a database with the name db_inventory, and Import file db_api_login to phpmyadmin
- Open Postman desktop application or Chrome web app extension that has installed before
- Choose HTTP Method and enter request url.(ex. localhost/api)
- You can see all the end point here
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)
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)