added test for valid signing method

This commit is contained in:
Dave Grijalva 2015-11-02 15:24:32 -08:00
parent 774f319043
commit f2dd936aa8
1 changed files with 9 additions and 0 deletions

View File

@ -109,6 +109,15 @@ var jwtTestData = []struct {
jwt.ValidationErrorSignatureInvalid, jwt.ValidationErrorSignatureInvalid,
&jwt.Parser{ValidMethods: []string{"HS256"}}, &jwt.Parser{ValidMethods: []string{"HS256"}},
}, },
{
"valid signing method",
"",
defaultKeyFunc,
map[string]interface{}{"foo": "bar"},
true,
0,
&jwt.Parser{ValidMethods: []string{"RS256", "HS256"}},
},
{ {
"JSON Number", "JSON Number",
"", "",