Skip to content

Commit

Permalink
small cleanups (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristaloleg authored Apr 14, 2021
1 parent b938517 commit f65c7c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
8 changes: 5 additions & 3 deletions algo_hs.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ func newHS(alg Algorithm, key []byte) (hmacAlgo, error) {
alg: alg,
hash: hash,
key: key,
hashPool: &sync.Pool{New: func() interface{} {
return hmac.New(hash.New, key)
}},
hashPool: &sync.Pool{
New: func() interface{} {
return hmac.New(hash.New, key)
},
},
}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion algo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestSignerAlg(t *testing.T) {

f(mustSigner(NewSignerES(ES256, ecdsaPrivateKey256)), ES256)
f(mustSigner(NewSignerES(ES384, ecdsaPrivateKey384)), ES384)
// f(mustSigner(NewSignerES(ES512, ecdsaPrivateKey521)), ES512)
f(mustSigner(NewSignerES(ES512, ecdsaPrivateKey521)), ES512)
}

func TestVerifierAlg(t *testing.T) {
Expand Down
5 changes: 0 additions & 5 deletions jwt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ func mustVerifier(v Verifier, err error) Verifier {
return v
}

type customClaims struct {
StandardClaims
TestField string `json:"test_field"`
}

func TestMarshalHeader(t *testing.T) {
f := func(h *Header, want string) {
t.Helper()
Expand Down

0 comments on commit f65c7c6

Please sign in to comment.