M
Marian Schedenig
Hi!
For HTTP connections to some servers, we want to use a custom
java.net.Authenticator to generate credentials based on some flags and
potentially pre-set user names and passwords. However, all other HTTP
connections should keep using the system's default authenticator - our
specific context is an Eclipse plugin, where URLs accessing resources
managed by the plugin should use our own Authenticator and dialog
without disrupting access to "normal" URLs.
However, I cannot figure out a way to fall back to the default
authenticator after our own authenticator has decided that it doesn't
want to handle a connection itself. It's no problem to set a new default
authenticator, but it doesn't seem possible to fetch the current default
authenticator from the system (which would allow me to keep a reference
to the previous default and fall back to that when necessary).
Is there a way around this, or is our overall concept flawed?
Thx,
Marian.
For HTTP connections to some servers, we want to use a custom
java.net.Authenticator to generate credentials based on some flags and
potentially pre-set user names and passwords. However, all other HTTP
connections should keep using the system's default authenticator - our
specific context is an Eclipse plugin, where URLs accessing resources
managed by the plugin should use our own Authenticator and dialog
without disrupting access to "normal" URLs.
However, I cannot figure out a way to fall back to the default
authenticator after our own authenticator has decided that it doesn't
want to handle a connection itself. It's no problem to set a new default
authenticator, but it doesn't seem possible to fetch the current default
authenticator from the system (which would allow me to keep a reference
to the previous default and fall back to that when necessary).
Is there a way around this, or is our overall concept flawed?
Thx,
Marian.