// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://w3c.github.io/webappsec-credential-management/#dictdef-credentialrequestoptions

enum CredentialMediationRequirement {
  "silent",
  "optional",
  "required"
};

dictionary CredentialRequestOptions {
    FederatedCredentialRequestOptions federated;

    boolean password = false;
    // Defaults to false. This is not set here to detect when both 'unmediated'
    // and 'mediation' are user provided, which results in a warning if they
    // contradict each other.
    [DeprecateAs=CredentialManagerCredentialRequestOptionsUnmediated] boolean
    unmediated;
    // Defaults to "optional". This is not set here to detect when both
    // 'unmediated' and 'mediation' are user provided, which results in a
    // warning if they contradict each other.
    // TODO(http://crbug.com/715077): Set the default here when 'unmediated' is
    // removed.
    CredentialMediationRequirement mediation;
};
