Java 类com.intellij.util.proxy.NonStaticAuthenticator 实例源码

项目:intellij-ce-playground    文件:SocksAuthenticatorManager.java   
private CvsProxySelector() {
  myKnownHosts = Collections.synchronizedMap(new HashMap<Pair<String, Integer>, Pair<String, Integer>>());
  myAuthMap = Collections.synchronizedMap(new HashMap<Pair<String, Integer>, KeyValue<String, String>>());
  myAuthenticator = new NonStaticAuthenticator() {
    @Override
    public PasswordAuthentication getPasswordAuthentication() {
      final KeyValue<String, String> value = myAuthMap.get(Pair.create(getRequestingHost(), getRequestingPort()));
      if (value != null) {
        return new PasswordAuthentication(value.getKey(), value.getValue().toCharArray());
      }
      return null;
    }
  };
}
项目:tools-idea    文件:SocksAuthenticatorManager.java   
private CvsProxySelector() {
  myKnownHosts = Collections.synchronizedMap(new HashMap<Pair<String, Integer>, Pair<String, Integer>>());
  myAuthMap = Collections.synchronizedMap(new HashMap<Pair<String, Integer>, KeyValue<String, String>>());
  myAuthenticator = new NonStaticAuthenticator() {
    @Override
    public PasswordAuthentication getPasswordAuthentication() {
      final KeyValue<String, String> value = myAuthMap.get(Pair.create(getRequestingHost(), getRequestingPort()));
      if (value != null) {
        return new PasswordAuthentication(value.getKey(), value.getValue().toCharArray());
      }
      return null;
    }
  };
}
项目:intellij-ce-playground    文件:SocksAuthenticatorManager.java   
private NonStaticAuthenticator getAuthenticator() {
  return myAuthenticator;
}
项目:tools-idea    文件:SocksAuthenticatorManager.java   
private NonStaticAuthenticator getAuthenticator() {
  return myAuthenticator;
}