fix: wrap original fetch key error
This commit is contained in:
parent
53803642d6
commit
f2f509a522
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ package op
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gopkg.in/square/go-jose.v2"
|
"gopkg.in/square/go-jose.v2"
|
||||||
|
@ -91,7 +92,7 @@ func (k *jwtProfileKeySet) VerifySignature(ctx context.Context, jws *jose.JSONWe
|
||||||
}
|
}
|
||||||
key, err := k.Storage.GetKeyByIDAndUserID(ctx, keyID, k.userID)
|
key, err := k.Storage.GetKeyByIDAndUserID(ctx, keyID, k.userID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.New("error fetching keys")
|
return nil, fmt.Errorf("error fetching keys: %w", err)
|
||||||
}
|
}
|
||||||
payload, err, ok := oidc.CheckKey(keyID, jws, *key)
|
payload, err, ok := oidc.CheckKey(keyID, jws, *key)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue