working test for login

This commit is contained in:
2018-05-05 15:33:13 -04:00
parent cd10c7aaad
commit 59d8cfe020
3 changed files with 41 additions and 7 deletions

View File

@@ -0,0 +1,19 @@
<?php
$username = $_POST["userName"];
$password = $_POST["password"];
if( $username == "admin" && $password == "admin" ){
$userData = array();
$userDatap["id"] = "12345";
$userDatap["username"] = "admin";
$userDatap["firstName"] = "TestFirst";
$userDatap["lastName"] = "TestLast";
$userDatap["token"] = "fake-jwt-token";
echo( json_encode( $userDatap ) );
}else{
http_response_code(400);
}
?>