CodeIgniter-JWT-Sample
CodeIgniter-JWT-Sample copied to clipboard
Truncated Headers
Is there anyone experienced this?
$headers = $this->input->request_headers(); $token = $headers['Authorization'];
returns truncated token. I print the $headers to see why I'm getting 401 status. Here's the result.
_result of Array ( [Content-Type ] => application/json [token ] => eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9 [Authorization ] => Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9 [User-Agent ] => PostmanRuntime/7.25.0 [Accept ] =>
I need some help. Thanks!
You can use json_encode and json_decode to handle this. Let me know does this fix your problem.