I have a JWT token with the claims below
{
"authorized": true,
"email": "[email protected]",
"exp": 1589929351,
"node": "/auth/nodes0000000023",
"role": "admin"
}
The issuer of the JWT is the claims['node']
. In the above claims it is the /auth/nodes0000000023
.
How do I extract the issuer from the token without verifying the token.
I want to get the issuer name so that I can go find his publicKey
from a map
and then verify the token.
I have found the function func (*Parser) ParseUnverified
in the docs, but it is unclear on how to use it.
The library used is github.com/dgrijalva/jwt-go
tok,_,er=ParseUnverified(tokenString,&claimsStruct)
– Burak Serdar