Files
LudosData/authlogin/login_token.php
2018-04-29 21:55:39 -04:00

14 lines
351 B
PHP

<form method="post" action="api.php/">
<input name="token" value=
<?php
require 'auth.php';
$auth = new PHP_API_AUTH(array(
'secret'=>'someVeryLongPassPhraseChangeMe',
'authenticator'=>function($user,$pass){ if ($user=='admin' && $pass=='admin') $_SESSION['user']=$user; }
));
$auth->executeCommand();
?>/>
<input type="submit" value="ok">
</form>