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 cdproto-gen command.
Index ¶
- Constants
- type Account
- type AccountURLType
- type ClickDialogButtonParams
- func (p *ClickDialogButtonParams) Do(ctx context.Context) (err error)
- func (v ClickDialogButtonParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v ClickDialogButtonParams) MarshalJSON() ([]byte, error)
- func (v *ClickDialogButtonParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *ClickDialogButtonParams) UnmarshalJSON(data []byte) error
- type DialogButton
- type DialogType
- type DisableParams
- type DismissDialogParams
- func (p *DismissDialogParams) Do(ctx context.Context) (err error)
- func (v DismissDialogParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v DismissDialogParams) MarshalJSON() ([]byte, error)
- func (v *DismissDialogParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *DismissDialogParams) UnmarshalJSON(data []byte) error
- func (p DismissDialogParams) WithTriggerCooldown(triggerCooldown bool) *DismissDialogParams
- type EnableParams
- func (p *EnableParams) Do(ctx context.Context) (err error)
- func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v EnableParams) MarshalJSON() ([]byte, error)
- func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *EnableParams) UnmarshalJSON(data []byte) error
- func (p EnableParams) WithDisableRejectionDelay(disableRejectionDelay bool) *EnableParams
- type EventDialogClosed
- type EventDialogShown
- type LoginState
- type OpenURLParams
- type ResetCooldownParams
- func (p *ResetCooldownParams) Do(ctx context.Context) (err error)
- func (v ResetCooldownParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v ResetCooldownParams) MarshalJSON() ([]byte, error)
- func (v *ResetCooldownParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *ResetCooldownParams) UnmarshalJSON(data []byte) error
- type SelectAccountParams
- func (p *SelectAccountParams) Do(ctx context.Context) (err error)
- func (v SelectAccountParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v SelectAccountParams) MarshalJSON() ([]byte, error)
- func (v *SelectAccountParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *SelectAccountParams) UnmarshalJSON(data []byte) error
Constants ¶
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 ¶
This section is empty.
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"` // These two are only set if the loginState is signUp PrivacyPolicyURL string `json:"privacyPolicyUrl,omitempty"` }
Account corresponds to IdentityRequestAccount.
See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#type-Account
func (Account) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Account) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Account) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Account) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
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) MarshalEasyJSON ¶
func (t AccountURLType) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (AccountURLType) MarshalJSON ¶
func (t AccountURLType) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (AccountURLType) String ¶
func (t AccountURLType) String() string
String returns the AccountURLType as string value.
func (*AccountURLType) UnmarshalEasyJSON ¶
func (t *AccountURLType) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*AccountURLType) UnmarshalJSON ¶
func (t *AccountURLType) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type ClickDialogButtonParams ¶
type ClickDialogButtonParams struct { DialogID string `json:"dialogId"` DialogButton DialogButton `json:"dialogButton"` }
ClickDialogButtonParams [no description].
func ClickDialogButton ¶
func ClickDialogButton(dialogID string, dialogButton DialogButton) *ClickDialogButtonParams
ClickDialogButton [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-clickDialogButton
parameters:
dialogID dialogButton
func (*ClickDialogButtonParams) Do ¶
func (p *ClickDialogButtonParams) Do(ctx context.Context) (err error)
Do executes FedCm.clickDialogButton against the provided context.
func (ClickDialogButtonParams) MarshalEasyJSON ¶
func (v ClickDialogButtonParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ClickDialogButtonParams) MarshalJSON ¶
func (v ClickDialogButtonParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ClickDialogButtonParams) UnmarshalEasyJSON ¶
func (v *ClickDialogButtonParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ClickDialogButtonParams) UnmarshalJSON ¶
func (v *ClickDialogButtonParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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) MarshalEasyJSON ¶
func (t DialogButton) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (DialogButton) MarshalJSON ¶
func (t DialogButton) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (DialogButton) String ¶
func (t DialogButton) String() string
String returns the DialogButton as string value.
func (*DialogButton) UnmarshalEasyJSON ¶
func (t *DialogButton) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*DialogButton) UnmarshalJSON ¶
func (t *DialogButton) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
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) MarshalEasyJSON ¶
func (t DialogType) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (DialogType) MarshalJSON ¶
func (t DialogType) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (DialogType) String ¶
func (t DialogType) String() string
String returns the DialogType as string value.
func (*DialogType) UnmarshalEasyJSON ¶
func (t *DialogType) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*DialogType) UnmarshalJSON ¶
func (t *DialogType) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type DisableParams ¶
type DisableParams struct{}
DisableParams [no description].
func Disable ¶
func Disable() *DisableParams
Disable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-disable
func (*DisableParams) Do ¶
func (p *DisableParams) Do(ctx context.Context) (err error)
Do executes FedCm.disable against the provided context.
func (DisableParams) MarshalEasyJSON ¶
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DisableParams) MarshalJSON ¶
func (v DisableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DisableParams) UnmarshalEasyJSON ¶
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DisableParams) UnmarshalJSON ¶
func (v *DisableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DismissDialogParams ¶
type DismissDialogParams struct { DialogID string `json:"dialogId"` TriggerCooldown bool `json:"triggerCooldown,omitempty"` }
DismissDialogParams [no description].
func DismissDialog ¶
func DismissDialog(dialogID string) *DismissDialogParams
DismissDialog [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-dismissDialog
parameters:
dialogID
func (*DismissDialogParams) Do ¶
func (p *DismissDialogParams) Do(ctx context.Context) (err error)
Do executes FedCm.dismissDialog against the provided context.
func (DismissDialogParams) MarshalEasyJSON ¶
func (v DismissDialogParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DismissDialogParams) MarshalJSON ¶
func (v DismissDialogParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DismissDialogParams) UnmarshalEasyJSON ¶
func (v *DismissDialogParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DismissDialogParams) UnmarshalJSON ¶
func (v *DismissDialogParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (DismissDialogParams) WithTriggerCooldown ¶
func (p DismissDialogParams) WithTriggerCooldown(triggerCooldown bool) *DismissDialogParams
WithTriggerCooldown [no description].
type EnableParams ¶
type EnableParams struct {
DisableRejectionDelay bool `json:"disableRejectionDelay,omitempty"` // 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 [no description].
func Enable ¶
func Enable() *EnableParams
Enable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-enable
parameters:
func (*EnableParams) Do ¶
func (p *EnableParams) Do(ctx context.Context) (err error)
Do executes FedCm.enable against the provided context.
func (EnableParams) MarshalEasyJSON ¶
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EnableParams) MarshalJSON ¶
func (v EnableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EnableParams) UnmarshalEasyJSON ¶
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EnableParams) UnmarshalJSON ¶
func (v *EnableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (EnableParams) WithDisableRejectionDelay ¶
func (p EnableParams) WithDisableRejectionDelay(disableRejectionDelay bool) *EnableParams
WithDisableRejectionDelay 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).
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
func (EventDialogClosed) MarshalEasyJSON ¶
func (v EventDialogClosed) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventDialogClosed) MarshalJSON ¶
func (v EventDialogClosed) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventDialogClosed) UnmarshalEasyJSON ¶
func (v *EventDialogClosed) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventDialogClosed) UnmarshalJSON ¶
func (v *EventDialogClosed) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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"` }
EventDialogShown [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#event-dialogShown
func (EventDialogShown) MarshalEasyJSON ¶
func (v EventDialogShown) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventDialogShown) MarshalJSON ¶
func (v EventDialogShown) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventDialogShown) UnmarshalEasyJSON ¶
func (v *EventDialogShown) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventDialogShown) UnmarshalJSON ¶
func (v *EventDialogShown) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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) MarshalEasyJSON ¶
func (t LoginState) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (LoginState) MarshalJSON ¶
func (t LoginState) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (LoginState) String ¶
func (t LoginState) String() string
String returns the LoginState as string value.
func (*LoginState) UnmarshalEasyJSON ¶
func (t *LoginState) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*LoginState) UnmarshalJSON ¶
func (t *LoginState) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type OpenURLParams ¶
type OpenURLParams struct { DialogID string `json:"dialogId"` AccountIndex int64 `json:"accountIndex"` AccountURLType AccountURLType `json:"accountUrlType"` }
OpenURLParams [no description].
func OpenURL ¶
func OpenURL(dialogID string, accountIndex int64, accountURLType AccountURLType) *OpenURLParams
OpenURL [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-openUrl
parameters:
dialogID accountIndex accountURLType
func (*OpenURLParams) Do ¶
func (p *OpenURLParams) Do(ctx context.Context) (err error)
Do executes FedCm.openUrl against the provided context.
func (OpenURLParams) MarshalEasyJSON ¶
func (v OpenURLParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (OpenURLParams) MarshalJSON ¶
func (v OpenURLParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*OpenURLParams) UnmarshalEasyJSON ¶
func (v *OpenURLParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*OpenURLParams) UnmarshalJSON ¶
func (v *OpenURLParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ResetCooldownParams ¶
type ResetCooldownParams struct{}
ResetCooldownParams 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.
func ResetCooldown ¶
func ResetCooldown() *ResetCooldownParams
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
func (*ResetCooldownParams) Do ¶
func (p *ResetCooldownParams) Do(ctx context.Context) (err error)
Do executes FedCm.resetCooldown against the provided context.
func (ResetCooldownParams) MarshalEasyJSON ¶
func (v ResetCooldownParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ResetCooldownParams) MarshalJSON ¶
func (v ResetCooldownParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ResetCooldownParams) UnmarshalEasyJSON ¶
func (v *ResetCooldownParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ResetCooldownParams) UnmarshalJSON ¶
func (v *ResetCooldownParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SelectAccountParams ¶
type SelectAccountParams struct { DialogID string `json:"dialogId"` AccountIndex int64 `json:"accountIndex"` }
SelectAccountParams [no description].
func SelectAccount ¶
func SelectAccount(dialogID string, accountIndex int64) *SelectAccountParams
SelectAccount [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-selectAccount
parameters:
dialogID accountIndex
func (*SelectAccountParams) Do ¶
func (p *SelectAccountParams) Do(ctx context.Context) (err error)
Do executes FedCm.selectAccount against the provided context.
func (SelectAccountParams) MarshalEasyJSON ¶
func (v SelectAccountParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SelectAccountParams) MarshalJSON ¶
func (v SelectAccountParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SelectAccountParams) UnmarshalEasyJSON ¶
func (v *SelectAccountParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SelectAccountParams) UnmarshalJSON ¶
func (v *SelectAccountParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface