forked from mirror/jwt
fix for weird map pointer crap
This commit is contained in:
parent
0145da90d4
commit
9d0dcba491
|
@ -54,8 +54,8 @@ func ExampleParse_hmac() {
|
|||
return hmacSampleSecret, nil
|
||||
})
|
||||
|
||||
if claims, ok := token.Claims.(*jwt.MapClaims); ok && token.Valid {
|
||||
fmt.Println((*claims)["foo"], (*claims)["nbf"])
|
||||
if claims, ok := token.Claims.(jwt.MapClaims); ok && token.Valid {
|
||||
fmt.Println(claims["foo"], claims["nbf"])
|
||||
} else {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue