handleMessage method
Implementation
@override
Uint8List? handleMessage(
SaslMessageType msgType, Uint8List bytesReceivedFromServer) {
switch (msgType) {
case SaslMessageType.AuthenticationSASL:
currentStep = mechanism.initialize();
break;
case SaslMessageType.AuthenticationSASLContinue:
currentStep = currentStep.transition(bytesReceivedFromServer);
break;
case SaslMessageType.AuthenticationSASLFinal:
currentStep = currentStep.transition(bytesReceivedFromServer);
return null;
default:
throw SaslScramException('Unsupported authentication type $msgType.');
}
return currentStep.bytesToSendToServer;
}