mirror of https://github.com/golang-jwt/jwt.git
Updated token creation example to use the proper method.
Example broke with error `undefined: SigningMethodHS256`. Edited to use jwt.SigningMethodHS256
This commit is contained in:
parent
a3e2f13bb7
commit
c5c16083c7
|
@ -34,7 +34,7 @@ Parsing and verifying tokens is pretty straight forward. You pass in the token
|
|||
|
||||
```go
|
||||
// Create the token
|
||||
token := jwt.New(SigningMethodHS256)
|
||||
token := jwt.New(jwt.SigningMethodHS256)
|
||||
// Set some claims
|
||||
token.Claims["foo"] = "bar"
|
||||
token.Claims["exp"] = time.Now().Add(time.Hour * 72).Unix()
|
||||
|
|
Loading…
Reference in New Issue