handle method

  1. @override
Future<void> handle({
  1. required DeviceCommand command,
  2. required AuthenticationState state,
})
override

Implementation

@override
Future<void> handle({
  required DeviceCommand command,
  required AuthenticationState state,
}) async {
  final cmd = command as ChallengeResponseCommand;

  final secret = _secrets[state.communicator!.runtimeType];

  final valid = secret == null
      ? false
      : validateChallengeResponse(
          challenge: state.challenge!,
          command: cmd,
          secret: secret,
        );

  state.success = valid;
}