graylog-plugin-slack
graylog-plugin-slack copied to clipboard
It is not possible to authenticate to the proxy using a username and a password
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()
a PR that includes this is very welcomed.