Ohh ok..sorry.. there's an update..gonna close this one
I have the same issue and I'd like to know which update you were talking about @LeBronoMars
@kwk this library was updated at the end of last week. The API for Claims has changed. Seehttps://github.com/dgrijalva/jwt-go/blob/master/MIGRATION_GUIDE.md for details. Or you can continue to use 2.x.
@dgrijalva I'm having the same problem, I wonder how did everyone solved this problem? it really did devastated our auths, and I am seeing a little to no time for fixing these changes. the migration_guide has little information to no example of code changes rather than going to docs. I'd rather stay to 2.x than updating to 3.x
here is some of my code.
token := jwt.New(jwt.SigningMethodRS512)
token.Claims["exp"] = time.Now().Add(time.Hour * time.Duration(settings.Get().JWTExpirationDelta)).Unix()
token.Claims["iat"] = time.Now().Unix()
@Hokutosei you can stay with the 2.x line and things will keep working fine for you.
To update that sample code to 3.x, do the following:
token := jwt.New(jwt.SigningMethodRS512)
claims := make(jwt.MapClaims)
claims["exp"] = time.Now().Add(time.Hour * time.Duration(settings.Get().JWTExpirationDelta)).Unix()
claims["iat"] = time.Now().Unix()
token.Claims = claims
This is working fine in my localhost, but when i'm trying it in aws ec2..i cant build and i'm getting the ff. error

and here is my code
