Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 475 Bytes

README.md

File metadata and controls

31 lines (26 loc) · 475 Bytes

jwt demo

just a demo project how to use jwt sign and parse its based out of the library golang-jwt v4

Demos

Setup

// this is enough one time in the hole project 
JWT, err := jwt.New()
if err != nil {
    // handle error
}

Sign Token

token, err := JWT.Sign(123456)
if err != nil {
	// handle error
}

Parse Token

claims, err := JWT.Parse(token)
if err != nil {
    // handle error	
}