From d1949cef73914c7972bf1d0a97e43bbaeb9a9a27 Mon Sep 17 00:00:00 2001 From: "Tais P. Hansen" Date: Fri, 29 Nov 2024 13:48:02 +0100 Subject: [PATCH] feat: support EdDSA signing algorithms Fixes: #1191 --- credentials/verifier_default.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/credentials/verifier_default.go b/credentials/verifier_default.go index 27a2c1208..b16737dec 100644 --- a/credentials/verifier_default.go +++ b/credentials/verifier_default.go @@ -6,6 +6,7 @@ package credentials import ( "context" "crypto/ecdsa" + "crypto/ed25519" "crypto/rsa" "fmt" "strings" @@ -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