@Override
	public List<SinaWeiboAuthorizeInfo> list(String userId) {
		// sinaweibo:authorize:userid:authorizeids
		ShardedJedis jedis =  getConnection(); 
		String keyPrefix = prefix + userId + ":";
		String key = null;
		
		// 获取所有授权记录的id列表
		key = keyPrefix + "authorizeids";
		List<String> ids = jedis.lrange(key, 0, -1);
		if (null == ids) {
			returnConnection(jedis);
			return null;
		}
		
		// 拼装所有记录
		List<SinaWeiboAuthorizeInfo> list = new ArrayList<SinaWeiboAuthorizeInfo>();
		for (String id : ids) {
			// 根据id获取授权信息
			key = prefix + userId + ":" + id;
			String value = jedis.get(key);
			if (null == value) {
				continue;
			}
			
			// 将JSON格式的字符串转换为JSON对象
			JSONObject jo = null;
			try {
				jo = new JSONObject(value);
			} catch (JSONException e1) {
				return null;
			}
			if (null == jo) {
				return null;
			}
			
			// 将JSON对象转换为SinaWeiboAuthorizeInfo对象
			SinaWeiboAuthorizeInfo info = new SinaWeiboAuthorizeInfo();
			try {
				info.setDate(jo.getString("date"));
				info.setToken(jo.getString("token"));
				info.setUserId(jo.getString("user_id"));
				info.setUserName(jo.getString("user_name"));
			} catch (JSONException e) {
				// 某一个出现问题
				// 理论上不会到这个地方
			}
			
			list.add(info);
		}
		returnConnection(jedis);
		return list;
	}