mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Moved to use X-Auth-Token header for auth and new url format for later use
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
function authToken(\Slim\Route $route)
|
||||
{
|
||||
$app = \Slim\Slim::getInstance();
|
||||
$token = $route->getParam('key');
|
||||
$token = $app->request->headers->get('X-Auth-Token');
|
||||
if(isset($token) && !empty($token))
|
||||
{
|
||||
$username = dbFetchCell("SELECT `U`.`username` FROM `api_tokens` AS AT JOIN `users` AS U ON `AT`.`user_id`=`U`.`user_id` WHERE `AT`.`token_hash`=?", array($token));
|
||||
|
Reference in New Issue
Block a user