4 import dolda.dolcon.protocol.Response;
5 import dolda.dolcon.protocol.Command;
7 public class PasswordAuth implements Authenticator {
8 private String password;
10 public PasswordAuth(String password) {
11 this.password = password;
14 public String handles(List<String> name) {
15 if(name.contains("pam"))
20 public Command step(Response resp) throws ProtocolException {
21 if((password != null) && (resp.code == 301)) {
23 return(new Command("pass", password));
28 throw(new ResponseException(resp, 0));