Using JWT Authorization via golang web framework iris

This is an example of Using JWT Authorization via golang web framework iris.

Iris is a good but not nice Golang web framework, it has most features than all exists Golang web framework , but the main developer looks like having some ...

I found the documention of Iris is not friendly for developers, but Golang doc is enough for Gophers, and the examples almost worse.

Let's inspect an example of Iris:

You will get nothing but an error message when you run it, why?  may only someone spending much time to correct it will know why.

The following  is a "better" example of it, cause it works at least :


Generate a token by a  given username and password pair:

golang iris


test JWT token:

golang jwt

validating JWT token:

golang validating jwt token


error: 错误信息!