public static PasswordAuthentication requestPasswordAuthentication (InetAddress addr, int port, String protocol, String prompt, String scheme)

Ask the authenticator that has been registered with the system for a password.

First, if there is a security manager, its checkPermission method is called with a NetPermission("requestPasswordAuthentication") permission. This may result in a java.lang.SecurityException.

Parameters:
addr    The InetAddress of the site requesting authorization, or null if not known.
port    the port for the requested connection
protocol    The protocol that's requesting the connection (java.net.Authenticator.getRequestingProtocol())
prompt    A prompt string for the user
scheme    The authentication scheme

Returns:  The username/password, or null if one can't be gotten.

Exceptions:
SecurityException     if a security manager exists and its checkPermission method doesn't allow the password authentication request.

See also:
SecurityManager.checkPermission, java.net.NetPermission