config->item($item); $algorithm = $CI->config->item('jwt_algorithm'); return JWT::decode($token, $key, array($algorithm)); } } if (!function_exists('generateToken')) { function generateToken($data, $item = 'jwt_key') { $CI =& get_instance(); $key = $CI->config->item($item); return JWT::encode($data, $key); } }