package com.lutao.cloud.iot.mqtt.core.server.auth;

import com.lutao.cloud.iot.mqtt.codec.MqttTopicSubscription;
import org.tio.core.ChannelContext;

import java.util.List;

/**
 * mqtt 服务端，认证处理器
 *

 */
public interface IMqttServerSubscribeValidator {

	/**
	 * 是否可以订阅
	 *
	 * @param context               ChannelContext
	 * @param clientId              客户端 id
	 * @param topicSubscriptionList 订阅 topic 列表
	 * @return 是否可以订阅
	 */
	boolean isValid(ChannelContext context, String clientId, List<MqttTopicSubscription> topicSubscriptionList);

}
