20 lines
405 B
PHP
20 lines
405 B
PHP
<?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);
|
|
}
|
|
|
|
?>
|