Add all code files from IDE

This commit is contained in:
Miguel Nogueira
2018-06-07 10:56:13 +00:00
commit 06fc7e5360
28 changed files with 4956 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php
class Auth
{
public $AdminID;
private $ApiTools;
public function __construct($AdminID)
{
$this->ApiTools = new ApplicationAPI($AdminID);
$this->AdminID = $AdminID;
}
public function Auth($key)
{
if ($this->ApiTools->keysMatch($key))
{
return true;
}
else
{
throw new Exception("FATAL: Invalid API key");
}
}
}