"You could create your own subclass of ConnectAuth, and override the method:" public abstract int callback(Credential[] cred);
ConnectAuth defaultAuth = new ConnectAuthAlternate();
try{
conn = new Connect("qemu+ssh://student@10.164.1.21/system", defaultAuth, 0);
} catch
(LibvirtException e){ System.out.println("exception caught:"+e);
System.out.println(e.getError());
}
It works as expected, asks for the user password and connects successfully but it never reaches the callback defined in ConnectAuthAlternate (aka ConnectAuthDefault):
@Override
public int callback(Credential[] cred) {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
[...]
I'm using libvirt-java 0.5.1, JNA 4.1 and the current libvirt version that comes with ubuntu 13.10: 1.1.1-0ubuntu8.5
Could you give some light about this?.
Sergio.