fedcm

package
v0.158.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package fedcm provides the Chrome DevTools Protocol commands, types, and events for the FedCm domain.

This domain allows interacting with the FedCM dialog.

Generated by the pdlgen command.

Index

Constants

View Source
const (
	CommandEnable            = "FedCm.enable"
	CommandDisable           = "FedCm.disable"
	CommandSelectAccount     = "FedCm.selectAccount"
	CommandClickDialogButton = "FedCm.clickDialogButton"
	CommandOpenURL           = "FedCm.openUrl"
	CommandDismissDialog     = "FedCm.dismissDialog"
	CommandResetCooldown     = "FedCm.resetCooldown"
)

Command names.

Variables

ClickDialogButton [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-clickDialogButton

View Source
var DialogClosed = cdp.Event[EventDialogClosed]{Method: "FedCm.dialogClosed"}

DialogClosed triggered when a dialog is closed, either by user action, JS abort, or a command below.

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#event-dialogClosed

View Source
var DialogShown = cdp.Event[EventDialogShown]{Method: "FedCm.dialogShown"}

DialogShown [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#event-dialogShown

View Source
var Disable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandDisable}

Disable [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-disable

DismissDialog [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-dismissDialog

Enable [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-enable

OpenURL [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-openUrl

View Source
var ResetCooldown = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandResetCooldown}

ResetCooldown resets the cooldown time, if any, to allow the next FedCM call to show a dialog even if one was recently dismissed by the user.

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-resetCooldown

SelectAccount [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-selectAccount

Functions

This section is empty.

Types

type Account

type Account struct {
	AccountID         string     `json:"accountId"`
	Email             string     `json:"email"`
	Name              string     `json:"name"`
	GivenName         string     `json:"givenName"`
	PictureURL        string     `json:"pictureUrl"`
	IdpConfigURL      string     `json:"idpConfigUrl"`
	IdpLoginURL       string     `json:"idpLoginUrl"`
	LoginState        LoginState `json:"loginState"`
	TermsOfServiceURL string     `json:"termsOfServiceUrl,omitempty,omitzero"` // These two are only set if the loginState is signUp
	PrivacyPolicyURL  string     `json:"privacyPolicyUrl,omitempty,omitzero"`
}

Account corresponds to IdentityRequestAccount.

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#type-Account

type AccountURLType

type AccountURLType string

AccountURLType the URLs that each account has.

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#type-AccountUrlType

const (
	AccountURLTypeTermsOfService AccountURLType = "TermsOfService"
	AccountURLTypePrivacyPolicy  AccountURLType = "PrivacyPolicy"
)

AccountURLType values.

func (AccountURLType) String

func (t AccountURLType) String() string

String returns the AccountURLType as string value.

type ClickDialogButtonParams

type ClickDialogButtonParams struct {
	DialogID     string       `json:"dialogId"`
	DialogButton DialogButton `json:"dialogButton"`
}

ClickDialogButtonParams are the parameters of the command FedCm.clickDialogButton.

type DialogButton

type DialogButton string

DialogButton the buttons on the FedCM dialog.

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#type-DialogButton

const (
	DialogButtonConfirmIdpLoginContinue DialogButton = "ConfirmIdpLoginContinue"
	DialogButtonErrorGotIt              DialogButton = "ErrorGotIt"
	DialogButtonErrorMoreDetails        DialogButton = "ErrorMoreDetails"
)

DialogButton values.

func (DialogButton) String

func (t DialogButton) String() string

String returns the DialogButton as string value.

type DialogType

type DialogType string

DialogType the types of FedCM dialogs.

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#type-DialogType

const (
	DialogTypeAccountChooser  DialogType = "AccountChooser"
	DialogTypeAutoReauthn     DialogType = "AutoReauthn"
	DialogTypeConfirmIdpLogin DialogType = "ConfirmIdpLogin"
	DialogTypeError           DialogType = "Error"
)

DialogType values.

func (DialogType) String

func (t DialogType) String() string

String returns the DialogType as string value.

type DismissDialogParams

type DismissDialogParams struct {
	DialogID        string `json:"dialogId"`
	TriggerCooldown *bool  `json:"triggerCooldown,omitempty,omitzero"`
}

DismissDialogParams are the parameters of the command FedCm.dismissDialog.

type EnableParams

type EnableParams struct {
	DisableRejectionDelay *bool `json:"disableRejectionDelay,omitempty,omitzero"` // Allows callers to disable the promise rejection delay that would normally happen, if this is unimportant to what's being tested. (step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)
}

EnableParams are the parameters of the command FedCm.enable.

type EventDialogClosed

type EventDialogClosed struct {
	DialogID string `json:"dialogId"`
}

EventDialogClosed triggered when a dialog is closed, either by user action, JS abort, or a command below.

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#event-dialogClosed

type EventDialogShown

type EventDialogShown struct {
	DialogID   string     `json:"dialogId"`
	DialogType DialogType `json:"dialogType"`
	Accounts   []*Account `json:"accounts"`
	Title      string     `json:"title"` // These exist primarily so that the caller can verify the RP context was used appropriately.
	Subtitle   string     `json:"subtitle,omitempty,omitzero"`
}

EventDialogShown [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#event-dialogShown

type LoginState

type LoginState string

LoginState whether this is a sign-up or sign-in action for this account, i.e. whether this account has ever been used to sign in to this RP before.

See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#type-LoginState

const (
	LoginStateSignIn LoginState = "SignIn"
	LoginStateSignUp LoginState = "SignUp"
)

LoginState values.

func (LoginState) String

func (t LoginState) String() string

String returns the LoginState as string value.

type OpenURLParams

type OpenURLParams struct {
	DialogID       string         `json:"dialogId"`
	AccountIndex   int64          `json:"accountIndex"`
	AccountURLType AccountURLType `json:"accountUrlType"`
}

OpenURLParams are the parameters of the command FedCm.openUrl.

type SelectAccountParams

type SelectAccountParams struct {
	DialogID     string `json:"dialogId"`
	AccountIndex int64  `json:"accountIndex"`
}

SelectAccountParams are the parameters of the command FedCm.selectAccount.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL