浏览代码

skip jwt token auth if privateKey is empty

Mitsuhiro Tanda 7 年之前
父节点
当前提交
fbe0ffd10b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pkg/api/pluginproxy/ds_auth_provider.go

+ 1 - 1
pkg/api/pluginproxy/ds_auth_provider.go

@@ -55,7 +55,7 @@ func ApplyRoute(ctx context.Context, req *http.Request, proxyPath string, route
 		}
 	}
 
-	if route.JwtTokenAuth != nil {
+	if route.JwtTokenAuth != nil && len(ds.SecureJsonData["privateKey"]) != 0 {
 		if token, err := tokenProvider.getJwtAccessToken(ctx, data); err != nil {
 			logger.Error("Failed to get access token", "error", err)
 		} else {