Working version, need to enforce https
This commit is contained in:
parent
cb03be2718
commit
5e715d09af
1 changed files with 10 additions and 6 deletions
|
@ -9,8 +9,11 @@ func _on_login_button_pressed():
|
|||
func _on_play_button_pressed():
|
||||
#emit_signal( "login_button_pressed" )
|
||||
var username = get_node("h_box_container/v_box_container/margin_container/login_box/email_box/email_edit").get_text();
|
||||
if username != null and username != "":
|
||||
do_request(username)
|
||||
var password = get_node("h_box_container/v_box_container/margin_container/login_box/password_box/password_edit").get_text();
|
||||
if username != null and username != "" and password != null and password != "":
|
||||
do_request(username, password)
|
||||
|
||||
|
||||
|
||||
|
||||
func _on_quit_button_pressed():
|
||||
|
@ -24,13 +27,14 @@ func _on_sound_button_toggled( button_pressed ):
|
|||
global.get_node( "audio_stream_player" ).play()
|
||||
|
||||
|
||||
func do_request(username):
|
||||
var message = load("res://assets/Scripts/Models/nel_login_message.gd").nel_login_message.new("ask", username, "", "", "", "");
|
||||
$HTTPRequest.request("http://lirria.khaganat.net/login/r2_login.php?" + message.get_request_string());
|
||||
|
||||
func do_request(username, password):
|
||||
var message = load("res://assets/Scripts/Models/nel_login_message.gd").nel_login_message.new("https-login", username, password, "Lirria", "2", "en");
|
||||
# $HTTPRequest.request("http://lirria.khaganat.net/login/r2_login.php?" + message.get_request_string());
|
||||
$HTTPRequest.request("http://149.91.80.160/login/r2_login.php?" + message.get_request_string());
|
||||
|
||||
func _on_HTTPRequest_request_completed(result, response_code, headers, body):
|
||||
var s = body.get_string_from_utf8().split(":")
|
||||
print(s)
|
||||
var ctn = s[1]
|
||||
print(ctn)
|
||||
|
||||
|
|
Loading…
Reference in a new issue