Package com.atlauncher.data.mojang.auth

Examples of com.atlauncher.data.mojang.auth.AuthenticationRequest


    public static AuthenticationResponse checkAccount(String username, String password, String clientToken) {
        try {
            URL url = new URL("https://authserver.mojang.com/authenticate");
            String request;
            if (clientToken == null) {
                request = Gsons.DEFAULT.toJson(new AuthenticationRequest(username, password));
            } else {
                request = Gsons.DEFAULT.toJson(new AuthenticationRequest(username, password, clientToken));
            }
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            connection.setConnectTimeout(15000);
            connection.setReadTimeout(15000);
            connection.setRequestMethod("POST");
View Full Code Here

TOP

Related Classes of com.atlauncher.data.mojang.auth.AuthenticationRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.