From eeccfeb20d40c080b101b8ad13f7bf20afe539f8 Mon Sep 17 00:00:00 2001 From: wizzie Date: Thu, 1 Oct 2015 20:16:16 +0200 Subject: [PATCH] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6b61bd4..0245f17 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Parsing and verifying tokens is pretty straight forward. You pass in the token ```go // Create the token - token := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.MapClaim{ + token := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.MapClaims{ "foo": "bar", "exp": time.Now().Add(time.Hour * 72).Unix(), }) @@ -62,7 +62,7 @@ While we try to make it obvious when we make breaking changes, there isn't a gre Added the ability to supply a typed object for the claims section of the token. Unfortunately this requires a breaking change. A few new methods were added to support this, -and the old default of `map[string]interface{}` was changed to `jwt.MapClaim`. +and the old default of `map[string]interface{}` was changed to `jwt.MapClaims`. The old example for creating a token looked like this.. @@ -76,7 +76,7 @@ is now directly mapped to... ```go token := jwt.New(jwt.SigningMethodHS256) - claims := token.Claims.(jwt.MapClaim) + claims := token.Claims.(jwt.MapClaims) claims["foo"] = "bar" claims["exp"] = time.Now().Add(time.Hour * 72).Unix() ```