Sets the authenticator that will be used by the networking code when a proxy or an HTTP server asks for authentication.
First, if there is a security manager, its checkPermission
method is called with a
NetPermission("setDefaultAuthenticator") permission.
This may result in a java.lang.SecurityException.
a | The authenticator to be set. If a is null then
any previously set authenticator is removed. |
SecurityException
| if a security manager exists and its
checkPermission method doesn't allow
setting the default authenticator. |
SecurityManager.checkPermission, java.net.NetPermission
Diagram: Authenticate