<commit_before>package com.github.longkerdandy.mithril.mqtt.api;

import java.util.concurrent.CompletableFuture;

/**
 * Authenticator
 */
public interface Authenticator {

    /**
     * Authorize client CONNECT
     *
     * @param clientId Client Id
     * @param userName User Name provided in CONNECT
     * @param password Password provided in CONNECT
     * @return Authorize Result
     */
    CompletableFuture<AuthorizeResult> authConnect(String clientId, String userName, String password);
}<commit_msg>add publish auth method<commit_after>package com.github.longkerdandy.mithril.mqtt.api;

import java.util.concurrent.CompletableFuture;

/**
 * Authenticator
 */
public interface Authenticator {

    /**
     * Authorize client CONNECT
     *
     * @param clientId Client Id
     * @param userName User Name
     * @param password Password
     * @return Authorize Result
     */
    CompletableFuture<AuthorizeResult> authConnect(String clientId, String userName, String password);

    /**
     * Authorize client PUBLISH
     *
     * @param clientId  Client Id
     * @param userName  User Name
     * @param topicName Topic Name
     * @param qos       QoS Level
     * @return Authorize Result
     */
    CompletableFuture<AuthorizeResult> authPublish(String clientId, String userName, String topicName, String qos);
}
{'fraction_non_alphanumeric': 0.08289768483943241, 'fraction_numerical': 0.0, 'mean_word_length': 3.227129337539432, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5567829', 'n_tokens_mistral': 391, 'n_tokens_neox': 375, 'n_words': 104}