chore(deps): migrage jose to go-jose/v3 (#433)

closes #390
This commit is contained in:
Tim Möhlmann 2023-09-01 14:33:16 +03:00 committed by GitHub
parent 0879c88399
commit daf82a5e04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 47 additions and 44 deletions

View file

@ -7,7 +7,7 @@ import (
"crypto/rsa"
"errors"
"gopkg.in/square/go-jose.v2"
jose "github.com/go-jose/go-jose/v3"
)
const (
@ -46,8 +46,8 @@ func GetKeyIDAndAlg(jws *jose.JSONWebSignature) (string, string) {
//
// will return false none or multiple match
//
//deprecated: use FindMatchingKey which will return an error (more specific) instead of just a bool
//moved implementation already to FindMatchingKey
// deprecated: use FindMatchingKey which will return an error (more specific) instead of just a bool
// moved implementation already to FindMatchingKey
func FindKey(keyID, use, expectedAlg string, keys ...jose.JSONWebKey) (jose.JSONWebKey, bool) {
key, err := FindMatchingKey(keyID, use, expectedAlg, keys...)
return key, err == nil