/** Handle challenges from keyboard-interactive authentication mode. */ public String[] replyToChallenge( String name, String instruction, int numPrompts, String[] prompt, boolean[] echo) { String[] responses = new String[numPrompts]; for (int i = 0; i < numPrompts; i++) { // request response from user for each prompt responses[i] = promptHelper.requestPasswordPrompt(instruction, prompt[i]); } return responses; }