// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://github.com/fedidcg/FedCM/blob/main/proposals/context-api.md
enum IdentityCredentialRequestOptionsContext {
"signin",
"signup",
"use",
"continue"
};
enum IdentityCredentialRequestOptionsMode {
"button",
"widget"
};
// https://fedidcg.github.io/FedCM/#dictdef-identitycredentialrequestoptions
dictionary IdentityCredentialRequestOptions {
required sequence<IdentityProviderRequestOptions> providers;
IdentityCredentialRequestOptionsContext context = "signin";
// Allows an RP to select between the two UX modes of operation: button flows or widgets.
[RuntimeEnabled=FedCmButtonMode, MeasureAs=FedCmButtonMode] IdentityCredentialRequestOptionsMode mode = "widget";
// A querying language that allows an RP to ask what it wants from the IdPs.
[RuntimeEnabled=FedCmSelectiveDisclosure] IdentityStandardClaims claims;
// This is a debugging aid string instead of an actual member of this dictionary.
// `mediation` could be accidentally set by web developers here and this helps
// with showing debugging info to developers when it happens.
USVString mediation;
};