"Authorization header is missing!"]); exit(); } if(substr($headers['Authorization'], 0, 7) !== 'Bearer ' ) { header("HTTP/1.0 400"); echo json_encode(["error" => "Bearer keyword is missing!"]); exit(); } $inputToken = trim(substr($headers['Authorization'], 7)); return $inputToken === $this->token; } }