Hi All,
I use custom authenticator to provide user / passwords to connect to .NET Web Services. I overloaded function getPasswordAuthentication() that returns right user / password combination for the requested URL. It all works perfectly for many kinds of HTTP connections: basic, ntlm, through proxy, ssl, etc.
My problem is that JVM caches somewhere my returned PasswordAuthentication. It causes several problems. First, if user types wrong password when trying to access Web Service for the first time this wrong password gets cached, getPasswordAuthentication() never gets called again. The only way to resolve it is to restart the application (with JVM) and try again. So it looks like you try, you miss and there is no other chance. I think that there should be a fix for this that I miss because it looks like typical case for login.
My second case is less typical but I need to use it too. User logs in, performs some operation and then the other user logs in to the very same place. It is like you log in as administrator, pick something and then re-login as the regular user and create something based on what you picked.
Is it possible to clear authentication cache somehow in JVM? Or set time-to-live for some PasswordAuthentication objects? I found AuthCache object in sun.* packages but I do not know how to access or clear it.
I need to use Authenticator way and make Sun JVM to perform connect since I need to connect to many different authentication schemes that include ntlm, kerberos, ssl, proxies, basic, etc and Sun does very good job in this respect.
I would appreciate you suggestions.
Thank you,
Igor
[Message sent by forum member 'mklinchin' (mklinchin)]
http://forums.java.net/jive/thread.jspa?messageID=323236---------------------------------------------------------------------
To unsubscribe, e-mail:
[hidden email]
For additional commands, e-mail:
[hidden email]