Login.aspx.cs

(完整代码) 1KB

using System;
using System.Web;

public partial class Login : System.Web.UI.Page
{
    private readonly string client_id = Utils.GetAppSeting("qzone_AppID");
    private readonly string client_secret = Utils.GetAppSeting("qzone_AppKey");
    private readonly string redirect_uri = Utils.GetAppSeting("qzone_Redirect_uri");
    private string state = "";

    protected void Page_Load(object sender, EventArgs e)
    {
        // 下载于www.51aspx.com
    }

    protected void btnLogin_Click(object sender, EventArgs e)
    {

        state = Guid.NewGuid().ToString().Replace("-", "");
        //Utils.WriteCookie("state", state, 60);
        HttpContext.Current.Session["state"] = state;

        string login_url = "https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=" + client_id + "&state=" + state + "&redirect_uri=" + Utils.UrlEncode(redirect_uri) + "&scope=get_user_info,get_info,get_other_info";
        //写日志
        Logs.logSave("===========================================分割线=============================================");
        //写日志
        Logs.logSave("第一步:开始跳转至QQ登陆URL:" + login_url);

        //开始发送
        HttpContext.Current.Response.Redirect(login_url);

    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。