handleAuthenticationRequest method

  1. @override
Future<bool> handleAuthenticationRequest(
  1. IAMPASSAuthenticationRequest request,
  2. IAMPASSUser user
)
override

Implementation

@override
Future<bool> handleAuthenticationRequest(
    IAMPASSAuthenticationRequest request, IAMPASSUser user) async {
  String encodedRequest = jsonEncode(request.toJson());
  String encodedUser = jsonEncode(user.toJson());
  Map<String, String> args = {
    "request": encodedRequest,
    "device": encodedUser
  };

  final result =
      await methodChannel.invokeMethod<bool>('AuthenticationRequest', args);

  return result ?? false;
}