Skip to content

Commit

Permalink
feat: support EdDSA signing algorithms
Browse files Browse the repository at this point in the history
Fixes: ory#1191
  • Loading branch information
taisph committed Nov 29, 2024
1 parent 1950529 commit d1949ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions credentials/verifier_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package credentials
import (
"context"
"crypto/ecdsa"
"crypto/ed25519"
"crypto/rsa"
"fmt"
"strings"
Expand Down Expand Up @@ -69,6 +70,10 @@ func (v *VerifierDefault) Verify(
if k, ok := key.Key.(*ecdsa.PublicKey); ok {
return k, nil
}
case *jwt.SigningMethodEd25519:
if k, ok := key.Key.(ed25519.PublicKey); ok {
return k, nil
}
case *jwt.SigningMethodRSAPSS:
if k, ok := key.Key.(*rsa.PublicKey); ok {
return k, nil
Expand Down

0 comments on commit d1949ce

Please sign in to comment.