CodeIgniter-JWT-Sample icon indicating copy to clipboard operation
CodeIgniter-JWT-Sample copied to clipboard

Truncated Headers

Open titosen opened this issue 5 years ago • 1 comments

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!

titosen avatar May 25 '20 13:05 titosen

You can use json_encode and json_decode to handle this. Let me know does this fix your problem.

ParitoshVaidya avatar May 28 '20 07:05 ParitoshVaidya