1 package de.hacksaar.javatuer;
3 import com.jcraft.jsch.UserInfo;
5 public abstract class InteractiveLogin implements UserInfo {
6 private String password;
7 private String passphrase;
10 public String getPassphrase() {
15 public String getPassword() {
19 public abstract String promptKeyPassphrase(String question);
22 public boolean promptPassphrase(String s) {
23 passphrase = promptKeyPassphrase(s);
24 return passphrase != null;
28 public boolean promptPassword(String s) {
29 password = promptUserPassword(s);
30 return password != null;
33 public abstract String promptUserPassword(String question);