todo_api/login_token.php
Maurits van der Schee d1a2b29af4 bugfix
2016-08-13 03:46:54 +02:00

13 lines
340 B
PHP

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