代码拉取完成,页面将自动刷新
第三方OAuth授权快捷登录(QQ、微信、微博、等)
QQ登录已完成(正常访问)
微博登录已完成(代码正常,提交的审核信息没有通过审核)
微信登录已完成(由于缺少营业执照信息,无法提供演示)
项目基于ASP.NET4.0 开发 依赖第三方库:Newtonsoft.Json.dll
调用方法 1.发起请求
2.获取用户信息
源码中有一个配置文件被我删除了,这里我给出这个文件的格式 AppData目录下面名为oauth.xml 的文件
<?xml version="1.0" encoding="utf-8" ?><!--第三封登录授权信息-->
<root>
<category type="qq" show="1" name="QQ第三方登录基本信息">
<item show="1" title="appid" notice="应用的唯一标识"></item>
<item show="1" title="appkey" notice="appid对应的密钥"></item>
<item show="1" title="redirect_uri" notice="成功授权后的回调地址,必须是注册appid时填写的主域名下的地址,建议设置为网站首页或网站的用户中心">http://oauth.lookweb.cn/oauth/ReturnUrl</item>
<item show="0" title="getcodeurl" notice="获取code的URL">https://graph.qq.com/oauth2.0/authorize</item>
<item show="0" title="get_code_url_m" notice="移动端获取code的URL">https://graph.z.qq.com/moc2/authorize</item>
<item show="0" title="gettokenurl" notice="获取token的URL">https://graph.qq.com/oauth2.0/token</item>
<item show="0" title="getopenidurl" notice="获取OpenID的URL">https://graph.qq.com/oauth2.0/me</item>
<item show="0" title="getuserinfourl" notice="获取用户信息的URL">https://graph.qq.com/user/get_user_info</item>
<item show="0" title="getunionid_url" notice="获取平台统一ID的URL">https://graph.qq.com/oauth2.0/me</item>
</category>
<category type="sina" show="1" name="新浪微博第三方登录基本信息">
<item show="1" title="appid" notice="应用的唯一标识"></item>
<item show="1" title="appkey" notice="appid对应的密钥"></item>
<item show="1" title="redirect_uri" notice="成功授权后的回调地址,必须是注册appid时填写的主域名下的地址,建议设置为网站首页或网站的用户中心">http://oauth.lookweb.cn/oauth/ReturnUrl</item>
<item show="0" title="getcodeurl" notice="获取code的URL">https://api.weibo.com/oauth2/authorize</item>
<item show="0" title="gettokenurl" notice="获取token的URL">https://api.weibo.com/oauth2/access_token</item>
<item show="0" title="gettokeninfourl" notice="查询用户access_token的授权相关信息">https://api.weibo.com/oauth2/get_token_info</item>
<item show="0" title="get_userinfo_url" notice="查询用户基本信息接口">https://api.weibo.com/2/users/show.json</item>
<item show="0" title="revokeoauthurl" notice="授权回收接口">https://api.weibo.com/oauth2/revokeoauth2</item>
<item show="0" title="get_email_url" notice="获取用户的联系邮箱">https://api.weibo.com/2/account/profile/email.json</item>
</category>
<category type="weixin" show="1" name="微信开放平台第三方登录基本信息">
<item show="1" title="appid" notice="应用的唯一标识"></item>
<item show="1" title="appkey" notice="appid对应的密钥"></item>
<item show="1" title="redirect_uri" notice="成功授权后的回调地址,必须是注册appid时填写的主域名下的地址,建议设置为网站首页或网站的用户中心">http://www.fiyta.com.cn/oauth/ReturnUrl</item>
<item show="0" title="getcodeurl" notice="获取code的URL">https://open.weixin.qq.com/connect/qrconnect</item>
<item show="0" title="gettokenurl" notice="获取token的URL">https://api.weixin.qq.com/sns/oauth2/access_token</item>
<item show="0" title="refresh_token_url" notice="使用 refresh_token刷新access_token的URL">https://api.weixin.qq.com/sns/oauth2/refresh_token</item>
<item show="0" title="getuserinfourl" notice="获取用户信息的URL">https://api.weixin.qq.com/sns/userinfo</item>
</category>
<category type="huawei" show="1" name="华为第三方登录基本信息">
<item show="1" title="appid" notice="应用的唯一标识"></item>
<item show="1" title="appkey" notice="appid对应的密钥"></item>
<item show="1" title="redirect_uri" notice="成功授权后的回调地址,必须是注册appid时填写的主域名下的地址,建议设置为网站首页或网站的用户中心">http://oauth.lookweb.cn/oauth/ReturnUrl</item>
<item show="0" title="get_code_url" notice="获取code的URL">https://oauth-login.cloud.huawei.com/oauth2/v2/authorize</item>
<item show="0" title="get_token_url" notice="获取token的URL"></item>
<item show="0" title="get_userinfo_url" notice="获取用户信息的">https://api.vmall.com/rest.php</item>
</category>
<category type="microsoft" show="1" name="微软第三方登录基本信息">
<item show="1" title="appid" notice="应用的唯一标识"></item>
<item show="1" title="appkey" notice="appid对应的密钥"></item>
<item show="1" title="redirect_uri" notice="成功授权后的回调地址,必须是注册appid时填写的主域名下的地址,建议设置为网站首页或网站的用户中心">https://localhost:44353/oauth/ReturnUrl</item>
<item show="0" title="get_code_url" notice="获取code的URL">https://login.microsoftonline.com/common/oauth2/v2.0/authorize</item>
<item show="0" title="get_token_url" notice="获取token的URL">https://login.microsoftonline.com/common/oauth2/v2.0/token</item>
<item show="0" title="get_userinfo_url" notice="获取用户信息的">https://graph.microsoft.com/v1.0/me</item>
</category>
<category type="mpweixin" show="1" name="微信公众平台第三方登录">
<item show="1" title="appid" notice="应用的唯一标识"></item>
<item show="1" title="appkey" notice="开发者密码"></item>
<item show="1" title="redirect_uri" notice="成功授权后的回调地址,必须是注册appid时填写的主域名下的地址,建议设置为网站首页或网站的用户中心">http://oauth.lookweb.cn/oauth/ReturnUrl</item>
<item show="0" title="get_code_url" notice="获取code的URL">https://open.weixin.qq.com/connect/oauth2/authorize</item>
<item show="0" title="get_token_url" notice="获取token的URL">https://api.weixin.qq.com/sns/oauth2/access_token</item>
<item show="0" title="refresh_token_url" notice="使用 refresh_token刷新access_token的URL">https://api.weixin.qq.com/sns/oauth2/refresh_token</item>
<item show="0" title="get_userinfo_url" notice="获取用户信息的URL">https://api.weixin.qq.com/sns/userinfo</item>
</category>
</root>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型