Author: ShairyPortfolio
-

User Authentication using REST API and JSON Web Tokens (JWT) – Step 4
How to check output using POSTMAN Step 1 : To test for the successful creation of a data, open POSTMAN Step 2 : Fill the below URL and use POST method while inserting data in DB http://localhost/rest-api-authentication/api/user/create_user.php Step 3 : Click the “Body” tab. and Click “raw”.Enter this JSON value: { “name”:”shairy”, “email”:”shairy@gmail.com”, “password”:”shairy” }…
-

User Authentication using REST API and JSON Web Tokens (JWT) – Step 3
Create the user object class Create the objects folder inside api folder and create a new file called user.php <?php // ‘user’ object class User { private $conn; private $table = “register”; // object properties public $id; public $name; public $email; public…
-

User Authentication using REST API and JSON Web Tokens (JWT) – Step 2
Create a database connection file Open config folder and create a new file called database.php and place the following code. <?php class Database { private $host = “localhost”; private $db = “restapi_db”; private $username = “root”; private $password = “”; public $conn; …
-

User Authentication using REST API and JSON Web Tokens (JWT) – Step 1
Create a database · Either create the database manually or from the phpmyadmin with any name like restapi_db Create a table · Either create the table manually or from the phpmyadmin with any name like register in restapi_db database Create a directory for configuration Create the folder in XAMP/P ->htdocs with any name like rest-api-authentication Open this…