if (lastMessage == null) {
UserAuthRequestMessage msg = initUserAuthRequestMessage();
msg.setAuthenticationData(new KeyboardInteractiveMethodData(""));
return msg;
}
UserAuthInfoRequest req = (UserAuthInfoRequest)lastMessage;
if (req.getInstruction() != null) {
kbi.prompt(req.getInstruction());
}
Iterator<UserAuthInfoRequest.Prompt> it = req.promptIterator();
UserAuthInfoResponse rsp = new UserAuthInfoResponse();
while (it.hasNext()) {
UserAuthInfoRequest.Prompt prompt = it.next();
String reply = kbi.reply(prompt.getPrompt(), prompt.isEcho());
rsp.addResponse(reply);