DingtalkIsv

DingtalkIsv

new DingtalkIsv(config, app)

Source:

egg-dingtalk-isv插件

Parameters:
Name Type Description
config Object

Egg.js插件配置

app Object

Egg.js应用

Members

(readonly) encrypt

Source:
See:

加密器

(readonly) message

Source:
Properties:
Name Type Description
钉钉ISV应用服务端API用户模块 Object

(readonly) user

Source:
Properties:
Name Type Description
钉钉ISV应用服务端API用户模块 Object

Methods

genSignature(suiteSecret, suiteTicket, timestamp) → {String}

Source:
See:

生成三方访问接口签名

Parameters:
Name Type Description
suiteSecret String

钉钉应用套件suiteSecret

suiteTicket String

钉钉应用套件suiteTicket

timestamp String

时间戳

Returns:

签名

Type
String

(async) getAgentInfo(suite_key, auth_corpid, agentid) → {String}

Source:
See:

ISV应用获取授权应用详细信息

Parameters:
Name Type Description
suite_key String

套件Key

auth_corpid String

授权企业编号

agentid Number

企业应用编号

Returns:

授权应用信息

Type
String

(async) getAuthInfo(auth_corpid, suiteid) → {String}

Source:
See:

ISV应用获取授权企业信息

  • 企业信息:auth_corp_info
  • 应用列表:auth_info.agent
  • 当前应用:以客户端配置的appid过滤应用列表信息 如:require('lodash').find(auth_info.agent, { appid: CLINET_CONFIG.dingtalk.appid })
Parameters:
Name Type Description
auth_corpid String

授权企业编号

suiteid String

套件编号

Returns:

授权企业信息

Type
String

getCache(key) → {Promise}

Source:

获取缓存

Parameters:
Name Type Description
key String

Returns:

缓存

Type
Promise

(async) getCorpToken(auth_corpid, suiteid) → {String}

Source:
See:

ISV应用获取授企业令牌

Parameters:
Name Type Description
auth_corpid String

授权企业编号

suiteid String

套件编号

Returns:

授权企业令牌

Type
String

(async) getJsapiTicket(access_token, type) → {Object}

Source:
See:

JSAPI鉴权获取JSAPI票据

Parameters:
Name Type Default Description
access_token String

令牌,调用接口凭证

type String jsapi

类型,目前支支持jsapi

Returns:

票据信息

Type
Object

setCache(key, val, options) → {Promise}

Source:

设置缓存

Parameters:
Name Type Description
key String

val Any

options Object

选项

Returns:

缓存

Type
Promise