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 ConfirmIdpSigninParams
- func (p *ConfirmIdpSigninParams) Do(ctx context.Context) (err error)
- func (v ConfirmIdpSigninParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v ConfirmIdpSigninParams) MarshalJSON() ([]byte, error)
- func (v *ConfirmIdpSigninParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *ConfirmIdpSigninParams) UnmarshalJSON(data []byte) error
- 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 EventDialogShown
- type LoginState
- 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" CommandConfirmIdpSignin = "FedCm.confirmIdpSignin" 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"` IdpSigninURL string `json:"idpSigninUrl"` 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 ConfirmIdpSigninParams ¶
type ConfirmIdpSigninParams struct {
DialogID string `json:"dialogId"`
}
ConfirmIdpSigninParams only valid if the dialog type is ConfirmIdpSignin. Acts as if the user had clicked the continue button.
func ConfirmIdpSignin ¶
func ConfirmIdpSignin(dialogID string) *ConfirmIdpSigninParams
ConfirmIdpSignin only valid if the dialog type is ConfirmIdpSignin. Acts as if the user had clicked the continue button.
See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#method-confirmIdpSignin
parameters:
dialogID
func (*ConfirmIdpSigninParams) Do ¶
func (p *ConfirmIdpSigninParams) Do(ctx context.Context) (err error)
Do executes FedCm.confirmIdpSignin against the provided context.
func (ConfirmIdpSigninParams) MarshalEasyJSON ¶
func (v ConfirmIdpSigninParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ConfirmIdpSigninParams) MarshalJSON ¶
func (v ConfirmIdpSigninParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ConfirmIdpSigninParams) UnmarshalEasyJSON ¶
func (v *ConfirmIdpSigninParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ConfirmIdpSigninParams) UnmarshalJSON ¶
func (v *ConfirmIdpSigninParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DialogType ¶
type DialogType string
DialogType whether the dialog shown is an account chooser or an auto re-authentication dialog.
See: https://chromedevtools.github.io/devtools-protocol/tot/FedCm#type-DialogType
const ( DialogTypeAccountChooser DialogType = "AccountChooser" DialogTypeAutoReauthn DialogType = "AutoReauthn" DialogTypeConfirmIdpSignin DialogType = "ConfirmIdpSignin" )
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 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 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