blob: c6d256613a8b98c6e24ae54d8baac224bfe89ec4 [file]
package grails.proxy;
import java.net.Authenticator;
import java.net.PasswordAuthentication;
public class SystemPropertiesAuthenticator extends Authenticator {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
if(getRequestorType() == RequestorType.PROXY) {
return new PasswordAuthentication(
System.getProperty("http.proxyUser", ""),
System.getProperty("http.proxyPassword", "").toCharArray());
}
return null;
}
}