first commit
This commit is contained in:
12
pkg/secure/jwt_test.go
Normal file
12
pkg/secure/jwt_test.go
Normal file
@ -0,0 +1,12 @@
|
||||
package secure
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestVerifyToken(t *testing.T) {
|
||||
ts := "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6Inlhbmd0YW8iLCJuaWNrbmFtZSI6IuadqOeEmCIsImlzcyI6InpreHFncm91cC5jb20iLCJzdWIiOiJhZjBmNzM4OGM0MDk0MWQzYmU5NTdiYmExM2RkMzExYiIsImV4cCI6MTY4NDkxMjAwNCwibmJmIjoxNjg0ODI1NjA0LCJpYXQiOjE2ODQ4MjU2MDQsImp0aSI6IjkyNzIzMDM0NGE5MTQ0MTU4OTQyYWI4YmQ2MzkwMmQ2In0.58aFVo5FyTem4Fc2PZVBVEB-0DO2hhHuJ34ASGZQh1Cmd3peD5V5scWPdtx3wF3FAkXG_uE-o9smboGeuqscKQ"
|
||||
gotAccess, gotClaims, err := VerifyToken(ts, "")
|
||||
fmt.Printf("%v %v %v\n", gotAccess, gotClaims, err)
|
||||
}
|
||||
Reference in New Issue
Block a user