@Override
		protected PasswordAuthentication getPasswordAuthentication() {

			String serverName = getRequestingHost();
			URL requestingURL = getRequestingURL(); // may be null

			String pwd = null;
			String name = preferredName;

			if (requestingURL != null) {
				String userInfo = requestingURL.getUserInfo();
				if (userInfo != null) {
					// Use user info from URL
					int pwdSep = userInfo.indexOf(':');
					if (pwdSep < 0) {
						name = userInfo;
					}
					else {
						pwd = userInfo.substring(pwdSep + 1);
						if (pwdSep != 0) {
							name = userInfo.substring(0, pwdSep);
						}
					}
				}

				URL minimalURL = DefaultClientAuthenticator.getMinimalURL(requestingURL);
				if (minimalURL != null) {
					serverName = minimalURL.toExternalForm();
				}
			}

			Msg.debug(this, "PasswordAuthentication requested for " + serverName);

			if (StringUtils.isBlank(name)) {
				throw new IllegalStateException("Connection user name is unknown");
			}

			if (pwd != null) {
				// Requesting URL specified password
				return new PasswordAuthentication(name, pwd.toCharArray());
			}

			String usage = "Access password requested for " + serverName;
			String prompt = getRequestingPrompt();
			if (StringUtils.isBlank(prompt) || "security".equals(prompt)) {
				prompt = "Password for " + name + ":";
			}
			return new PasswordAuthentication(name, getPassword(usage, prompt));
		}
Simple authentication handler using a default authenticator which may be passed to
{@link Authenticator#setDefault(Authenticator)}.  The preferred username must be set by 
invoking {@link #installHeadlessClientAuthenticator(String, String, boolean)} or
stipulated by the requesting URL.  The {@link ClientUtil#getUserName()} identity is never 
used.
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/HeadlessClientAuthenticator.java