511,9 → 511,15 |
|
try { |
|
if (isset($_SERVER['REQUEST_URI'])) { |
$rel_url = substr($_SERVER['REQUEST_URI'], strlen(OIDplus::webpath(null, OIDplus::PATH_RELATIVE_TO_ROOT))); |
if (str_starts_with($rel_url, 'rest/')) { // <== TODO: Find a way how to move this into the plugin, since REST does not belong to the core. |
$only_use_bearer = str_starts_with($rel_url, 'rest/'); // <== TODO: Find a way how to move this into the plugin, since REST does not belong to the core. |
} else { |
$only_use_bearer = false; |
} |
|
if ($only_use_bearer) { |
|
// REST may only use Bearer Authentication |
$bearer = getBearerToken(); |
if (!is_null($bearer)) { |