Kodeordsgodkendelse på proxy
Hej!Tillad mig at lave et spørgsmål på engelsk, da jeg genbruger det fra nyhedsgruppen comp.lang.java.security, hvor der ikke ser ud til at være så megen aktivitet som i dette herlige forum ;-)
Jeg håber ikke jeg overtræder reglen om kun at oprette spørgsmål een gang...
Hi!
In the applet I am developing I have had problems with the authentication
through proxy and firewalls.
However, now I have seen a few examples as follows:
System.setProperty(\"http.proxySet\", \"true\");
System.setProperty(\"http.proxyHost\", \"my.firewall.name\");
System.setProperty(\"http.proxyPort\", \"80\");
String authString = \"myProxyID:myProxyPassword\";
authString = new sun.misc.BASE64Encoder().encode(authString.getBytes());
conn.setRequestProperty(\"Proxy-Authorization\", \"Basic \" +
authString);
I have three questions:
Q1:
In the System.setProperty examples I assume that only \"my.firewall.name\" is
pseudo. All the other parameters I suppose are the way I must put them?
Q2:
Can my.firewall.name be a label as well as an IP?
Q3:
In the applet I do not know the proxypassword. If I leave out the code
regarding the password will the browser put up a password dialog for me?
- or do I really have to prompt the user from the applet to get the
password?
