diff --git a/plugins/wasm-go/extensions/jwt-auth/README.md b/plugins/wasm-go/extensions/simple-jwt-auth/README.md similarity index 72% rename from plugins/wasm-go/extensions/jwt-auth/README.md rename to plugins/wasm-go/extensions/simple-jwt-auth/README.md index 2f176fd54..9d0632f01 100644 --- a/plugins/wasm-go/extensions/jwt-auth/README.md +++ b/plugins/wasm-go/extensions/simple-jwt-auth/README.md @@ -1,5 +1,5 @@ # 功能说明 -`jwt-auth`插件基于wasm-go实现了Token解析认证功能,可以判断Token是否有效,如果Token有效则继续访问后端微服务,Token无效或不存在直接拒绝并返回401 +`simple-jwt-auth`插件基于wasm-go实现了Token解析认证功能,可以判断Token是否有效,如果Token有效则继续访问后端微服务,Token无效或不存在直接拒绝并返回401 # 配置字段 | 名称 | 数据类型 | 填写要求 | 描述 | diff --git a/plugins/wasm-go/extensions/jwt-auth/VERSION b/plugins/wasm-go/extensions/simple-jwt-auth/VERSION similarity index 100% rename from plugins/wasm-go/extensions/jwt-auth/VERSION rename to plugins/wasm-go/extensions/simple-jwt-auth/VERSION diff --git a/plugins/wasm-go/extensions/jwt-auth/go.mod b/plugins/wasm-go/extensions/simple-jwt-auth/go.mod similarity index 100% rename from plugins/wasm-go/extensions/jwt-auth/go.mod rename to plugins/wasm-go/extensions/simple-jwt-auth/go.mod diff --git a/plugins/wasm-go/extensions/jwt-auth/go.sum b/plugins/wasm-go/extensions/simple-jwt-auth/go.sum similarity index 100% rename from plugins/wasm-go/extensions/jwt-auth/go.sum rename to plugins/wasm-go/extensions/simple-jwt-auth/go.sum diff --git a/plugins/wasm-go/extensions/jwt-auth/main.go b/plugins/wasm-go/extensions/simple-jwt-auth/main.go similarity index 97% rename from plugins/wasm-go/extensions/jwt-auth/main.go rename to plugins/wasm-go/extensions/simple-jwt-auth/main.go index 1ad6057d1..4b9e2457e 100644 --- a/plugins/wasm-go/extensions/jwt-auth/main.go +++ b/plugins/wasm-go/extensions/simple-jwt-auth/main.go @@ -13,7 +13,7 @@ import ( func main() { wrapper.SetCtx( - "jwt-auth", // 配置插件名称 + "simple-jwt-auth", // 配置插件名称 wrapper.ParseConfigBy(parseConfig), wrapper.ProcessRequestHeadersBy(onHttpRequestHeaders), ) diff --git a/test/e2e/conformance/tests/go-wasm-jwt-auth.go b/test/e2e/conformance/tests/go-wasm-simple-jwt-auth.go similarity index 91% rename from test/e2e/conformance/tests/go-wasm-jwt-auth.go rename to test/e2e/conformance/tests/go-wasm-simple-jwt-auth.go index 87af20deb..bf8d91434 100644 --- a/test/e2e/conformance/tests/go-wasm-jwt-auth.go +++ b/test/e2e/conformance/tests/go-wasm-simple-jwt-auth.go @@ -27,8 +27,8 @@ func init() { var WasmPluginsJwtAuth = suite.ConformanceTest{ ShortName: "WasmPluginsJwtAuth", - Description: "The Ingress in the higress-conformance-infra namespace test the jwt-auth wasmplugins.", - Manifests: []string{"tests/go-wasm-jwt-auth.yaml"}, + Description: "The Ingress in the higress-conformance-infra namespace test the simple-jwt-auth wasmplugins.", + Manifests: []string{"tests/go-wasm-simple-jwt-auth.yaml"}, Features: []suite.SupportedFeature{suite.WASMGoConformanceFeature}, Test: func(t *testing.T, suite *suite.ConformanceTestSuite) { testcases := []http.Assertion{ @@ -51,7 +51,7 @@ var WasmPluginsJwtAuth = suite.ConformanceTest{ }, }, } - t.Run("WasmPlugins jwt-auth", func(t *testing.T) { + t.Run("WasmPlugins simple-jwt-auth", func(t *testing.T) { for _, testcase := range testcases { http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, suite.GatewayAddress, testcase) } diff --git a/test/e2e/conformance/tests/go-wasm-jwt-auth.yaml b/test/e2e/conformance/tests/go-wasm-simple-jwt-auth.yaml similarity index 94% rename from test/e2e/conformance/tests/go-wasm-jwt-auth.yaml rename to test/e2e/conformance/tests/go-wasm-simple-jwt-auth.yaml index 16ddccb24..8ebb43e66 100644 --- a/test/e2e/conformance/tests/go-wasm-jwt-auth.yaml +++ b/test/e2e/conformance/tests/go-wasm-simple-jwt-auth.yaml @@ -40,4 +40,4 @@ spec: defaultConfig: token_headers: token token_secret_key: Dav7kfq3iA8S!JUj8&CUkdnQe72E@Cw6 - url: file:///opt/plugins/wasm-go/extensions/jwt-auth/plugin.wasm \ No newline at end of file + url: file:///opt/plugins/wasm-go/extensions/simple-jwt-auth/plugin.wasm \ No newline at end of file