Skip to content

CitizenMedia-TW/jwt-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jwt-service


Creating new JWT token

POST /generate (Generate a new JWT token given the info)
Body (application/json or application/x-www-form-urlencoded)
key required data type description
id true string N/A
mail true string N/A
name true string N/A
Responses
http code content-type response
200 application/json {"message": "Success", "token": "Bearer your_token"}
400, 500 application/json {"message": "Failed", "error":"Error messages"}

Verifying existing JWT token

GET /verify (Verify a existing JWT token)
Headers
key value description
Authorization The JWT token Starts with Bearer<space>
Responses
type jwtContent = {
  id: string
  mail: string
  name: string
}
http code content-type response
200 application/json {"message": "Success", "jwtContent": jwtContent}
400 application/json {"message": "Failed", "error":"Error messages"}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages