Mods-for-HESK-Netsyms/api/Controllers/InternalApiController.php

16 lines
387 B
PHP
Raw Normal View History

2017-05-04 16:15:11 +00:00
<?php
namespace Controllers;
use BusinessLogic\Exceptions\InternalUseOnlyException;
use BusinessLogic\Helpers;
abstract class InternalApiController {
function checkForInternalUseOnly() {
$tokenHeader = Helpers::getHeader('X-AUTH-TOKEN');
if ($tokenHeader !== null && trim($tokenHeader) !== '') {
2017-05-04 16:15:11 +00:00
throw new InternalUseOnlyException();
}
}
}