C# Class Senparc.Weixin.Work.AdvancedAPIs.ThirdPartyAuthApi

Show file Open project: JeffreySu/WeiXinMPSDK

Public Methods

Method Description
GetAgent ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, string agentId, int timeOut = Config.TIME_OUT ) : GetAgentResult

获取企业号应用

GetAgentAsync ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, string agentId, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取企业号应用

GetAuthInfo ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, int timeOut = Config.TIME_OUT ) : GetAuthInfoResult

获取企业号的授权信息

GetAuthInfoAsync ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取企业号的授权信息

GetCorpToken ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, int timeOut = Config.TIME_OUT ) : GetCorpTokenResult

获取企业号access_token

GetCorpTokenAsync ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取企业号access_token

GetPermanentCode ( string suiteAccessToken, string suiteId, string authCode, int timeOut = Config.TIME_OUT ) : GetPermanentCodeResult

获取企业号的永久授权码

GetPermanentCodeAsync ( string suiteAccessToken, string suiteId, string authCode, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取企业号的永久授权码

GetPreAuthCode ( string suiteAccessToken, string suiteId, int timeOut = 10000 ) : GetPreAuthCodeResult

获取预授权码

GetPreAuthCodeAsync ( string suiteAccessToken, string suiteId, int timeOut = 10000 ) : Task

【异步方法】获取预授权码

GetSuiteToken ( string suiteId, string suiteSecret, string suiteTicket, int timeOut = Config.TIME_OUT ) : GetSuiteTokenResult

获取应用套件令牌

GetSuiteTokenAsync ( string suiteId, string suiteSecret, string suiteTicket, int timeOut = Config.TIME_OUT ) : Task

【异步方法】 获取应用套件令牌

SetAgent ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, ThirdParty_AgentData agent, int timeOut = Config.TIME_OUT ) : QyJsonResult

设置企业号应用

SetAgentAsync ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, ThirdParty_AgentData agent, int timeOut = Config.TIME_OUT ) : Task

【异步方法】设置企业号应用

SetAuthConfig ( string suiteAccessToken, string authCode, int appid, int auth_type, int timeOut = 10000 ) : object

设置授权配置

SetAuthConfigAsync ( string suiteAccessToken, string authCode, int appid, int auth_type, int timeOut = 10000 ) : Task

【异步方法】设置授权配置

Method Details

GetAgent() public static method

获取企业号应用
public static GetAgent ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, string agentId, int timeOut = Config.TIME_OUT ) : GetAgentResult
suiteAccessToken string
suiteId string 应用套件id
authCorpId string 授权方corpid
permanentCode string 永久授权码,从get_permanent_code接口中获取
agentId string 授权方应用id
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Work.AdvancedAPIs.ThirdPartyAuth.GetAgentResult

GetAgentAsync() public static method

【异步方法】获取企业号应用
public static GetAgentAsync ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, string agentId, int timeOut = Config.TIME_OUT ) : Task
suiteAccessToken string
suiteId string 应用套件id
authCorpId string 授权方corpid
permanentCode string 永久授权码,从get_permanent_code接口中获取
agentId string 授权方应用id
timeOut int 代理请求超时时间(毫秒)
return Task

GetAuthInfo() public static method

获取企业号的授权信息
public static GetAuthInfo ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, int timeOut = Config.TIME_OUT ) : GetAuthInfoResult
suiteAccessToken string
suiteId string 应用套件id
authCorpId string 授权方corpid
permanentCode string 永久授权码,通过get_permanent_code获取
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Work.AdvancedAPIs.ThirdPartyAuth.GetAuthInfoResult

GetAuthInfoAsync() public static method

【异步方法】获取企业号的授权信息
public static GetAuthInfoAsync ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, int timeOut = Config.TIME_OUT ) : Task
suiteAccessToken string
suiteId string 应用套件id
authCorpId string 授权方corpid
permanentCode string 永久授权码,通过get_permanent_code获取
timeOut int 代理请求超时时间(毫秒)
return Task

GetCorpToken() public static method

获取企业号access_token
public static GetCorpToken ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, int timeOut = Config.TIME_OUT ) : GetCorpTokenResult
suiteAccessToken string
suiteId string 应用套件id
authCorpId string 授权方corpid
permanentCode string 永久授权码,通过get_permanent_code获取
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Work.AdvancedAPIs.ThirdPartyAuth.GetCorpTokenResult

GetCorpTokenAsync() public static method

【异步方法】获取企业号access_token
public static GetCorpTokenAsync ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, int timeOut = Config.TIME_OUT ) : Task
suiteAccessToken string
suiteId string 应用套件id
authCorpId string 授权方corpid
permanentCode string 永久授权码,通过get_permanent_code获取
timeOut int 代理请求超时时间(毫秒)
return Task

GetPermanentCode() public static method

获取企业号的永久授权码
public static GetPermanentCode ( string suiteAccessToken, string suiteId, string authCode, int timeOut = Config.TIME_OUT ) : GetPermanentCodeResult
suiteAccessToken string
suiteId string 应用套件id
authCode string 临时授权码会在授权成功时附加在redirect_uri中跳转回应用提供商网站。
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Work.AdvancedAPIs.ThirdPartyAuth.GetPermanentCodeResult

GetPermanentCodeAsync() public static method

【异步方法】获取企业号的永久授权码
public static GetPermanentCodeAsync ( string suiteAccessToken, string suiteId, string authCode, int timeOut = Config.TIME_OUT ) : Task
suiteAccessToken string
suiteId string 应用套件id
authCode string 临时授权码会在授权成功时附加在redirect_uri中跳转回应用提供商网站。
timeOut int 代理请求超时时间(毫秒)
return Task

GetPreAuthCode() public static method

获取预授权码
public static GetPreAuthCode ( string suiteAccessToken, string suiteId, int timeOut = 10000 ) : GetPreAuthCodeResult
suiteAccessToken string
suiteId string 应用套件id
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Work.AdvancedAPIs.ThirdPartyAuth.GetPreAuthCodeResult

GetPreAuthCodeAsync() public static method

【异步方法】获取预授权码
public static GetPreAuthCodeAsync ( string suiteAccessToken, string suiteId, int timeOut = 10000 ) : Task
suiteAccessToken string
suiteId string 应用套件id
timeOut int 代理请求超时时间(毫秒)
return Task

GetSuiteToken() public static method

获取应用套件令牌
public static GetSuiteToken ( string suiteId, string suiteSecret, string suiteTicket, int timeOut = Config.TIME_OUT ) : GetSuiteTokenResult
suiteId string 应用套件id
suiteSecret string 应用套件secret
suiteTicket string 微信后台推送的ticket
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Work.AdvancedAPIs.ThirdPartyAuth.GetSuiteTokenResult

GetSuiteTokenAsync() public static method

【异步方法】 获取应用套件令牌
public static GetSuiteTokenAsync ( string suiteId, string suiteSecret, string suiteTicket, int timeOut = Config.TIME_OUT ) : Task
suiteId string 应用套件id
suiteSecret string 应用套件secret
suiteTicket string 微信后台推送的ticket
timeOut int 代理请求超时时间(毫秒)
return Task

SetAgent() public static method

设置企业号应用
public static SetAgent ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, ThirdParty_AgentData agent, int timeOut = Config.TIME_OUT ) : QyJsonResult
suiteAccessToken string
suiteId string 应用套件id
authCorpId string 授权方corpid
permanentCode string 永久授权码,从get_permanent_code接口中获取
agent Senparc.Weixin.Work.AdvancedAPIs.ThirdPartyAuth.ThirdParty_AgentData 要设置的企业应用的信息
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Entities.QyJsonResult

SetAgentAsync() public static method

【异步方法】设置企业号应用
public static SetAgentAsync ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, ThirdParty_AgentData agent, int timeOut = Config.TIME_OUT ) : Task
suiteAccessToken string
suiteId string 应用套件id
authCorpId string 授权方corpid
permanentCode string 永久授权码,从get_permanent_code接口中获取
agent Senparc.Weixin.Work.AdvancedAPIs.ThirdPartyAuth.ThirdParty_AgentData 要设置的企业应用的信息
timeOut int 代理请求超时时间(毫秒)
return Task

SetAuthConfig() public static method

设置授权配置
public static SetAuthConfig ( string suiteAccessToken, string authCode, int appid, int auth_type, int timeOut = 10000 ) : object
suiteAccessToken string
authCode string 预授权码
appid int 允许进行授权的应用id,如1、2、3, 不填或者填空数组都表示允许授权套件内所有应用
auth_type int 授权类型:0 正式授权, 1 测试授权, 默认值为0
timeOut int
return object

SetAuthConfigAsync() public static method

【异步方法】设置授权配置
public static SetAuthConfigAsync ( string suiteAccessToken, string authCode, int appid, int auth_type, int timeOut = 10000 ) : Task
suiteAccessToken string
authCode string 预授权码
appid int 允许进行授权的应用id,如1、2、3, 不填或者填空数组都表示允许授权套件内所有应用
auth_type int 授权类型:0 正式授权, 1 测试授权, 默认值为0
timeOut int
return Task