Hello, World!

I'm Wahidin, I'm currently working at Pandai Education Sdn Bhd as a Software Engineer 🚀 Official Website.
How to reach me :

This project is just a sample of implementing JWT in Golang with Echo Framework. This is just Rest-API only, you guys can use this API to practice your frontend skills like How to fetch API in JavaScript. Here is the detail of the API :

Products Managements

No bearer token requirement here

Get All Products

Method : GET

Parameter : -

curl -X GET https://go-jwt.fly.dev/api/products

Get Products By ID

Method : GET

Parameter : id

curl -X GET https://go-jwt.fly.dev/api/products/{id}

Authentication

No bearer token requirement here

Bearer token : JWT-Token

Login

Method : POST

Form Data :
username=yourusername password=yourpassword

curl -d "username=yourusername&password=yourpassword" -H "Content-Type: application/x-www-form-urlencoded" -X POST https://go-jwt.fly.dev/api/login

Register

Method : POST

Form Data :
username=yourusername password=yourpassword

curl -d "username=yourusername&password=yourpassword" -H "Content-Type: application/x-www-form-urlencoded" -X POST https://go-jwt.fly.dev/api/register

Orders Managements

Bearer token requirement here

Bearer token : JWT-Token

Get All Orders

Method : GET

Bearer Token : yourjwttoken

Note : delete bracket at outside token in curl sample in the below of this line

curl -H "Authorization: Bearer {token}" -H "Accept: application/json" -X GET https://go-jwt.fly.dev/api/orders