@Override
	public Long insert(SinaWeiboAuthorizeInfo info, String userId) throws KankantuException {
		ShardedJedis jedis =  getConnection(); 
		String keyPrefix = prefix + userId + ":";
		// 获取一个authorizeid
		Long id = jedis.incr(keyPrefix + "maxid");
		if (id <= 0L) {
			returnConnection(jedis);
			return id;
		}
		
		// 将授权信息对象拼装成JSONObject对象
		JSONObject jo = new JSONObject();
		try {
			jo.put("user_name", info.getUserName());
			jo.put("user_id", info.getUserId());
			jo.put("token", info.getToken());
			jo.put("date", info.getDate());
		} catch (JSONException e) {
			throw new KankantuException("将SinaWeiboAuthorizeInfo对象转换为JSONObject对象的时候失败");
		}
		
		String key = null;
		
		// 保存JSONObject格式的字符串到Redis
		key = keyPrefix + id;
		jedis.set(key, jo.toString());
		
		// 将授权id保存到授权id列表中
		key = keyPrefix + "authorizeids";
		jedis.lpush(key, id.toString());
		
		returnConnection(jedis);
		return id;
	}