Skip to content

Creating a simple web service by Echo and APIs to create and check the token, and Using JSON file to keep configuration

Notifications You must be signed in to change notification settings

vmashmooli/Sample-for-using-JWT-in-Echo-Go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample_for_using_JWT_in_Echo_Go

Simple web API example for using JWT in GoLang

Description

Creating a simple web service by Echo and APIs to create and check the token, and Using JSON file to keep configuation.

Items given in this example:

1 — How to create and loading configuration from JSON files

2 — How to run a simple web service by Echo

3 — How to Routing APIs in Echo

4 — How to create a token by user id and user name

5 — How to check received token validity

Getting Started

Step 1 — Creating a JSON file for configuration

Step 2 — Reading the config.json file

Step 3 — Creating a web service by Echo

Step 4 — Creating a token for the user

Step 5 — Checking the received token validity

Dependencies

  • ubuntu 16 or higher
  • Golang 1.11 or higher
  • Echo 4.7.0 or higher
  • import JWT and fmt, log, os, time, errors, encoding/json, net/http packages

Executing program

Extra links

Authors

vahid mashmooli

[email protected]

Version History

  • 0.001

About

Creating a simple web service by Echo and APIs to create and check the token, and Using JSON file to keep configuration

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages