From 211399e41a5c1c39eaa9640f81d8a5ab2e35aa3e Mon Sep 17 00:00:00 2001 From: Mustafa Altun Date: Fri, 10 Apr 2015 15:31:30 +0300 Subject: [PATCH] Fix variable name in parse and verify example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f8321b0..b68b8af 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,8 @@ Parsing and verifying tokens is pretty straight forward. You pass in the token ```go token, err := jwt.Parse(myToken, func(token *jwt.Token) (interface{}, error) { // Don't forget to validate the alg is what you expect: - if _, ok := t.Method.(*jwt.SigningMethodRSA); !ok { - return nil, fmt.Errorf("Unexpected signing method: %v", t.Header["alg"]) + if _, ok := token.Method.(*jwt.SigningMethodRSA); !ok { + return nil, fmt.Errorf("Unexpected signing method: %v", token.Header["alg"]) } return myLookupKey(token.Header["kid"]) })