} else if (SSL_CLIENT.equals(kind)) {  Map groups = new TreeMap(new GroupsComparator()); groups.putAll(getServersFile().getProperties("groups")); groups.put("global", "*"); for (Iterator groupNames = groups.keySet().iterator(); groupNames.hasNext();) { String groupName = (String) groupNames.next(); String groupRealm = (String) groups.get(groupName); if (realm == null || matches(groupRealm, realm)) { Map groupProperties = getServersFile().getProperties(groupName); String certFile = (String) groupProperties.get("ssl-client-cert-file"); if (certFile != null) { allAuths.add(new SVNAuthentication(SSL_CLIENT, realm == null ? groupRealm : realm, new File(certFile))); } } } } else if (PROXY.equals(kind)) { Map groups = new TreeMap(new GroupsComparator()); groups.putAll(getServersFile().getProperties("groups")); groups.put("global", "*"); for (Iterator groupNames = groups.keySet().iterator(); groupNames.hasNext();) { String groupName = (String) groupNames.next(); String groupRealm = (String) groups.get(groupName); if (realm == null || matches(groupRealm, realm)) { Map groupProperties = getServersFile().getProperties(groupName); String proxyHost = (String) groupProperties.get("http-proxy-host"); if (proxyHost != null) { String proxyPortStr = (String) groupProperties.get("http-proxy-port"); String proxyUser = (String) groupProperties.get("http-proxy-username"); String proxyPassword = (String) groupProperties.get("http-proxy-password"); int port = 80; if (proxyPortStr != null) { try { port = Integer.parseInt(proxyPortStr); } catch (NumberFormatException e) {  } } allAuths.add(new SVNAuthentication(PROXY, realm == null ? groupRealm : realm, proxyHost, port, proxyUser, proxyPassword)); } } }
    public SVNAuthentication[] getAvailableAuthentications(String kind, String realm) {        // load from files (for ssh, user, password)        List allAuths = new ArrayList();        if (myDefaultCredentials != null && PASSWORD.equals(kind)) {            allAuths.add(0, myDefaultCredentials);        }        if (myCachedAuths.containsKey(kind)) {            Collection cachedAuths = (Collection) myCachedAuths.get(kind);            for (Iterator iterator = cachedAuths.iterator(); iterator.hasNext();) {                SVNAuthentication cachedAuth = (SVNAuthentication) iterator.next();                if (cachedAuth != null && (realm.equals(cachedAuth.getRealm()) || cachedAuth.getRealm() == null)) {                    allAuths.add(cachedAuth);                }            }        }        if (SSH.equals(kind) || USERNAME.equals(kind) || PASSWORD.equals(kind)) {            SVNAuthentication auth = loadCredentials(kind, realm);            if (auth != null) {                allAuths.add(auth);            }        }        DebugLog.log("number of creds: " + allAuths.size());        return (SVNAuthentication[]) allAuths.toArray(new SVNAuthentication[allAuths.size()]);    }