public void addCredentials(String realm, String host, String userName, String passwd) {
if (userName == null) {
return;
}
Credentials c = new Credentials(realm, host, userName, passwd);
Message.debug("credentials added: "+c);
keyring.put(c.getKey(), c);
// add also with host only, to be able to find credential with host only
// (useful for httpclient especially)
keyring.put(c.getHost(), c);
}