Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is not possible to authenticate to the proxy using a username and a password #81

Open
eduault opened this issue Oct 5, 2018 · 1 comment

Comments

@eduault
Copy link

eduault commented Oct 5, 2018

A need to specify username and a password to the the HTTP proxy of my company.

But this plugin don't take into account the username and the password specified in the proxy URI:
https://username:password@ip:port

This code should be included in the SlackClient.send(SlackMessage message) method:

Authenticator.setDefault(new Authenticator() {
	@Override
	protected PasswordAuthentication getPasswordAuthentication() {
		return new PasswordAuthentication(httpProxyUsername, httpProxyPassword.toCharArray());
	}
});

The user and password being included in the user-info of the URI.
See https://docs.oracle.com/javase/7/docs/api/java/net/URI.html#getUserInfo()

@jalogisch
Copy link

a PR that includes this is very welcomed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants