30 lines
473 B
PHP
30 lines
473 B
PHP
<?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");
|
|
}
|
|
}
|
|
|
|
} |