Commit 28523e63 authored by Zohten's avatar Zohten

header field bugfix

parent b4cab1c8
...@@ -97,8 +97,9 @@ class Request ...@@ -97,8 +97,9 @@ class Request
// returns JWT token in Authorization header or throw an exception // returns JWT token in Authorization header or throw an exception
public function getJwtToken() public function getJwtToken()
{ {
$headers = getallheaders(); // Field names are case-insensitive : https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html
$autorization = $headers['Authorization']; $headers = array_change_key_case(getallheaders());
$autorization = $headers['authorization'];
$arr = explode(" ", $autorization); $arr = explode(" ", $autorization);
if (count($arr)<2) { if (count($arr)<2) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment