Ejemplo n.º 1
0
 public WeiXinSignature(
     IHttpContextAccessor httpContextAccessor,
     IOptions <MpWeiXinOptions> wxOption)
 {
     this.httpContextAccessor = httpContextAccessor;
     config = wxOption.Value;
 }
Ejemplo n.º 2
0
 public AccessTokenRequest(
     IOptions <MpWeiXinOptions> wxOption)
 {
     _MpWeiXinOptions = wxOption.Value;
     grant_type       = "client_credential";
     appid            = _MpWeiXinOptions.AppId;
     secret           = _MpWeiXinOptions.AppSecret;
 }
Ejemplo n.º 3
0
 public WebAuthAccessTokenRequest(
     IOptions <MpWeiXinOptions> wxOption
     )
 {
     config = wxOption.Value;
     appid  = config.AppId;
     secret = config.AppSecret;
 }
Ejemplo n.º 4
0
 public WxAccessTokenService(
     IDistributedCache cache,
     ILogger <WxAccessTokenService> logger,
     IOptions <MpWeiXinOptions> wxOption,
     WxHelper wxHelper,
     AccessTokenRequest accessTokenRequest)
 {
     this.cache              = cache;
     this.logger             = logger;
     config                  = wxOption.Value;
     this.wxHelper           = wxHelper;
     this.accessTokenRequest = accessTokenRequest;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// ctor
 /// </summary>
 public WxJsSdkService(
     IDistributedCache cache,
     ILogger <WxJsSdkService> logger,
     IOptions <MpWeiXinOptions> wxOption,
     WxHelper wxHelper,
     WxAccessTokenService accessTokenSvc
     )
 {
     this.cache          = cache;
     this.logger         = logger;
     this.accessTokenSvc = accessTokenSvc;
     this.wxHelper       = wxHelper;
     config = wxOption.Value;
 }