From bbacf81ad8dc5d96a7f4f973825e89638335664f Mon Sep 17 00:00:00 2001 From: Ink33 Date: Thu, 28 Dec 2023 22:32:30 +0800 Subject: [PATCH] fix: non-point variable using for json unmarshal Signed-off-by: Ink33 --- plugins/wasm-go/extensions/jwt-auth/Dockerfile | 2 ++ plugins/wasm-go/extensions/jwt-auth/handler/verify.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 plugins/wasm-go/extensions/jwt-auth/Dockerfile diff --git a/plugins/wasm-go/extensions/jwt-auth/Dockerfile b/plugins/wasm-go/extensions/jwt-auth/Dockerfile new file mode 100644 index 0000000000..50c0bbe3ba --- /dev/null +++ b/plugins/wasm-go/extensions/jwt-auth/Dockerfile @@ -0,0 +1,2 @@ +FROM scratch +COPY main.wasm plugin.wasm diff --git a/plugins/wasm-go/extensions/jwt-auth/handler/verify.go b/plugins/wasm-go/extensions/jwt-auth/handler/verify.go index eac0519123..430a832b03 100644 --- a/plugins/wasm-go/extensions/jwt-auth/handler/verify.go +++ b/plugins/wasm-go/extensions/jwt-auth/handler/verify.go @@ -79,7 +79,7 @@ func consumerVerify(consumer *cfg.Consumer, verifyTime time.Time, log wrapper.Lo // Claims 支持直接传入 jose 的 jwks 并自动选择合适的公钥 // 无需额外调用verify,claims内部已进行验证 - err = token.Claims(keys, out) + err = token.Claims(keys, &out) if err != nil { return &ErrDenied{ msg: fmt.Sprintf("jwt verify failed, consumer: %s, token: %s, reason: %s",