1 18 19 package org.apache.jmeter; 20 21 import java.net.Authenticator ; 22 import java.net.PasswordAuthentication ; 23 24 31 public class ProxyAuthenticator extends Authenticator  32 { 33 34 private String userName; 35 36 37 private char password[]; 38 39 45 public ProxyAuthenticator(String userName, String password) 46 { 47 this.userName = userName; 48 this.password = password.toCharArray(); 49 } 50 51 58 protected PasswordAuthentication getPasswordAuthentication() 59 { 60 return new PasswordAuthentication (userName, password); 61 } 62 } 63 | Popular Tags |