<div dir="ltr"><div style="font-family:arial,sans-serif;font-size:13px">I'm following the instructions mentioned in the list some years ago about using a subclass of ConnectAuth using ConnectAuthDefault as a sample:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><pre style="white-space:pre-wrap">"You could create your own
subclass of ConnectAuth, and override the method:"


public abstract int callback(Credential[] cred);</pre></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">What I'm doing is just "copying" ConnectAuthDefault to ConnectAuthAlternate and using exactly the same code. The thing is that the callback defined in that class never fires:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><p>ConnectAuth defaultAuth = new ConnectAuthAlternate();</p><p>try{</p><p>conn = new Connect("qemu+ssh://<a href="http://student@10.164.1.21/system" target="_blank">student@10.164.1.21/system</a>", defaultAuth, 0);</p>
<p>} catch</p><p>  (LibvirtException e){ System.out.println("exception caught:"+e);</p><p>  System.out.println(e.getError());</p><p></p><p>}</p><p><br></p><p>It works as expected, asks for the user password and connects successfully but it never reaches the callback defined in ConnectAuthAlternate (aka ConnectAuthDefault):</p>
<p>@Override</p><p>public int callback(Credential[] cred) {</p><p></p><p>BufferedReader in = new BufferedReader(new InputStreamReader(System.in));</p><p>[...]</p><p><br></p><p>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</p>
<p><br></p><p>Could you give some light about this?.</p><p>Sergio.<br></p></div></div>