handleMSG_USERAUTH_INFO_REQUEST method
The server can optionally request authentication information from the client.
Implementation
void handleMSG_USERAUTH_INFO_REQUEST(MSG_USERAUTH_INFO_REQUEST msg) {
if (tracePrint != null) {
tracePrint(
'$hostport: MSG_USERAUTH_INFO_REQUEST prompts=${msg.prompts.length}');
}
if (msg.instruction.isNotEmpty) {
if (tracePrint != null) {
tracePrint('$hostport: instruction: ${msg.instruction}');
}
response(this, msg.instruction);
}
for (MapEntry<String, int> prompt in msg.prompts) {
if (tracePrint != null) {
tracePrint('$hostport: prompt: ${prompt.key}');
}
response(this, prompt.key);
}
if (msg.prompts.isNotEmpty) {
passwordPrompts = msg.prompts.length;
getThenSendPassword();
} else {
writeCipher(
MSG_USERAUTH_INFO_RESPONSE(List<Uint8List>.empty(growable: true)));
}
}