// Path: src/main/java/se/gustavkarlsson/rocketchat/jira_trigger/configuration/JiraConfiguration.java
// @Singleton
// public class JiraConfiguration {
// 	private static final String KEY_PREFIX = "jira.";
// 	static final String URI_KEY = KEY_PREFIX + "uri";
// 	static final String USER_KEY = KEY_PREFIX + "username";
// 	static final String PASSWORD_KEY = KEY_PREFIX + "password";
// 
// 	private final URI uri;
// 	private final String username;
// 	private final String password;
// 
// 	@Inject
// 	JiraConfiguration(ConfigMap configMap) throws ValidationException {
// 		notNull(configMap);
// 		try {
// 			uri = URI.create(notNull(configMap.getString(URI_KEY), String.format("%s must be provided", URI_KEY)));
// 			username = configMap.getString(USER_KEY);
// 			password = configMap.getString(PASSWORD_KEY);
// 		} catch (Exception e) {
// 			throw new ValidationException(e);
// 		}
// 	}
// 
// 	public URI getUri() {
// 		return uri;
// 	}
// 
// 	public String getUsername() {
// 		return username;
// 	}
// 
// 	public String getPassword() {
// 		return password;
// 	}
// }


import com.atlassian.jira.rest.client.api.AuthenticationHandler;
import com.atlassian.jira.rest.client.auth.AnonymousAuthenticationHandler;
import com.atlassian.jira.rest.client.auth.BasicHttpAuthenticationHandler;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
import org.slf4j.Logger;
import se.gustavkarlsson.rocketchat.jira_trigger.configuration.JiraConfiguration;
import javax.annotation.Nullable;
import java.io.Console;
import static org.slf4j.LoggerFactory.getLogger;
package se.gustavkarlsson.rocketchat.jira_trigger.jira;




@Singleton
class AuthHandlerProvider implements Provider<AuthenticationHandler> {
	private static final Logger log = getLogger(AuthHandlerProvider.class);

	private final String username;
	private final String password;
	private final Console console;

	@Inject
// Path: src/main/java/se/gustavkarlsson/rocketchat/jira_trigger/configuration/JiraConfiguration.java
// @Singleton
// public class JiraConfiguration {
// 	private static final String KEY_PREFIX = "jira.";
// 	static final String URI_KEY = KEY_PREFIX + "uri";
// 	static final String USER_KEY = KEY_PREFIX + "username";
// 	static final String PASSWORD_KEY = KEY_PREFIX + "password";
// 
// 	private final URI uri;
// 	private final String username;
// 	private final String password;
// 
// 	@Inject
// 	JiraConfiguration(ConfigMap configMap) throws ValidationException {
// 		notNull(configMap);
// 		try {
// 			uri = URI.create(notNull(configMap.getString(URI_KEY), String.format("%s must be provided", URI_KEY)));
// 			username = configMap.getString(USER_KEY);
// 			password = configMap.getString(PASSWORD_KEY);
// 		} catch (Exception e) {
// 			throw new ValidationException(e);
// 		}
// 	}
// 
// 	public URI getUri() {
// 		return uri;
// 	}
// 
// 	public String getUsername() {
// 		return username;
// 	}
// 
// 	public String getPassword() {
// 		return password;
// 	}
// }


// Path: src/main/java/se/gustavkarlsson/rocketchat/jira_trigger/jira/AuthHandlerProvider.java
import com.atlassian.jira.rest.client.api.AuthenticationHandler;
import com.atlassian.jira.rest.client.auth.AnonymousAuthenticationHandler;
import com.atlassian.jira.rest.client.auth.BasicHttpAuthenticationHandler;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
import org.slf4j.Logger;
import se.gustavkarlsson.rocketchat.jira_trigger.configuration.JiraConfiguration;
import javax.annotation.Nullable;
import java.io.Console;
import static org.slf4j.LoggerFactory.getLogger;

package se.gustavkarlsson.rocketchat.jira_trigger.jira;




@Singleton
class AuthHandlerProvider implements Provider<AuthenticationHandler> {
	private static final Logger log = getLogger(AuthHandlerProvider.class);

	private final String username;
	private final String password;
	private final Console console;

	@Inject
	AuthHandlerProvider(JiraConfiguration jiraConfig, @Nullable Console console) {