diff --git a/app/src/Service/API.php b/app/src/Service/API.php new file mode 100644 index 0000000..7a30d77 --- /dev/null +++ b/app/src/Service/API.php @@ -0,0 +1,23 @@ +getHeader('Authorization'); + foreach ($auth_headers as $header) { + if (str_contains($header, 'Bearer')) { + return substr($header, strlen('Bearer ')); + } + } + throw new MissingAuthorizationHeader(); + } +}