propose method

Future<bool> propose({
  1. required String url,
  2. required String userName,
  3. required String password,
  4. String? title,
})

B Proposes a login for the user to save in the manager app (protocol.md 5.5 propose): the service passes it to the attached app and keeps nothing. Only for the browser host and the helpers with a grant; with no app attached unavailable (reason no_app). Fails as unsupported when the service does not offer propose. Answers whether the vaults hold the credential already (a helper's, which is then not proposed, DP-52).

Implementation

Future<bool> propose({
  required String url,
  required String userName,
  required String password,
  String? title,
}) async {
  _requireFeatures(await _ensureConnection(), 'propose', const ['propose']);
  final answer = await _request({
    'op': 'propose',
    'url': url,
    'title': ?title,
    'userName': userName,
    'password': password,
  });
  if (answer['op'] != 'accepted') {
    throw _protocolError('propose was answered ${answer['op']}');
  }
  return answer['known'] == true;
}