From a5117e76d6945cc139dd535484cc4e4e32e4f437 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 23 Oct 2024 22:31:47 +0800 Subject: [PATCH] :bug: Fix internal token load keypair issue --- pkg/nex/sec/internal_token.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/nex/sec/internal_token.go b/pkg/nex/sec/internal_token.go index 20e83a6..9a79c3b 100644 --- a/pkg/nex/sec/internal_token.go +++ b/pkg/nex/sec/internal_token.go @@ -12,7 +12,7 @@ import ( ) type InternalTokenWriter struct { - pk *ed25519.PrivateKey + pk ed25519.PrivateKey } func NewInternalTokenWriter(fp string) (*InternalTokenWriter, error) { @@ -31,7 +31,7 @@ func NewInternalTokenWriter(fp string) (*InternalTokenWriter, error) { return nil, err } - pk, ok := anyPk.(*ed25519.PrivateKey) + pk, ok := anyPk.(ed25519.PrivateKey) if !ok { return nil, fmt.Errorf("not an Ed25519 private key") } @@ -56,7 +56,7 @@ func (v *InternalTokenWriter) WriteUserInfoJwt(in UserInfo, audiences ...string) } type InternalTokenReader struct { - pk *ed25519.PublicKey + pk ed25519.PublicKey } func NewInternalTokenReader(fp string) (*InternalTokenReader, error) { @@ -75,7 +75,7 @@ func NewInternalTokenReader(fp string) (*InternalTokenReader, error) { return nil, err } - pk, ok := anyPk.(*ed25519.PublicKey) + pk, ok := anyPk.(ed25519.PublicKey) if !ok { return nil, fmt.Errorf("not an Ed25519 public key") }