selectClientCertificates method

Future<List<Match>> selectClientCertificates(
  1. SelectDetails details
)

This method filters from a list of client certificates the ones that are known to the platform, match request and for which the extension has permission to access the certificate and its private key. If interactive is true, the user is presented a dialog where they can select from matching certificates and grant the extension access to the certificate. The selected/filtered client certificates will be passed to callback.

Implementation

Future<List<Match>> selectClientCertificates(SelectDetails details) {
  var $completer = Completer<List<Match>>();
  $js.chrome.platformKeys.selectClientCertificates(
    details.toJS,
    (JSArray matches) {
      if (checkRuntimeLastError($completer)) {
        $completer.complete(matches.toDart
            .cast<$js.Match>()
            .map((e) => Match.fromJS(e))
            .toList());
      }
    }.toJS,
  );
  return $completer.future;
}