Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 1.73 KB

Certificate.md

File metadata and controls

52 lines (38 loc) · 1.73 KB

Certificate

认证

Kind: global class

new Certificate(headers, requestBody, privateKeyContent)

Param Type Description
headers Object http请求的header
requestBody string 请求体
privateKeyContent string 私钥. 用于请求DuerOS参数签名

certificate.enableVerifyRequestSign() ⇒ boolean

开启验证请求参数签名,阻止非法请求

Kind: instance method of Certificate
Access: public

certificate.disableVerifyRequestSign() ⇒ boolean

关闭验证请求参数签名

Kind: instance method of Certificate
Access: public

certificate.verifyRequest() ⇒

验证请求者是否合法

Kind: instance method of Certificate
Returns: promise
Access: public

certificate.getRequestSig() ⇒

Kind: instance method of Certificate
Returns: string
Access: public