• 0

    posted a message on Custom Minecraft launcher.
    So as the title suggests I am making a minecraft launcher just for something to do, I thought it would be cool to make my own. Only problem is I can't figure out the authentication part of it, I am coding this in Visual Studio in C# I found this code but I can't seem to get it to work, if anyone could help me that'd be great.

    private string[] verifyUser(string username, string password, out bool authed)
    {
    HttpWebResponse response;
    HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://login.minecraft.net/?user=" + username + "&password=" + password + "&version=13");
    try
    {
    response = (HttpWebResponse)request.GetResponse();
    }
    catch (Exception)
    {
    authed = false;
    return null;
    }
    string str = new StreamReader(response.GetResponseStream()).ReadToEnd();
    if (str.Contains(":") == false)
    {
    authed = false;
    this.label4.Text = str;
    return null;
    }
    authed = true;
    return str.Split(new char[] { ':' });
    }
    Posted in: Modification Development
  • To post a comment, please or register a new account.