Skip to content

Commit

Permalink
appease linter
Browse files Browse the repository at this point in the history
  • Loading branch information
lestrrat committed Oct 30, 2023
1 parent ed6b084 commit cf0769d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jwt/jwt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1757,12 +1757,13 @@ func TestGH1007(t *testing.T) {
require.NoError(t, err, `jwt.NewBuilder should succeed`)

signed, err := jwt.Sign(tok, jwt.WithKey(jwa.RS256, key))
require.NoError(t, err, `jwt.Sign should succeed`)

// This was the intended usage (no WithKey). This worked from the beginning
_, err = jwt.ParseInsecure(signed)
require.NoError(t, err, `jwt.ParseInsecure should succeed`)

// This is the problematic behavior reported in #1007.
// This is the problematic behavior reporded in #1007.
// The fact that we're specifying a wrong key caused Parse() to check for
// verification and yet fail :/
wrongPubKey, err := jwxtest.GenerateRsaPublicJwk()
Expand Down

0 comments on commit cf0769d

Please sign in to comment.