public void setCredentials ( final String user , final String pw ) { if ( user == null ) { credentials = null ; } else { credentials = new UsernamePasswordCredentials ( user , pw ) ; } }
Set the credentials . user == null for unauthenticated .