From c473ee10b667c3a46599bff905d1839ea7a50e5d Mon Sep 17 00:00:00 2001 From: handongxun Date: Fri, 9 Sep 2022 17:30:37 +0800 Subject: [PATCH] =?UTF-8?q?secret-net=EF=BC=9A=20=E6=9B=B4=E6=96=B0=20secr?= =?UTF-8?q?etMethods=20=E7=94=A8=E6=B3=95=EF=BC=8C=E6=94=AF=E6=8C=81=20*?= =?UTF-8?q?=20=E9=85=8D=E7=BD=AE=E6=89=80=E6=9C=89=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/uniCloud/secret-net.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/uniCloud/secret-net.md b/docs/uniCloud/secret-net.md index bd05cf254..89a877d37 100644 --- a/docs/uniCloud/secret-net.md +++ b/docs/uniCloud/secret-net.md @@ -144,11 +144,13 @@ uniCloud.callFunction({ ```js uniCloud.importObject('object-name', { - secretMethods: {'login':'both'} + secretMethods: {'login':'both'} // 支持配置所有方法设置加密参见下面的 secretMethods 说明 }) ``` -**clientDB呢?** +- clientDB + +暂不支持 **secretType 属性说明** @@ -161,7 +163,12 @@ uniCloud.importObject('object-name', { **secretMethods 属性说明** -`secretMethods` 是云对象中指定需要加密的方法名。可对每个方法配置,例如: `secretMethods: {'login':'both'}`,指定 `login` 方法的 `secretType` 为 both +`secretMethods` 是云对象中指定需要加密的方法名。 + +- 对所有方法设置加密,例如 `secretMethods: {'*':'both'}` +- 对每个方法配置加密,例如 `secretMethods: {'login':'both'}`,指定 `login` 方法的 `secretType` 为 both + +方法级配置优先级最高,例如 `secretMethods: {'*':'response', 'login':'both'}`,login 的 both 覆盖了 `'*':'response'` ## 服务器端 -- GitLab