Beispiel #1
0
 public HttpResponseMessage Index([FromUri] WechatSignInput signParams)
 {
     if (_wechatAuthAppService.CheckSignature(signParams))
     {
         var res = Request.CreateResponse(HttpStatusCode.OK, signParams.Echostr);
         res.Content = new StringContent(signParams.Echostr, Encoding.UTF8, "text/html");
         return(res);
     }
     return(Request.CreateErrorResponse(HttpStatusCode.NonAuthoritativeInformation, string.Empty));
 }
 public bool CheckSignature(WechatSignInput input)
 {
     return(_wechatAuthentManager.CheckSignature(input.MapTo <WechatSign>()));
 }