config->item('encryption_key'); $token = $this->input->get_request_header('Authorization'); $token = str_replace('Bearer ','',$token); $token = $this->jwt->decode($token, $key); $this->userdata = $token; } catch (Exception $e) { $token = FALSE; $erro = 'Erro: '.$e->getMessage(); } if ($token == FALSE && $this->debug == false) { $this->response([ 'status' => FALSE, 'message' => $erro ], REST_Controller::HTTP_UNAUTHORIZED); } } } /* End of file MY_Controller.php */ /* Location: ./application/core/MY_Controller.php */