I am using JBOSS 3.0.6 and am trying to secure the JNDI invoker via
https. Looking at the code there seems to such way to do this. How do
you get the current username and password from the current login
context? It would be fairly trival to check the return value, if it is
401 then retry with the current login. So ..
if(connn.getResponseCode() ==
java.net.HttpURLConnection.HTTP_UNAUTHORIZED)
{
get login,pass from login context
userPassword=userName+":"+passwd
String encoding = new
sun.misc.BASE64Encoder().encode(userPassword.getBytes());
URLConnection uc = url.openConnection();
uc.setRequestProperty ("Authorization", "Basic " + encoding);
getInputStream blah,blah,blah ....
}
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development