微信公众号 Oauth 2.0 授权登录认证

时间:2020-06-23 16:14:51
【文件属性】:
文件名称:微信公众号 Oauth 2.0 授权登录认证
文件大小:4.71MB
文件格式:RAR
更新时间:2020-06-23 16:14:51
微信 公众号 Oauth 授权 简单实用的获取微信公众号用户的信息 /* *微信认证获取openid部分: *临时认证code */ //微信认证部分:第二步 获得code string code = Request["code"]; if (string.IsNullOrEmpty(code)) { //如果code没获取成功,重新拉取一遍 OpenAccess(); } //微信认证部分:第三步 获得openid string url = string.Format("https://api.weixin.qq.com/sns/oauth2/access_token?appid={0}&secret={1}&code={2}&grant_type=authorization_code", appid, appsecret, code); LogHelper.Debug(url); string result = HttpClientHelper.GetResponse(url); LogHelper.Debug(result); JObject outputObj = JObject.Parse(result);
【文件预览】:
WXOauth.sln
WebSite3
----website.publishproj(2KB)
----packages.config(285B)
----Web.config(1KB)
----Web.Debug.config(1KB)
----App_Code()
--------HttpClientHelper.cs(5KB)
----App_Data()
--------PublishProfiles()
----Index.aspx(2KB)
----Bin()
--------Newtonsoft.Json.dll(684KB)
--------Newtonsoft.Json.xml(691KB)
--------Newtonsoft.Json.dll.refresh(130B)
----Index.aspx.cs(5KB)
packages
----Newtonsoft.Json.12.0.3()
--------Newtonsoft.Json.12.0.3.nupkg(2.48MB)
--------.signature.p7s(18KB)
--------packageIcon.png(9KB)
--------LICENSE.md(1KB)
--------lib()

网友评论