Add custom HTTP header for API authentication

This commit is contained in:
Frederic Guillot
2015-05-25 14:07:06 -04:00
parent 00c2e5c80e
commit 03f89e2899
5 changed files with 37 additions and 5 deletions

View File

@@ -3,6 +3,7 @@
require __DIR__.'/app/common.php';
$server = new JsonRPC\Server;
$server->setAuthenticationHeader(API_AUTHENTICATION_HEADER);
$server->before('authentication');
$server->attach(new Api\Action($container));
$server->attach(new Api\App($container));