Hey! I'm working on a developing a proxy server using java. Can somebody please help me with HTTP Basic Authentication? I've tried using the Authenticator class... I really don't know how to use the requestPasswordAuthentication() method. Here is the code...

class DialogAuthenticator extends Authenticator {

public PasswordAuthentication getPasswordAuthentication()
return requestPasswordAuthentication("localhost",null,200 0,"http/1.1","Authentication Req!","basic");


I'm running my proxy on port 2000...