simplify KeyProvider interface
This commit is contained in:
parent
0b446618c7
commit
58e27e8073
3 changed files with 9 additions and 9 deletions
|
@ -122,13 +122,10 @@ type jwtProfileKeySet struct {
|
|||
|
||||
//VerifySignature implements oidc.KeySet by getting the public key from Storage implementation
|
||||
func (k *jwtProfileKeySet) VerifySignature(ctx context.Context, jws *jose.JSONWebSignature) (payload []byte, err error) {
|
||||
keyID, alg := oidc.GetKeyIDAndAlg(jws)
|
||||
keyID, _ := oidc.GetKeyIDAndAlg(jws)
|
||||
key, err := k.storage.GetKeyByIDAndUserID(ctx, keyID, k.userID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error fetching keys: %w", err)
|
||||
}
|
||||
if key.Algorithm != alg {
|
||||
|
||||
}
|
||||
return jws.Verify(&key)
|
||||
return jws.Verify(key)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue