onSasl2Success method
- XMLNode response
override
Called by the SASL2 negotiator when the SASL2 negotiations are done. response
is the entire response nonza.
This method is only called when the previous
Implementation
@override
Future<Result<bool, NegotiatorError>> onSasl2Success(XMLNode response) async {
// When we're done with SASL2, check the additional data to verify the server
// signature.
state = NegotiatorState.done;
final additionalData = response.firstTag('additional-data');
if (additionalData == null) {
return Result(NoAdditionalDataError());
}
if (!_checkSignature(additionalData.innerText())) {
return Result(InvalidServerSignatureError());
}
return const Result(true);
}