Documentation
¶
Index ¶
- Constants
- type AttestationFormat
- type AuthenticationExtensions
- func (m *AuthenticationExtensions) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *AuthenticationExtensions) MarshalBinary() ([]byte, error)
- func (m *AuthenticationExtensions) UnmarshalBinary(b []byte) error
- func (m *AuthenticationExtensions) Validate(formats strfmt.Registry) error
- type AuthenticationExtensionsClientOutputs
- func (m *AuthenticationExtensionsClientOutputs) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *AuthenticationExtensionsClientOutputs) MarshalBinary() ([]byte, error)
- func (m *AuthenticationExtensionsClientOutputs) UnmarshalBinary(b []byte) error
- func (m *AuthenticationExtensionsClientOutputs) Validate(formats strfmt.Registry) error
- type AuthenticationMechanisms
- type Authenticator
- type AuthenticatorAttachment
- type AuthenticatorAttestationResponse
- func (m *AuthenticatorAttestationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *AuthenticatorAttestationResponse) MarshalBinary() ([]byte, error)
- func (m *AuthenticatorAttestationResponse) UnmarshalBinary(b []byte) error
- func (m *AuthenticatorAttestationResponse) Validate(formats strfmt.Registry) error
- type AuthenticatorSelection
- func (m *AuthenticatorSelection) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *AuthenticatorSelection) MarshalBinary() ([]byte, error)
- func (m *AuthenticatorSelection) UnmarshalBinary(b []byte) error
- func (m *AuthenticatorSelection) Validate(formats strfmt.Registry) error
- type AuthenticatorTransport
- type COSEAlgorithmIdentifier
- type ChangePassword
- type ChangeTotpSecret
- type CompleteAddressVerification
- func (m *CompleteAddressVerification) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *CompleteAddressVerification) MarshalBinary() ([]byte, error)
- func (m *CompleteAddressVerification) UnmarshalBinary(b []byte) error
- func (m *CompleteAddressVerification) Validate(formats strfmt.Registry) error
- type ConveyancePreference
- type Credential
- type CredentialAttestation
- type CredentialCreation
- type CredentialCreationResponse
- func (m *CredentialCreationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *CredentialCreationResponse) MarshalBinary() ([]byte, error)
- func (m *CredentialCreationResponse) UnmarshalBinary(b []byte) error
- func (m *CredentialCreationResponse) Validate(formats strfmt.Registry) error
- type CredentialDescriptor
- type CredentialExtensions
- type CredentialFlags
- type CredentialMediationRequirement
- type CredentialParameter
- type CredentialPropertiesOutput
- func (m *CredentialPropertiesOutput) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *CredentialPropertiesOutput) MarshalBinary() ([]byte, error)
- func (m *CredentialPropertiesOutput) UnmarshalBinary(b []byte) error
- func (m *CredentialPropertiesOutput) Validate(formats strfmt.Registry) error
- type CredentialProtectionPolicy
- type CredentialType
- type Error
- type FederatedAccount
- type HMACGetSecretInputs
- type HMACGetSecretOutputs
- type LargeBlobInputs
- type LargeBlobOutputs
- type LargeBlobSupport
- type ListUserMFASessions
- type MFAPreferences
- type NameWebAuthnKey
- type PRFInputs
- type PRFOutputs
- type PRFValues
- type PublicKeyCredentialCreationOptions
- func (m *PublicKeyCredentialCreationOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *PublicKeyCredentialCreationOptions) MarshalBinary() ([]byte, error)
- func (m *PublicKeyCredentialCreationOptions) UnmarshalBinary(b []byte) error
- func (m *PublicKeyCredentialCreationOptions) Validate(formats strfmt.Registry) error
- type PublicKeyCredentialHints
- type RelyingPartyEntity
- type ResetPasswordConfirm
- type ResidentKeyRequirement
- type SelfUserCredentials
- type SelfUserIdentifier
- type SelfUserUpdate
- type SelfUserVerifiableAddress
- func (m *SelfUserVerifiableAddress) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *SelfUserVerifiableAddress) MarshalBinary() ([]byte, error)
- func (m *SelfUserVerifiableAddress) UnmarshalBinary(b []byte) error
- func (m *SelfUserVerifiableAddress) Validate(formats strfmt.Registry) error
- type SelfUserWithData
- type SelfUserWithDataV2
- type SetPassword
- type SetTotpSecret
- type SetWebAuthn
- type SupportedJSONSchema
- type URLEncodedBase64
- type UserEntity
- type UserMFASession
- type UserPreferences
- type UserVerificationRequirement
- type WebAuthnCredential
Constants ¶
const ( // MFAPreferencesPreferred2faTotp captures enum value "totp" MFAPreferencesPreferred2faTotp string = "totp" // MFAPreferencesPreferred2faPassword captures enum value "password" MFAPreferencesPreferred2faPassword string = "password" // MFAPreferencesPreferred2faOtp captures enum value "otp" MFAPreferencesPreferred2faOtp string = "otp" // MFAPreferencesPreferred2faEmailOtp captures enum value "email_otp" MFAPreferencesPreferred2faEmailOtp string = "email_otp" // MFAPreferencesPreferred2faSmsOtp captures enum value "sms_otp" MFAPreferencesPreferred2faSmsOtp string = "sms_otp" // MFAPreferencesPreferred2faVoiceOtp captures enum value "voice_otp" MFAPreferencesPreferred2faVoiceOtp string = "voice_otp" // MFAPreferencesPreferred2faWebauthn captures enum value "webauthn" MFAPreferencesPreferred2faWebauthn string = "webauthn" // MFAPreferencesPreferred2faUsernamelessWebauthn captures enum value "usernameless_webauthn" MFAPreferencesPreferred2faUsernamelessWebauthn string = "usernameless_webauthn" // MFAPreferencesPreferred2faPush captures enum value "push" MFAPreferencesPreferred2faPush string = "push" // MFAPreferencesPreferred2faSymbol captures enum value "symbol" MFAPreferencesPreferred2faSymbol string = "symbol" // MFAPreferencesPreferred2faQrCode captures enum value "qr_code" MFAPreferencesPreferred2faQrCode string = "qr_code" )
const ( // SelfUserCredentialsStateValid captures enum value "valid" SelfUserCredentialsStateValid string = "valid" // SelfUserCredentialsStateMustBeReset captures enum value "must_be_reset" SelfUserCredentialsStateMustBeReset string = "must_be_reset" // SelfUserCredentialsStateMustBeChanged captures enum value "must_be_changed" SelfUserCredentialsStateMustBeChanged string = "must_be_changed" )
const ( // SelfUserCredentialsTypePassword captures enum value "password" SelfUserCredentialsTypePassword string = "password" // SelfUserCredentialsTypeWebauthn captures enum value "webauthn" SelfUserCredentialsTypeWebauthn string = "webauthn" // SelfUserCredentialsTypeTotp captures enum value "totp" SelfUserCredentialsTypeTotp string = "totp" // SelfUserCredentialsTypeDevice captures enum value "device" SelfUserCredentialsTypeDevice string = "device" )
const ( // SelfUserCredentialsWebauthnTypeRegular captures enum value "regular" SelfUserCredentialsWebauthnTypeRegular string = "regular" // SelfUserCredentialsWebauthnTypeDiscoverable captures enum value "discoverable" SelfUserCredentialsWebauthnTypeDiscoverable string = "discoverable" )
const ( // SelfUserIdentifierTypeEmail captures enum value "email" SelfUserIdentifierTypeEmail string = "email" // SelfUserIdentifierTypeMobile captures enum value "mobile" SelfUserIdentifierTypeMobile string = "mobile" // SelfUserIdentifierTypeUID captures enum value "uid" SelfUserIdentifierTypeUID string = "uid" // SelfUserIdentifierTypeExternal captures enum value "external" SelfUserIdentifierTypeExternal string = "external" // SelfUserIdentifierTypeFederated captures enum value "federated" SelfUserIdentifierTypeFederated string = "federated" )
const ( // SelfUserVerifiableAddressPreferredContactMethodSms captures enum value "sms" SelfUserVerifiableAddressPreferredContactMethodSms string = "sms" // SelfUserVerifiableAddressPreferredContactMethodVoice captures enum value "voice" SelfUserVerifiableAddressPreferredContactMethodVoice string = "voice" )
const ( // SelfUserVerifiableAddressStatusActive captures enum value "active" SelfUserVerifiableAddressStatusActive string = "active" // SelfUserVerifiableAddressStatusInactive captures enum value "inactive" SelfUserVerifiableAddressStatusInactive string = "inactive" )
const ( // SelfUserVerifiableAddressTypeEmail captures enum value "email" SelfUserVerifiableAddressTypeEmail string = "email" // SelfUserVerifiableAddressTypeMobile captures enum value "mobile" SelfUserVerifiableAddressTypeMobile string = "mobile" )
const ( // SelfUserWithDataV2PreferredAuthenticationMechanismTotp captures enum value "totp" SelfUserWithDataV2PreferredAuthenticationMechanismTotp string = "totp" // SelfUserWithDataV2PreferredAuthenticationMechanismPassword captures enum value "password" SelfUserWithDataV2PreferredAuthenticationMechanismPassword string = "password" // SelfUserWithDataV2PreferredAuthenticationMechanismOtp captures enum value "otp" SelfUserWithDataV2PreferredAuthenticationMechanismOtp string = "otp" // SelfUserWithDataV2PreferredAuthenticationMechanismEmailOtp captures enum value "email_otp" SelfUserWithDataV2PreferredAuthenticationMechanismEmailOtp string = "email_otp" // SelfUserWithDataV2PreferredAuthenticationMechanismSmsOtp captures enum value "sms_otp" SelfUserWithDataV2PreferredAuthenticationMechanismSmsOtp string = "sms_otp" // SelfUserWithDataV2PreferredAuthenticationMechanismVoiceOtp captures enum value "voice_otp" SelfUserWithDataV2PreferredAuthenticationMechanismVoiceOtp string = "voice_otp" // SelfUserWithDataV2PreferredAuthenticationMechanismWebauthn captures enum value "webauthn" SelfUserWithDataV2PreferredAuthenticationMechanismWebauthn string = "webauthn" // SelfUserWithDataV2PreferredAuthenticationMechanismUsernamelessWebauthn captures enum value "usernameless_webauthn" SelfUserWithDataV2PreferredAuthenticationMechanismUsernamelessWebauthn string = "usernameless_webauthn" // SelfUserWithDataV2PreferredAuthenticationMechanismPush captures enum value "push" SelfUserWithDataV2PreferredAuthenticationMechanismPush string = "push" // SelfUserWithDataV2PreferredAuthenticationMechanismSymbol captures enum value "symbol" SelfUserWithDataV2PreferredAuthenticationMechanismSymbol string = "symbol" // SelfUserWithDataV2PreferredAuthenticationMechanismQrCode captures enum value "qr_code" SelfUserWithDataV2PreferredAuthenticationMechanismQrCode string = "qr_code" )
const ( // SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismTotp captures enum value "totp" SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismTotp string = "totp" // SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismPassword captures enum value "password" SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismPassword string = "password" // SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismOtp captures enum value "otp" SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismOtp string = "otp" // SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismEmailOtp captures enum value "email_otp" SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismEmailOtp string = "email_otp" // SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismSmsOtp captures enum value "sms_otp" SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismSmsOtp string = "sms_otp" // SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismVoiceOtp captures enum value "voice_otp" SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismVoiceOtp string = "voice_otp" // SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismWebauthn captures enum value "webauthn" SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismWebauthn string = "webauthn" // SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismUsernamelessWebauthn captures enum value "usernameless_webauthn" SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismUsernamelessWebauthn string = "usernameless_webauthn" // SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismPush captures enum value "push" SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismPush string = "push" // SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismSymbol captures enum value "symbol" SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismSymbol string = "symbol" // SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismQrCode captures enum value "qr_code" SelfUserWithDataV2SecondFactorPreferredAuthenticationMechanismQrCode string = "qr_code" )
const ( // SetWebAuthnTypeRegular captures enum value "regular" SetWebAuthnTypeRegular string = "regular" // SetWebAuthnTypeDiscoverable captures enum value "discoverable" SetWebAuthnTypeDiscoverable string = "discoverable" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttestationFormat ¶
type AttestationFormat string
AttestationFormat AttestationFormat is an internal representation of the relevant inputs for registration.
Specification: §5.4 Options for Credential Creation (https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-attestationformats) Registry: https://www.iana.org/assignments/webauthn/webauthn.xhtml
swagger:model AttestationFormat
func (AttestationFormat) ContextValidate ¶
ContextValidate validates this attestation format based on context it is used
type AuthenticationExtensions ¶
type AuthenticationExtensions struct {
// AppID is the FIDO AppID Extension input. Authentication only.
Appid string `json:"appid,omitempty" yaml:"appid,omitempty"`
// AppIDExclude is the FIDO AppID Exclusion Extension input. Registration only.
AppidExclude string `json:"appidExclude,omitempty" yaml:"appidExclude,omitempty"`
// cred blob
CredBlob URLEncodedBase64 `json:"credBlob,omitempty" yaml:"credBlob,omitempty"`
// CredProps requests the Credential Properties Extension. Registration only.
CredProps bool `json:"credProps,omitempty" yaml:"credProps,omitempty"`
// credential protection policy
CredentialProtectionPolicy CredentialProtectionPolicy `json:"credentialProtectionPolicy,omitempty" yaml:"credentialProtectionPolicy,omitempty"`
// EnforceCredentialProtectionPolicy requires the credProtect policy is honoured. Registration only.
EnforceCredentialProtectionPolicy bool `json:"enforceCredentialProtectionPolicy,omitempty" yaml:"enforceCredentialProtectionPolicy,omitempty"`
// GetCredBlob requests the blob stored with the credential. Authentication only.
GetCredBlob bool `json:"getCredBlob,omitempty" yaml:"getCredBlob,omitempty"`
// HMACCreateSecret requests provisioning of the CTAP hmac-secret. Registration only.
HmacCreateSecret bool `json:"hmacCreateSecret,omitempty" yaml:"hmacCreateSecret,omitempty"`
// hmac get secret
HmacGetSecret *HMACGetSecretInputs `json:"hmacGetSecret,omitempty" yaml:"hmacGetSecret,omitempty"`
// large blob
LargeBlob *LargeBlobInputs `json:"largeBlob,omitempty" yaml:"largeBlob,omitempty"`
// MinPinLength requests the authenticator minimum PIN length. Registration only.
MinPinLength bool `json:"minPinLength,omitempty" yaml:"minPinLength,omitempty"`
// prf
Prf *PRFInputs `json:"prf,omitempty" yaml:"prf,omitempty"`
// RemoteClientDataJSON is the Remote Client Data JSON Extension input. This member is set by a remote desktop
// web client and a Relying Party should not normally set it. See [ExtensionRemoteClientDataJSON], which records
// that this extension is not yet ratified.
RemoteClientDataJSON string `json:"remoteClientDataJSON,omitempty" yaml:"remoteClientDataJSON,omitempty"`
// UVM requests the user verification methods used for the operation.
Uvm bool `json:"uvm,omitempty" yaml:"uvm,omitempty"`
}
AuthenticationExtensions AuthenticationExtensions represents the AuthenticationExtensionsClientInputs IDL. It contains additional parameters requesting additional processing by the client and authenticator.
Members are marshalled in the AuthenticationExtensionsClientInputsJSON form, i.e. buffer sources are base64url encoded strings, which is the form consumed by PublicKeyCredential.parseCreationOptionsFromJSON().
A JSON member whose key matches a modelled name only by case (e.g. "CredProps" for "credProps") is bound to that modelled field, not collected into [AuthenticationExtensions.Extra]: encoding/json resolves the case-insensitive match during the first decoding pass, before UnmarshalJSON ever sees the untyped member map. If such a member's value has the wrong type for the modelled field, unmarshalling fails outright rather than falling back to Extra. encoding/json (v1, the only version this module may use) offers no way to defer that binding.
Specification: §5.7.1. Authentication Extensions Client Inputs (https://www.w3.org/TR/webauthn-3/#iface-authentication-extensions-client-inputs)
Specification: §10.1. Client Extensions (https://www.w3.org/TR/webauthn-3/#sctn-defined-client-extensions)
swagger:model AuthenticationExtensions
func (*AuthenticationExtensions) ContextValidate ¶
func (m *AuthenticationExtensions) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validate this authentication extensions based on the context it is used
func (*AuthenticationExtensions) MarshalBinary ¶
func (m *AuthenticationExtensions) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AuthenticationExtensions) UnmarshalBinary ¶
func (m *AuthenticationExtensions) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AuthenticationExtensionsClientOutputs ¶
type AuthenticationExtensionsClientOutputs struct {
// AppID indicates the FIDO AppID Extension was acted upon.
Appid bool `json:"appid,omitempty" yaml:"appid,omitempty"`
// AppIDExclude indicates the FIDO AppID Exclusion Extension was acted upon.
AppidExclude bool `json:"appidExclude,omitempty" yaml:"appidExclude,omitempty"`
// cred props
CredProps *CredentialPropertiesOutput `json:"credProps,omitempty" yaml:"credProps,omitempty"`
// HMACCreateSecret indicates the CTAP hmac-secret was provisioned at registration.
HmacCreateSecret bool `json:"hmacCreateSecret,omitempty" yaml:"hmacCreateSecret,omitempty"`
// hmac get secret
HmacGetSecret *HMACGetSecretOutputs `json:"hmacGetSecret,omitempty" yaml:"hmacGetSecret,omitempty"`
// large blob
LargeBlob *LargeBlobOutputs `json:"largeBlob,omitempty" yaml:"largeBlob,omitempty"`
// prf
Prf *PRFOutputs `json:"prf,omitempty" yaml:"prf,omitempty"`
// RemoteClientDataJSON indicates the Remote Client Data JSON Extension was acted upon, which means the local
// client delegated every Relying Party ID and origin check to a remote host. See
// [ExtensionRemoteClientDataJSON], which records that this extension is not yet ratified.
RemoteClientDataJSON bool `json:"remoteClientDataJSON,omitempty" yaml:"remoteClientDataJSON,omitempty"`
}
AuthenticationExtensionsClientOutputs AuthenticationExtensionsClientOutputs represents the AuthenticationExtensionsClientOutputs IDL, returned by the client after a create() or get() call.
Every modelled member is a pointer so an absent value is distinguishable from a false or empty one; the unsolicited output check performed by [AuthenticationExtensionsClientOutputs.Verify] depends on that distinction.
A JSON member whose key matches a modelled name only by case (e.g. "AppID" for "appid") is bound to that modelled field, not collected into [AuthenticationExtensionsClientOutputs.Extra]: encoding/json resolves the case-insensitive match during the first decoding pass, before UnmarshalJSON ever sees the untyped member map. If such a member's value has the wrong type for the modelled field, unmarshalling fails outright rather than falling back to Extra. encoding/json (v1, the only version this module may use) offers no way to defer that binding.
Specification: §5.9. Authentication Extensions Client Outputs (https://www.w3.org/TR/webauthn-3/#iface-authentication-extensions-client-outputs)
swagger:model AuthenticationExtensionsClientOutputs
func (*AuthenticationExtensionsClientOutputs) ContextValidate ¶
func (m *AuthenticationExtensionsClientOutputs) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validate this authentication extensions client outputs based on the context it is used
func (*AuthenticationExtensionsClientOutputs) MarshalBinary ¶
func (m *AuthenticationExtensionsClientOutputs) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AuthenticationExtensionsClientOutputs) UnmarshalBinary ¶
func (m *AuthenticationExtensionsClientOutputs) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AuthenticationMechanisms ¶
type AuthenticationMechanisms []string
AuthenticationMechanisms authentication mechanisms
swagger:model AuthenticationMechanisms
func (AuthenticationMechanisms) ContextValidate ¶
func (m AuthenticationMechanisms) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this authentication mechanisms based on context it is used
type Authenticator ¶
type Authenticator struct {
// The AAGUID of the authenticator. An AAGUID is defined as an array containing the globally unique
// identifier of the authenticator model being sought.
AAGUID string `json:"AAGUID,omitempty" yaml:"AAGUID,omitempty"`
// attachment
Attachment AuthenticatorAttachment `json:"attachment,omitempty" yaml:"attachment,omitempty"`
// CloneWarning is a signal that the authenticator may be cloned, i.e. at least two copies of the
// credential private key may exist and are being used in parallel. Relying Parties should incorporate
// this information into their risk scoring. Whether the Relying Party updates the stored signature
// counter value in this case, or not, or fails the authentication ceremony or not, is Relying Party-specific.
CloneWarning bool `json:"cloneWarning,omitempty" yaml:"cloneWarning,omitempty"`
// SignCount is a representation of the number of times the Authenticator or Credential have been used to login.
// Upon a new login operation, the Relying Party compares the stored signature counter value with the new SignCount
// value returned in the assertion’s authenticator data. If this new SignCount value is less than or equal to the
// stored value, a cloned authenticator may exist, or the authenticator may be malfunctioning.
SignCount uint32 `json:"signCount,omitempty" yaml:"signCount,omitempty"`
}
Authenticator Authenticator represents a specific authenticator in the context of a Credential.
swagger:model Authenticator
func (*Authenticator) ContextValidate ¶
ContextValidate validate this authenticator based on the context it is used
func (*Authenticator) MarshalBinary ¶
func (m *Authenticator) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Authenticator) UnmarshalBinary ¶
func (m *Authenticator) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AuthenticatorAttachment ¶
type AuthenticatorAttachment string
AuthenticatorAttachment AuthenticatorAttachment represents the IDL enum of the same name, and is used as part of the Authenticator Selection Criteria.
This enumeration’s values describe authenticators' attachment modalities. Relying Parties use this to express a preferred authenticator attachment modality when calling navigator.credentials.create() to create a credential.
If this member is present, eligible authenticators are filtered to only authenticators attached with the specified §5.4.5 Authenticator Attachment Enumeration (enum AuthenticatorAttachment). The value SHOULD be a member of AuthenticatorAttachment but client platforms MUST ignore unknown values, treating an unknown value as if the member does not exist.
Specification: §5.4.4. Authenticator Selection Criteria (https://www.w3.org/TR/webauthn/#dom-authenticatorselectioncriteria-authenticatorattachment)
Specification: §5.4.5. Authenticator Attachment Enumeration (https://www.w3.org/TR/webauthn/#enum-attachment)
swagger:model AuthenticatorAttachment
func (AuthenticatorAttachment) ContextValidate ¶
func (m AuthenticatorAttachment) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this authenticator attachment based on context it is used
type AuthenticatorAttestationResponse ¶
type AuthenticatorAttestationResponse struct {
// attestation object
AttestationObject URLEncodedBase64 `json:"attestationObject,omitempty" yaml:"attestationObject,omitempty"`
// authenticator data
AuthenticatorData URLEncodedBase64 `json:"authenticatorData,omitempty" yaml:"authenticatorData,omitempty"`
// client data JSON
ClientDataJSON URLEncodedBase64 `json:"clientDataJSON,omitempty" yaml:"clientDataJSON,omitempty"`
// public key
PublicKey URLEncodedBase64 `json:"publicKey,omitempty" yaml:"publicKey,omitempty"`
// public key algorithm
PublicKeyAlgorithm int64 `json:"publicKeyAlgorithm,omitempty" yaml:"publicKeyAlgorithm,omitempty"`
// transports
Transports []string `json:"transports" yaml:"transports"`
}
AuthenticatorAttestationResponse AuthenticatorAttestationResponse is the initial unpacked 'response' object received by the relying party. This contains the clientDataJSON object, which will be marshalled into [CollectedClientData], and the 'attestationObject', which contains information about the authenticator, and the newly minted public key credential. The information in both objects are used to verify the authenticity of the ceremony and new credential.
See: https://www.w3.org/TR/webauthn/#typedefdef-publickeycredentialjson
swagger:model AuthenticatorAttestationResponse
func (*AuthenticatorAttestationResponse) ContextValidate ¶
func (m *AuthenticatorAttestationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validate this authenticator attestation response based on the context it is used
func (*AuthenticatorAttestationResponse) MarshalBinary ¶
func (m *AuthenticatorAttestationResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AuthenticatorAttestationResponse) UnmarshalBinary ¶
func (m *AuthenticatorAttestationResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AuthenticatorSelection ¶
type AuthenticatorSelection struct {
// authenticator attachment
AuthenticatorAttachment AuthenticatorAttachment `json:"authenticatorAttachment,omitempty" yaml:"authenticatorAttachment,omitempty"`
// RequireResidentKey this member describes the Relying Party's requirements regarding resident
// credentials. If the parameter is set to true, the authenticator MUST create a client-side-resident
// public key credential source when creating a public key credential.
RequireResidentKey bool `json:"requireResidentKey,omitempty" yaml:"requireResidentKey,omitempty"`
// resident key
ResidentKey ResidentKeyRequirement `json:"residentKey,omitempty" yaml:"residentKey,omitempty"`
// user verification
UserVerification UserVerificationRequirement `json:"userVerification,omitempty" yaml:"userVerification,omitempty"`
}
AuthenticatorSelection AuthenticatorSelection represents the AuthenticatorSelectionCriteria IDL.
WebAuthn Relying Parties may use the AuthenticatorSelectionCriteria dictionary to specify their requirements regarding authenticator attributes.
Specification: §5.4.4. Authenticator Selection Criteria (https://www.w3.org/TR/webauthn/#dictionary-authenticatorSelection)
swagger:model AuthenticatorSelection
func (*AuthenticatorSelection) ContextValidate ¶
func (m *AuthenticatorSelection) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validate this authenticator selection based on the context it is used
func (*AuthenticatorSelection) MarshalBinary ¶
func (m *AuthenticatorSelection) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AuthenticatorSelection) UnmarshalBinary ¶
func (m *AuthenticatorSelection) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AuthenticatorTransport ¶
type AuthenticatorTransport string
AuthenticatorTransport AuthenticatorTransport represents the IDL enum with the same name.
Authenticators may implement various transports for communicating with clients. This enumeration defines hints as to how clients might communicate with a particular authenticator in order to obtain an assertion for a specific credential. Note that these hints represent the WebAuthn Relying Party's best belief as to how an authenticator may be reached. A Relying Party will typically learn of the supported transports for a public key credential via getTransports().
Specification: §5.8.4. Authenticator Transport Enumeration (https://www.w3.org/TR/webauthn/#enumdef-authenticatortransport)
swagger:model AuthenticatorTransport
func (AuthenticatorTransport) ContextValidate ¶
ContextValidate validates this authenticator transport based on context it is used
type COSEAlgorithmIdentifier ¶
type COSEAlgorithmIdentifier int64
COSEAlgorithmIdentifier COSEAlgorithmIdentifier is a number identifying a cryptographic algorithm. The algorithm identifiers SHOULD be values registered in the IANA COSE Algorithms registry [https://www.w3.org/TR/webauthn/#biblio-iana-cose-algs-reg], for instance, -7 for "ES256" and -257 for "RS256".
Specification: §5.8.5. Cryptographic Algorithm Identifier (https://www.w3.org/TR/webauthn/#sctn-alg-identifier)
swagger:model COSEAlgorithmIdentifier
func (COSEAlgorithmIdentifier) ContextValidate ¶
func (m COSEAlgorithmIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this c o s e algorithm identifier based on context it is used
type ChangePassword ¶
type ChangePassword struct {
// new password
// Required: true
NewPassword string `json:"new_password" yaml:"new_password"`
// old password
// Required: true
OldPassword string `json:"old_password" yaml:"old_password"`
}
ChangePassword change password
swagger:model ChangePassword
func (*ChangePassword) ContextValidate ¶
ContextValidate validates this change password based on context it is used
func (*ChangePassword) MarshalBinary ¶
func (m *ChangePassword) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ChangePassword) UnmarshalBinary ¶
func (m *ChangePassword) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ChangeTotpSecret ¶
type ChangeTotpSecret struct {
// new totp secret
// Required: true
NewTotpSecret string `json:"new_totp_secret" yaml:"new_totp_secret"`
// totp
// Required: true
Totp string `json:"totp" yaml:"totp"`
}
ChangeTotpSecret change totp secret
swagger:model ChangeTotpSecret
func (*ChangeTotpSecret) ContextValidate ¶
ContextValidate validates this change totp secret based on context it is used
func (*ChangeTotpSecret) MarshalBinary ¶
func (m *ChangeTotpSecret) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ChangeTotpSecret) UnmarshalBinary ¶
func (m *ChangeTotpSecret) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CompleteAddressVerification ¶
type CompleteAddressVerification struct {
// address
// Example: sample@email.com/+48123456789
// Required: true
Address string `json:"address" yaml:"address"`
// code
// Required: true
Code string `json:"code" yaml:"code"`
}
CompleteAddressVerification complete address verification
swagger:model CompleteAddressVerification
func (*CompleteAddressVerification) ContextValidate ¶
func (m *CompleteAddressVerification) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this complete address verification based on context it is used
func (*CompleteAddressVerification) MarshalBinary ¶
func (m *CompleteAddressVerification) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CompleteAddressVerification) UnmarshalBinary ¶
func (m *CompleteAddressVerification) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ConveyancePreference ¶
type ConveyancePreference string
ConveyancePreference ConveyancePreference is the type representing the AttestationConveyancePreference IDL.
WebAuthn Relying Parties may use AttestationConveyancePreference to specify their preference regarding attestation conveyance during credential generation.
Specification: §5.4.7. Attestation Conveyance Preference Enumeration (https://www.w3.org/TR/webauthn/#enum-attestation-convey)
swagger:model ConveyancePreference
func (ConveyancePreference) ContextValidate ¶
ContextValidate validates this conveyance preference based on context it is used
type Credential ¶
type Credential struct {
// attestation
Attestation *CredentialAttestation `json:"attestation,omitempty" yaml:"attestation,omitempty"`
// AttestationFormat is the attestation statement format identifier ("packed", "tpm", "android-key",
// "android-safetynet", "fido-u2f", "apple", "compound", "none"); see §8 of the WebAuthn specification and
// the AttestationFormat constants in the protocol package.
AttestationFormat string `json:"attestationFormat,omitempty" yaml:"attestationFormat,omitempty"`
// AttestationType is the attestation type as conveyed by the authenticator during the registration ceremonyl
// one of the values defined by [metadata.AuthenticatorAttestationType] ("basic_full", "basic_surrogate",
// "attca", "anonca", "ecdaa", "none"). Prior releases incorrectly stored the attestation FORMAT here; see the
// custom [Credential.UnmarshalJSON] for the backward-compatibility migration applied when decoding such
// records.
AttestationType string `json:"attestationType,omitempty" yaml:"attestationType,omitempty"`
// authenticator
Authenticator *Authenticator `json:"authenticator,omitempty" yaml:"authenticator,omitempty"`
// extensions
Extensions *CredentialExtensions `json:"extensions,omitempty" yaml:"extensions,omitempty"`
// flags
Flags *CredentialFlags `json:"flags,omitempty" yaml:"flags,omitempty"`
// The ID is the ID of the public key credential source. Described by the Credential Record 'id' field.
ID string `json:"id,omitempty" yaml:"id,omitempty"`
// The credential public key of the public key credential source. Described by the Credential Record 'publicKey'
// field.
PublicKey string `json:"publicKey,omitempty" yaml:"publicKey,omitempty"`
// Transport types the authenticator supports. Described by the Credential Record 'transports' field.
Transport []AuthenticatorTransport `json:"transport" yaml:"transport"`
}
Credential Credential contains all needed information about a WebAuthn credential for storage. This struct is effectively the Credential Record as described in the specification.
Provided this data structure is preserved properly, a Credential can be verified against the FIDO Metadata Service at a later date using the [Credential.Verify] method with a [metadata.Provider].
It is strongly recommended for the best security that a Credential is encrypted at rest with the exception of the ID and the value you use to lookup the user. This prevents a person with access to the database being able to compromise privacy by being able to view this data, as well as prevents them being able to compromise security by adding or modifying a Credential without them also having access to the encryption key.
For consolidated persistence guidance; recommended schema shape, required lookup columns, and which fields must be written back on every successful FinishLogin / ValidateLogin; see the Storage section of the github.com/go-webauthn/webauthn/webauthn package documentation.
See: §4. Terminology: Credential Record (https://www.w3.org/TR/webauthn-3/#credential-record)
swagger:model Credential
func (*Credential) ContextValidate ¶
ContextValidate validate this credential based on the context it is used
func (*Credential) MarshalBinary ¶
func (m *Credential) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Credential) UnmarshalBinary ¶
func (m *Credential) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CredentialAttestation ¶
type CredentialAttestation struct {
// AuthenticatorData is the raw authenticator data from the registration response as provided in the
// RegistrationResponseJSON. This is the unparsed byte representation that can be re-parsed for future validation.
AuthenticatorData string `json:"authenticatorData,omitempty" yaml:"authenticatorData,omitempty"`
// ClientDataHash is the SHA-256 hash of ClientDataJSON computed during registration verification. If empty,
// [Credential.Verify] will recompute it from ClientDataJSON.
ClientDataHash string `json:"clientDataHash,omitempty" yaml:"clientDataHash,omitempty"`
// ClientDataJSON is the raw JSON-encoded client data from the registration response. This is the verbatim value
// provided by the client and is used to recompute the client data hash during later verification.
ClientDataJSON string `json:"clientDataJSON,omitempty" yaml:"clientDataJSON,omitempty"`
// Object is the raw CBOR-encoded attestation object from the registration response. This contains the attestation
// statement, format, and authenticator data needed by [Credential.Verify] to re-perform attestation verification.
Object string `json:"object,omitempty" yaml:"object,omitempty"`
// PublicKeyAlgorithm is the COSE algorithm identifier for the credential's public key.
PublicKeyAlgorithm int64 `json:"publicKeyAlgorithm,omitempty" yaml:"publicKeyAlgorithm,omitempty"`
}
CredentialAttestation CredentialAttestation holds the raw attestation data from a registration ceremony. These values are intentionally stored in their original unparsed form rather than as parsed structures. This is critical because:
It enables the Credential to be verified against the FIDO Metadata Service at a later date using [Credential.Verify], even long after the registration ceremony has completed. The WebAuthn specification evolves over time, introducing new validation procedures. Preserving the raw data ensures that credentials created today can be re-validated against future rules without requiring re-registration. Raw data serves as an auditable record of exactly what the authenticator and client provided during registration, independent of how the library parsed it at that point in time.
Implementers MUST persist all fields of this struct.
swagger:model CredentialAttestation
func (*CredentialAttestation) ContextValidate ¶
ContextValidate validates this credential attestation based on context it is used
func (*CredentialAttestation) MarshalBinary ¶
func (m *CredentialAttestation) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CredentialAttestation) UnmarshalBinary ¶
func (m *CredentialAttestation) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CredentialCreation ¶
type CredentialCreation struct {
// mediation
Mediation CredentialMediationRequirement `json:"mediation,omitempty" yaml:"mediation,omitempty"`
// public key
PublicKey *PublicKeyCredentialCreationOptions `json:"publicKey,omitempty" yaml:"publicKey,omitempty"`
}
CredentialCreation CredentialCreation is the top-level request object for credential registration. It wraps PublicKeyCredentialCreationOptions and an optional mediation requirement. This is the object that should be serialized and sent to the client to initiate the navigator.credentials.create() call.
Specification: §5.4. Options for Credential Creation (https://www.w3.org/TR/webauthn/#dictionary-makecredentialoptions)
swagger:model CredentialCreation
func (*CredentialCreation) ContextValidate ¶
ContextValidate validate this credential creation based on the context it is used
func (*CredentialCreation) MarshalBinary ¶
func (m *CredentialCreation) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CredentialCreation) UnmarshalBinary ¶
func (m *CredentialCreation) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CredentialCreationResponse ¶
type CredentialCreationResponse struct {
// authenticator attachment
AuthenticatorAttachment string `json:"authenticatorAttachment,omitempty" yaml:"authenticatorAttachment,omitempty"`
// client extension results
ClientExtensionResults *AuthenticationExtensionsClientOutputs `json:"clientExtensionResults,omitempty" yaml:"clientExtensionResults,omitempty"`
// ID is The credential’s identifier. The requirements for the
// identifier are distinct for each type of credential. It might
// represent a username for username/password tuples, for example.
// Required: true
ID string `json:"id" yaml:"id"`
// raw Id
// Required: true
RawID *URLEncodedBase64 `json:"rawId" yaml:"rawId"`
// response
// Required: true
Response *AuthenticatorAttestationResponse `json:"response" yaml:"response"`
// Type is the value of the object’s interface object's [[type]] slot,
// which specifies the credential type represented by this object.
// This should be type "public-key" for Webauthn credentials.
// Required: true
Type string `json:"type" yaml:"type"`
}
CredentialCreationResponse CredentialCreationResponse is the raw response returned to the Relying Party from the client for a credential registration ceremony. It contains the AuthenticatorAttestationResponse which holds the attestation object and client data.
Specification: §5.4. Options for Credential Creation (https://www.w3.org/TR/webauthn/#sctn-credentialcreationoptions-extension)
swagger:model CredentialCreationResponse
func (*CredentialCreationResponse) ContextValidate ¶
func (m *CredentialCreationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validate this credential creation response based on the context it is used
func (*CredentialCreationResponse) MarshalBinary ¶
func (m *CredentialCreationResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CredentialCreationResponse) UnmarshalBinary ¶
func (m *CredentialCreationResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CredentialDescriptor ¶
type CredentialDescriptor struct {
// id
ID URLEncodedBase64 `json:"id,omitempty" yaml:"id,omitempty"`
// The authenticator transports that can be used.
Transports []AuthenticatorTransport `json:"transports" yaml:"transports"`
// type
Type CredentialType `json:"type,omitempty" yaml:"type,omitempty"`
}
CredentialDescriptor CredentialDescriptor represents the PublicKeyCredentialDescriptor IDL.
This dictionary contains the attributes that are specified by a caller when referring to a public key credential as an input parameter to the create() or get() methods. It mirrors the fields of the PublicKeyCredential object returned by the latter methods.
Specification: §5.10.3. Credential Descriptor (https://www.w3.org/TR/webauthn/#credential-dictionary)
swagger:model CredentialDescriptor
func (*CredentialDescriptor) ContextValidate ¶
ContextValidate validate this credential descriptor based on the context it is used
func (*CredentialDescriptor) MarshalBinary ¶
func (m *CredentialDescriptor) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CredentialDescriptor) UnmarshalBinary ¶
func (m *CredentialDescriptor) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CredentialExtensions ¶
type CredentialExtensions struct {
// CredBlobSet reports whether the blob submitted with [WithExtensionCredBlob] at registration was stored by
// the authenticator, which is what determines whether requesting [WithExtensionGetCredBlob] at authentication
// can return anything.
CredBlobSet bool `json:"credBlobSet,omitempty" yaml:"credBlobSet,omitempty"`
// cred protect
CredProtect CredentialProtectionPolicy `json:"credProtect,omitempty" yaml:"credProtect,omitempty"`
// HMACSecret reports whether the authenticator provisioned a CTAP hmac-secret for this credential, which is
// what determines whether requesting [WithExtensionHMACGetSecret] at authentication can succeed.
//
// The value is taken from the authenticator extension outputs where present, because those are covered by the
// attestation signature, and from the client's 'hmacCreateSecret' output otherwise. The two are the signed and
// client-reported views of one capability rather than two separate properties, so they share a field.
//
// This is a sibling of PRFEnabled rather than a duplicate of it: the pseudo-random function extension is the
// WebAuthn level abstraction over the same authenticator capability, and a client may report either, both, or
// neither depending on which extension the Relying Party requested.
HmacSecret bool `json:"hmacSecret,omitempty" yaml:"hmacSecret,omitempty"`
// LargeBlobSupported reports whether the credential supports large blob storage.
LargeBlobSupported bool `json:"largeBlobSupported,omitempty" yaml:"largeBlobSupported,omitempty"`
// MinPinLength is the authenticator's minimum PIN length at the time of registration.
MinPinLength uint64 `json:"minPinLength,omitempty" yaml:"minPinLength,omitempty"`
// PRFEnabled reports whether the pseudo-random function is available for this credential. It is populated when
// the registration requested the extension, typically with [WithExtensionPRFSupport].
PrfEnabled bool `json:"prfEnabled,omitempty" yaml:"prfEnabled,omitempty"`
// RK reports whether the credential is client-side discoverable, from the credProps extension. A false value
// is meaningful and distinct from the client not reporting the property.
Rk bool `json:"rk,omitempty" yaml:"rk,omitempty"`
}
CredentialExtensions CredentialExtensions holds the extension results recorded at registration which remain meaningful for the life of the credential.
swagger:model CredentialExtensions
func (*CredentialExtensions) ContextValidate ¶
ContextValidate validate this credential extensions based on the context it is used
func (*CredentialExtensions) MarshalBinary ¶
func (m *CredentialExtensions) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CredentialExtensions) UnmarshalBinary ¶
func (m *CredentialExtensions) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CredentialFlags ¶
type CredentialFlags struct {
// Flag BE indicates the credential is able to be backed up and/or sync'd between devices. This should NEVER change.
BackupEligible bool `json:"backupEligible,omitempty" yaml:"backupEligible,omitempty"`
// Flag BS indicates the credential has been backed up and/or sync'd. This value can change but it's recommended
// that RP's keep track of this value.
BackupState bool `json:"backupState,omitempty" yaml:"backupState,omitempty"`
// Flag UP indicates the users presence.
UserPresent bool `json:"userPresent,omitempty" yaml:"userPresent,omitempty"`
// Flag UV indicates the user performed verification. On a credential record this is the uvInitialized value
// of the specification, which is latched: once an assertion has verified the user it stays true, because
// [CredentialFlags.Update] only advances it. Read the UV flag of a ceremony's own authenticator data to
// determine whether that ceremony verified the user.
UserVerified bool `json:"userVerified,omitempty" yaml:"userVerified,omitempty"`
}
CredentialFlags CredentialFlags contains the boolean flags derived from the authenticator data during registration or login.
These flags indicate the state of user presence, user verification, and backup eligibility/state at the time the credential was used.
swagger:model CredentialFlags
func (*CredentialFlags) ContextValidate ¶
ContextValidate validates this credential flags based on context it is used
func (*CredentialFlags) MarshalBinary ¶
func (m *CredentialFlags) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CredentialFlags) UnmarshalBinary ¶
func (m *CredentialFlags) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CredentialMediationRequirement ¶
type CredentialMediationRequirement string
CredentialMediationRequirement CredentialMediationRequirement represents mediation requirements for clients. When making a request via get(options) or create(options), developers can set a case-by-case requirement for user mediation by choosing the appropriate CredentialMediationRequirement enum value.
See https://www.w3.org/TR/credential-management-1/#mediation-requirements
swagger:model CredentialMediationRequirement
func (CredentialMediationRequirement) ContextValidate ¶
func (m CredentialMediationRequirement) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this credential mediation requirement based on context it is used
type CredentialParameter ¶
type CredentialParameter struct {
// alg
Alg COSEAlgorithmIdentifier `json:"alg,omitempty" yaml:"alg,omitempty"`
// type
Type CredentialType `json:"type,omitempty" yaml:"type,omitempty"`
}
CredentialParameter CredentialParameter is the credential type and algorithm that the relying party wants the authenticator to create.
swagger:model CredentialParameter
func (*CredentialParameter) ContextValidate ¶
ContextValidate validate this credential parameter based on the context it is used
func (*CredentialParameter) MarshalBinary ¶
func (m *CredentialParameter) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CredentialParameter) UnmarshalBinary ¶
func (m *CredentialParameter) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CredentialPropertiesOutput ¶
type CredentialPropertiesOutput struct {
// RK reports whether the created credential is a client-side discoverable credential. A false value is
// meaningful and distinct from the client not reporting the property at all.
Rk bool `json:"rk,omitempty" yaml:"rk,omitempty"`
}
CredentialPropertiesOutput CredentialPropertiesOutput represents the CredentialPropertiesOutput IDL. The editor's draft defines no member other than rk.
Specification: §10.1.3. Credential Properties Extension (https://www.w3.org/TR/webauthn-3/#sctn-authenticator-credential-properties-extension)
swagger:model CredentialPropertiesOutput
func (*CredentialPropertiesOutput) ContextValidate ¶
func (m *CredentialPropertiesOutput) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this credential properties output based on context it is used
func (*CredentialPropertiesOutput) MarshalBinary ¶
func (m *CredentialPropertiesOutput) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CredentialPropertiesOutput) UnmarshalBinary ¶
func (m *CredentialPropertiesOutput) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CredentialProtectionPolicy ¶
type CredentialProtectionPolicy string
CredentialProtectionPolicy CredentialProtectionPolicy represents the credential protection policy values of the CTAP credProtect extension.
Registry: https://www.iana.org/assignments/webauthn/webauthn.xhtml
swagger:model CredentialProtectionPolicy
func (CredentialProtectionPolicy) ContextValidate ¶
func (m CredentialProtectionPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this credential protection policy based on context it is used
type CredentialType ¶
type CredentialType string
CredentialType CredentialType represents the PublicKeyCredentialType IDL and is used with the CredentialDescriptor IDL.
This enumeration defines the valid credential types. It is an extension point; values can be added to it in the future, as more credential types are defined. The values of this enumeration are used for versioning the Authentication Assertion and attestation structures according to the type of the authenticator.
Currently one credential type is defined, namely "public-key".
Specification: §5.8.2. Credential Type Enumeration (https://www.w3.org/TR/webauthn/#enumdef-publickeycredentialtype)
Specification: §5.8.3. Credential Descriptor (https://www.w3.org/TR/webauthn/#dictionary-credential-descriptor)
swagger:model CredentialType
func (CredentialType) ContextValidate ¶
ContextValidate validates this credential type based on context it is used
type Error ¶
type Error struct {
// details
Details interface{} `json:"details,omitempty" yaml:"details,omitempty"`
// error
Error string `json:"error,omitempty" yaml:"error,omitempty"`
// error code
ErrorCode string `json:"error_code,omitempty" yaml:"error_code,omitempty"`
// status code
StatusCode int64 `json:"status_code,omitempty" yaml:"status_code,omitempty"`
}
Error HTTP error response
swagger:model Error
func (*Error) ContextValidate ¶
ContextValidate validates this error based on context it is used
func (*Error) MarshalBinary ¶
MarshalBinary interface implementation
func (*Error) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type FederatedAccount ¶
type FederatedAccount struct {
// federated idp id
FederatedIdpID string `json:"federated_idp_id,omitempty" yaml:"federated_idp_id,omitempty"`
// federated idp method
FederatedIdpMethod string `json:"federated_idp_method,omitempty" yaml:"federated_idp_method,omitempty"`
// federated idp name
FederatedIdpName string `json:"federated_idp_name,omitempty" yaml:"federated_idp_name,omitempty"`
// federated sub
FederatedSub string `json:"federated_sub,omitempty" yaml:"federated_sub,omitempty"`
// identifier id
IdentifierID string `json:"identifier_id,omitempty" yaml:"identifier_id,omitempty"`
// workspace id
WorkspaceID string `json:"workspace_id,omitempty" yaml:"workspace_id,omitempty"`
}
FederatedAccount federated account
swagger:model FederatedAccount
func (*FederatedAccount) ContextValidate ¶
ContextValidate validates this federated account based on context it is used
func (*FederatedAccount) MarshalBinary ¶
func (m *FederatedAccount) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*FederatedAccount) UnmarshalBinary ¶
func (m *FederatedAccount) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type HMACGetSecretInputs ¶
type HMACGetSecretInputs struct {
// salt1
Salt1 URLEncodedBase64 `json:"salt1,omitempty" yaml:"salt1,omitempty"`
// salt2
Salt2 URLEncodedBase64 `json:"salt2,omitempty" yaml:"salt2,omitempty"`
}
HMACGetSecretInputs HMACGetSecretInputs represents the inputs of the CTAP hmac-secret extension during authentication.
Registry: https://www.iana.org/assignments/webauthn/webauthn.xhtml
swagger:model HMACGetSecretInputs
func (*HMACGetSecretInputs) ContextValidate ¶
ContextValidate validate this h m a c get secret inputs based on the context it is used
func (*HMACGetSecretInputs) MarshalBinary ¶
func (m *HMACGetSecretInputs) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*HMACGetSecretInputs) UnmarshalBinary ¶
func (m *HMACGetSecretInputs) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type HMACGetSecretOutputs ¶
type HMACGetSecretOutputs struct {
// output1
Output1 URLEncodedBase64 `json:"output1,omitempty" yaml:"output1,omitempty"`
// output2
Output2 URLEncodedBase64 `json:"output2,omitempty" yaml:"output2,omitempty"`
}
HMACGetSecretOutputs HMACGetSecretOutputs represents the outputs of the CTAP hmac-secret extension during authentication.
Registry: https://www.iana.org/assignments/webauthn/webauthn.xhtml
swagger:model HMACGetSecretOutputs
func (*HMACGetSecretOutputs) ContextValidate ¶
ContextValidate validate this h m a c get secret outputs based on the context it is used
func (*HMACGetSecretOutputs) MarshalBinary ¶
func (m *HMACGetSecretOutputs) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*HMACGetSecretOutputs) UnmarshalBinary ¶
func (m *HMACGetSecretOutputs) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type LargeBlobInputs ¶
type LargeBlobInputs struct {
// read
Read bool `json:"read,omitempty" yaml:"read,omitempty"`
// support
Support LargeBlobSupport `json:"support,omitempty" yaml:"support,omitempty"`
// write
Write URLEncodedBase64 `json:"write,omitempty" yaml:"write,omitempty"`
}
LargeBlobInputs LargeBlobInputs represents the AuthenticationExtensionsLargeBlobInputsJSON IDL. Support is only valid during registration; Read and Write are only valid during authentication and are mutually exclusive.
Specification: §10.1.5. Large blob storage extension (https://www.w3.org/TR/webauthn-3/#sctn-large-blob-extension)
swagger:model LargeBlobInputs
func (*LargeBlobInputs) ContextValidate ¶
ContextValidate validate this large blob inputs based on the context it is used
func (*LargeBlobInputs) MarshalBinary ¶
func (m *LargeBlobInputs) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*LargeBlobInputs) UnmarshalBinary ¶
func (m *LargeBlobInputs) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type LargeBlobOutputs ¶
type LargeBlobOutputs struct {
// blob
Blob URLEncodedBase64 `json:"blob,omitempty" yaml:"blob,omitempty"`
// Supported reports whether the created credential supports large blob storage. It is only present at
// registration, in answer to the 'support' input. A false value is meaningful and distinct from the client
// not reporting support at all; [AuthenticationExtensionsClientOutputs.Verify] rejects both when support was
// requested as required.
Supported bool `json:"supported,omitempty" yaml:"supported,omitempty"`
// Written reports whether the blob supplied by a 'write' input was stored. A false value is meaningful and
// distinct from the client not reporting the outcome at all.
Written bool `json:"written,omitempty" yaml:"written,omitempty"`
}
LargeBlobOutputs LargeBlobOutputs represents the AuthenticationExtensionsLargeBlobOutputsJSON IDL.
Specification: §10.1.5. Large blob storage extension (https://www.w3.org/TR/webauthn-3/#sctn-large-blob-extension)
swagger:model LargeBlobOutputs
func (*LargeBlobOutputs) ContextValidate ¶
ContextValidate validate this large blob outputs based on the context it is used
func (*LargeBlobOutputs) MarshalBinary ¶
func (m *LargeBlobOutputs) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*LargeBlobOutputs) UnmarshalBinary ¶
func (m *LargeBlobOutputs) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type LargeBlobSupport ¶
type LargeBlobSupport string
LargeBlobSupport LargeBlobSupport represents the LargeBlobSupport IDL enumeration used by the large blob storage extension during registration.
Specification: §10.1.5. Large blob storage extension (https://www.w3.org/TR/webauthn-3/#sctn-large-blob-extension)
swagger:model LargeBlobSupport
func (LargeBlobSupport) ContextValidate ¶
ContextValidate validates this large blob support based on context it is used
type ListUserMFASessions ¶
type ListUserMFASessions struct {
// sessions
Sessions []*UserMFASession `json:"sessions" yaml:"sessions"`
}
ListUserMFASessions list user m f a sessions
swagger:model ListUserMFASessions
func (*ListUserMFASessions) ContextValidate ¶
ContextValidate validate this list user m f a sessions based on the context it is used
func (*ListUserMFASessions) MarshalBinary ¶
func (m *ListUserMFASessions) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ListUserMFASessions) UnmarshalBinary ¶
func (m *ListUserMFASessions) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type MFAPreferences ¶
type MFAPreferences struct {
// preferred 2fa
// Enum: ["totp","password","otp","email_otp","sms_otp","voice_otp","webauthn","usernameless_webauthn","push","symbol","qr_code"]
Preferred2fa string `json:"preferred_2fa,omitempty" yaml:"preferred_2fa,omitempty"`
}
MFAPreferences m f a preferences
swagger:model MFAPreferences
func (*MFAPreferences) ContextValidate ¶
ContextValidate validates this m f a preferences based on context it is used
func (*MFAPreferences) MarshalBinary ¶
func (m *MFAPreferences) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MFAPreferences) UnmarshalBinary ¶
func (m *MFAPreferences) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type NameWebAuthnKey ¶
type NameWebAuthnKey struct {
// name
// Required: true
Name string `json:"name" yaml:"name"`
}
NameWebAuthnKey name web authn key
swagger:model NameWebAuthnKey
func (*NameWebAuthnKey) ContextValidate ¶
ContextValidate validates this name web authn key based on context it is used
func (*NameWebAuthnKey) MarshalBinary ¶
func (m *NameWebAuthnKey) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*NameWebAuthnKey) UnmarshalBinary ¶
func (m *NameWebAuthnKey) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PRFInputs ¶
type PRFInputs struct {
// eval
Eval *PRFValues `json:"eval,omitempty" yaml:"eval,omitempty"`
// eval by credential
EvalByCredential map[string]PRFValues `json:"evalByCredential,omitempty" yaml:"evalByCredential,omitempty"`
}
PRFInputs PRFInputs represents the AuthenticationExtensionsPRFInputsJSON IDL.
Every member is optional. A zero value is the bare availability probe, i.e. the "prf":{} input a Relying Party sends at registration to learn whether the pseudo-random function is available for the credential; the client answers with the 'enabled' output. This is why [AuthenticationExtensions.PRF] is a pointer while its LargeBlobInputs and HMACGetSecretInputs siblings are not.
EvalByCredential is only valid during authentication; the client throws a NotSupportedError when it is present during registration. Its keys are base64url encoded credential IDs which MUST each match an entry of the allowed credentials.
Specification: §10.1.4. Pseudo-random function extension (https://www.w3.org/TR/webauthn-3/#prf-extension)
swagger:model PRFInputs
func (*PRFInputs) ContextValidate ¶
ContextValidate validate this p r f inputs based on the context it is used
func (*PRFInputs) MarshalBinary ¶
MarshalBinary interface implementation
func (*PRFInputs) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type PRFOutputs ¶
type PRFOutputs struct {
// Enabled reports whether the pseudo-random function is available for the credential. It is the answer to the
// bare "prf":{} input a Relying Party sends at registration. A false value is meaningful and distinct from
// the client not reporting availability at all.
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
// results
Results *PRFValues `json:"results,omitempty" yaml:"results,omitempty"`
}
PRFOutputs PRFOutputs represents the AuthenticationExtensionsPRFOutputsJSON IDL.
Specification: §10.1.4. Pseudo-random function extension (https://www.w3.org/TR/webauthn-3/#prf-extension)
swagger:model PRFOutputs
func (*PRFOutputs) ContextValidate ¶
ContextValidate validate this p r f outputs based on the context it is used
func (*PRFOutputs) MarshalBinary ¶
func (m *PRFOutputs) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PRFOutputs) UnmarshalBinary ¶
func (m *PRFOutputs) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PRFValues ¶
type PRFValues struct {
// first
First URLEncodedBase64 `json:"first,omitempty" yaml:"first,omitempty"`
// second
Second URLEncodedBase64 `json:"second,omitempty" yaml:"second,omitempty"`
}
PRFValues PRFValues represents the AuthenticationExtensionsPRFValuesJSON IDL. The byte values are conveyed to the client base64url encoded.
Specification: §10.1.4. Pseudo-random function extension (https://www.w3.org/TR/webauthn-3/#prf-extension)
swagger:model PRFValues
func (*PRFValues) ContextValidate ¶
ContextValidate validate this p r f values based on the context it is used
func (*PRFValues) MarshalBinary ¶
MarshalBinary interface implementation
func (*PRFValues) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type PublicKeyCredentialCreationOptions ¶
type PublicKeyCredentialCreationOptions struct {
// attestation
Attestation ConveyancePreference `json:"attestation,omitempty" yaml:"attestation,omitempty"`
// attestation formats
AttestationFormats []AttestationFormat `json:"attestationFormats" yaml:"attestationFormats"`
// authenticator selection
AuthenticatorSelection *AuthenticatorSelection `json:"authenticatorSelection,omitempty" yaml:"authenticatorSelection,omitempty"`
// challenge
Challenge URLEncodedBase64 `json:"challenge,omitempty" yaml:"challenge,omitempty"`
// exclude credentials
ExcludeCredentials []*CredentialDescriptor `json:"excludeCredentials" yaml:"excludeCredentials"`
// extensions
Extensions *AuthenticationExtensions `json:"extensions,omitempty" yaml:"extensions,omitempty"`
// hints
Hints []PublicKeyCredentialHints `json:"hints" yaml:"hints"`
// pub key cred params
PubKeyCredParams []*CredentialParameter `json:"pubKeyCredParams" yaml:"pubKeyCredParams"`
// rp
Rp *RelyingPartyEntity `json:"rp,omitempty" yaml:"rp,omitempty"`
// timeout
Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"`
// user
User *UserEntity `json:"user,omitempty" yaml:"user,omitempty"`
}
PublicKeyCredentialCreationOptions PublicKeyCredentialCreationOptions represents the IDL of the same name.
In order to create a Credential via create(), the caller specifies a few parameters in a PublicKeyCredentialCreationOptions object.
WebAuthn Level 3: hints,attestationFormats.
Specification: §5.4. Options for Credential Creation (https://www.w3.org/TR/webauthn/#dictionary-makecredentialoptions)
swagger:model PublicKeyCredentialCreationOptions
func (*PublicKeyCredentialCreationOptions) ContextValidate ¶
func (m *PublicKeyCredentialCreationOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validate this public key credential creation options based on the context it is used
func (*PublicKeyCredentialCreationOptions) MarshalBinary ¶
func (m *PublicKeyCredentialCreationOptions) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PublicKeyCredentialCreationOptions) UnmarshalBinary ¶
func (m *PublicKeyCredentialCreationOptions) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PublicKeyCredentialHints ¶
type PublicKeyCredentialHints string
PublicKeyCredentialHints PublicKeyCredentialHints represents an entry of the hints member, which conveys the Relying Party's belief about how the user will satisfy the request, in descending order of preference.
The IDL types the hints member as a sequence of strings rather than as this enumeration, and requires clients to ignore values they do not recognise, so values are deliberately not validated against the constants below: a Relying Party may send a hint ratified after this release, or one a particular user agent understands. Clients also ignore the second and later appearances of a repeated hint.
Hints may contradict the authenticator attachment and the transports of the allowed credentials. Where they do, a client which implements hints gives the hints precedence; see [PublicKeyCredentialHints.AuthenticatorAttachment] for how a registration ceremony pairs the two for the benefit of clients which do not.
WebAuthn Level 3.
Specification: §5.8.7. User-agent Hints Enumeration (https://www.w3.org/TR/webauthn-3/#enum-hints)
swagger:model PublicKeyCredentialHints
func (PublicKeyCredentialHints) ContextValidate ¶
func (m PublicKeyCredentialHints) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this public key credential hints based on context it is used
type RelyingPartyEntity ¶
type RelyingPartyEntity struct {
// A unique identifier for the Relying Party entity, which sets the RP ID.
ID string `json:"id,omitempty" yaml:"id,omitempty"`
// A human-palatable name for the entity. Its function depends on what the PublicKeyCredentialEntity represents:
//
// When inherited by PublicKeyCredentialRpEntity it is a human-palatable identifier for the Relying Party,
// intended only for display. For example, "ACME Corporation", "Wonderful Widgets, Inc." or "ОАО Примертех".
//
// When inherited by PublicKeyCredentialUserEntity, it is a human-palatable identifier for a user account. It is
// intended only for display, i.e., aiding the user in determining the difference between user accounts with similar
// displayNames. For example, "alexm", "alex.p.mueller@example.com" or "+14255551234".
Name string `json:"name,omitempty" yaml:"name,omitempty"`
}
RelyingPartyEntity The RelyingPartyEntity represents the PublicKeyCredentialRpEntity IDL and is used to supply additional Relying Party attributes when creating a new credential.
Specification: §5.4.2. Relying Party Parameters for Credential Generation (https://www.w3.org/TR/webauthn/#dictionary-rp-credential-params)
swagger:model RelyingPartyEntity
func (*RelyingPartyEntity) ContextValidate ¶
ContextValidate validates this relying party entity based on context it is used
func (*RelyingPartyEntity) MarshalBinary ¶
func (m *RelyingPartyEntity) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*RelyingPartyEntity) UnmarshalBinary ¶
func (m *RelyingPartyEntity) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ResetPasswordConfirm ¶
type ResetPasswordConfirm struct {
// code
// Required: true
Code string `json:"code" yaml:"code"`
// identifier
Identifier string `json:"identifier,omitempty" yaml:"identifier,omitempty"`
// new password
// Required: true
NewPassword string `json:"new_password" yaml:"new_password"`
}
ResetPasswordConfirm reset password confirm
swagger:model ResetPasswordConfirm
func (*ResetPasswordConfirm) ContextValidate ¶
ContextValidate validates this reset password confirm based on context it is used
func (*ResetPasswordConfirm) MarshalBinary ¶
func (m *ResetPasswordConfirm) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ResetPasswordConfirm) UnmarshalBinary ¶
func (m *ResetPasswordConfirm) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ResidentKeyRequirement ¶
type ResidentKeyRequirement string
ResidentKeyRequirement ResidentKeyRequirement represents the IDL of the same name.
This enumeration’s values describe the Relying Party's requirements for client-side discoverable credentials (formerly known as resident credentials or resident keys).
Specifies the extent to which the Relying Party desires to create a client-side discoverable credential. For historical reasons the naming retains the deprecated “resident” terminology. The value SHOULD be a member of ResidentKeyRequirement but client platforms MUST ignore unknown values, treating an unknown value as if the member does not exist. If no value is given then the effective value is required if requireResidentKey is true or discouraged if it is false or absent.
Specification: §5.4.4. Authenticator Selection Criteria (https://www.w3.org/TR/webauthn/#dom-authenticatorselectioncriteria-residentkey)
Specification: §5.4.6. Resident Key Requirement Enumeration (https://www.w3.org/TR/webauthn/#enumdef-residentkeyrequirement)
swagger:model ResidentKeyRequirement
func (ResidentKeyRequirement) ContextValidate ¶
ContextValidate validates this resident key requirement based on context it is used
type SelfUserCredentials ¶
type SelfUserCredentials struct {
// expires after
// Format: duration
ExpiresAfter strfmt.Duration `json:"expires_after,omitempty" yaml:"expires_after,omitempty"`
// expires at
// Format: date-time
ExpiresAt strfmt.DateTime `json:"expires_at,omitempty" yaml:"expires_at,omitempty"`
// id
ID string `json:"id,omitempty" yaml:"id,omitempty"`
// some credentials might have name - like passkeys
Name string `json:"name,omitempty" yaml:"name,omitempty"`
// state
// Enum: ["valid","must_be_reset","must_be_changed"]
State string `json:"state,omitempty" yaml:"state,omitempty"`
// type
// Example: password
// Required: true
// Enum: ["password","webauthn","totp","device"]
Type string `json:"type" yaml:"type"`
// updated at
// Required: true
// Format: date-time
UpdatedAt strfmt.DateTime `json:"updated_at" yaml:"updated_at"`
// webauthn type
// Enum: ["regular","discoverable"]
WebauthnType string `json:"webauthn_type,omitempty" yaml:"webauthn_type,omitempty"`
}
SelfUserCredentials self user credentials
swagger:model SelfUserCredentials
func (*SelfUserCredentials) ContextValidate ¶
ContextValidate validates this self user credentials based on context it is used
func (*SelfUserCredentials) MarshalBinary ¶
func (m *SelfUserCredentials) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SelfUserCredentials) UnmarshalBinary ¶
func (m *SelfUserCredentials) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SelfUserIdentifier ¶
type SelfUserIdentifier struct {
// created at
// Required: true
// Format: date-time
CreatedAt strfmt.DateTime `json:"created_at" yaml:"created_at"`
// identifier
// Required: true
Identifier string `json:"identifier" yaml:"identifier"`
// type
// Example: email
// Required: true
// Enum: ["email","mobile","uid","external","federated"]
Type string `json:"type" yaml:"type"`
}
SelfUserIdentifier self user identifier
swagger:model SelfUserIdentifier
func (*SelfUserIdentifier) ContextValidate ¶
ContextValidate validates this self user identifier based on context it is used
func (*SelfUserIdentifier) MarshalBinary ¶
func (m *SelfUserIdentifier) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SelfUserIdentifier) UnmarshalBinary ¶
func (m *SelfUserIdentifier) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SelfUserUpdate ¶
type SelfUserUpdate struct {
// payload
Payload map[string]interface{} `json:"payload,omitempty" yaml:"payload,omitempty"`
// preferences
Preferences *UserPreferences `json:"preferences,omitempty" yaml:"preferences,omitempty"`
}
SelfUserUpdate self user update
swagger:model SelfUserUpdate
func (*SelfUserUpdate) ContextValidate ¶
ContextValidate validate this self user update based on the context it is used
func (*SelfUserUpdate) MarshalBinary ¶
func (m *SelfUserUpdate) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SelfUserUpdate) UnmarshalBinary ¶
func (m *SelfUserUpdate) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SelfUserVerifiableAddress ¶
type SelfUserVerifiableAddress struct {
// address
// Required: true
Address string `json:"address" yaml:"address"`
// allowed for 2fa
AllowedFor2fa bool `json:"allowed_for_2fa,omitempty" yaml:"allowed_for_2fa,omitempty"`
// created at
// Required: true
// Format: date-time
CreatedAt strfmt.DateTime `json:"created_at" yaml:"created_at"`
// preferred contact method
// Example: sms
// Enum: ["sms","voice"]
PreferredContactMethod string `json:"preferred_contact_method,omitempty" yaml:"preferred_contact_method,omitempty"`
// status
// Example: active
// Required: true
// Enum: ["active","inactive"]
Status string `json:"status" yaml:"status"`
// type
// Example: mobile
// Required: true
// Enum: ["email","mobile"]
Type string `json:"type" yaml:"type"`
// updated at
// Required: true
// Format: date-time
UpdatedAt strfmt.DateTime `json:"updated_at" yaml:"updated_at"`
// verified
// Required: true
Verified bool `json:"verified" yaml:"verified"`
// verified at
// Format: date-time
VerifiedAt strfmt.DateTime `json:"verified_at,omitempty" yaml:"verified_at,omitempty"`
}
SelfUserVerifiableAddress self user verifiable address
swagger:model SelfUserVerifiableAddress
func (*SelfUserVerifiableAddress) ContextValidate ¶
func (m *SelfUserVerifiableAddress) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this self user verifiable address based on context it is used
func (*SelfUserVerifiableAddress) MarshalBinary ¶
func (m *SelfUserVerifiableAddress) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SelfUserVerifiableAddress) UnmarshalBinary ¶
func (m *SelfUserVerifiableAddress) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SelfUserWithData ¶
type SelfUserWithData struct {
// business metadata
BusinessMetadata map[string]interface{} `json:"business_metadata,omitempty" yaml:"business_metadata,omitempty"`
// id
ID string `json:"id,omitempty" yaml:"id,omitempty"`
// identifiers
Identifiers []*SelfUserIdentifier `json:"identifiers" yaml:"identifiers"`
// metadata
Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"`
// payload
Payload map[string]interface{} `json:"payload,omitempty" yaml:"payload,omitempty"`
// verifiable addresses
VerifiableAddresses []*SelfUserVerifiableAddress `json:"verifiable_addresses" yaml:"verifiable_addresses"`
}
SelfUserWithData self user with data
swagger:model SelfUserWithData
func (*SelfUserWithData) ContextValidate ¶
ContextValidate validate this self user with data based on the context it is used
func (*SelfUserWithData) MarshalBinary ¶
func (m *SelfUserWithData) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SelfUserWithData) UnmarshalBinary ¶
func (m *SelfUserWithData) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SelfUserWithDataV2 ¶
type SelfUserWithDataV2 struct {
// allowed authentication mechanisms that user can use
AllowedAuthenticationMechanisms []string `json:"allowed_authentication_mechanisms" yaml:"allowed_authentication_mechanisms"`
// authentication mechanisms
AuthenticationMechanisms AuthenticationMechanisms `json:"authentication_mechanisms,omitempty" yaml:"authentication_mechanisms,omitempty"`
// business metadata
BusinessMetadata map[string]interface{} `json:"business_metadata,omitempty" yaml:"business_metadata,omitempty"`
// credentials
Credentials []*SelfUserCredentials `json:"credentials" yaml:"credentials"`
// federated accounts
FederatedAccounts []*FederatedAccount `json:"federated_accounts" yaml:"federated_accounts"`
// id
ID string `json:"id,omitempty" yaml:"id,omitempty"`
// identifiers
Identifiers []*SelfUserIdentifier `json:"identifiers" yaml:"identifiers"`
// metadata
Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"`
// payload
Payload map[string]interface{} `json:"payload,omitempty" yaml:"payload,omitempty"`
// payload schema
PayloadSchema *SupportedJSONSchema `json:"payload_schema,omitempty" yaml:"payload_schema,omitempty"`
// preferences
Preferences *UserPreferences `json:"preferences,omitempty" yaml:"preferences,omitempty"`
// preferred authentication mechanism
// Example: password
// Enum: ["totp","password","otp","email_otp","sms_otp","voice_otp","webauthn","usernameless_webauthn","push","symbol","qr_code"]
PreferredAuthenticationMechanism string `json:"preferred_authentication_mechanism,omitempty" yaml:"preferred_authentication_mechanism,omitempty"`
// second factor authentication mechanisms
SecondFactorAuthenticationMechanisms AuthenticationMechanisms `json:"second_factor_authentication_mechanisms,omitempty" yaml:"second_factor_authentication_mechanisms,omitempty"`
// second factor preferred authentication mechanism
// Example: password
// Enum: ["totp","password","otp","email_otp","sms_otp","voice_otp","webauthn","usernameless_webauthn","push","symbol","qr_code"]
SecondFactorPreferredAuthenticationMechanism string `` /* 131-byte string literal not displayed */
// totp issuer
TotpIssuer string `json:"totp_issuer,omitempty" yaml:"totp_issuer,omitempty"`
// verifiable addresses
VerifiableAddresses []*SelfUserVerifiableAddress `json:"verifiable_addresses" yaml:"verifiable_addresses"`
}
SelfUserWithDataV2 self user with data v2
swagger:model SelfUserWithDataV2
func (*SelfUserWithDataV2) ContextValidate ¶
ContextValidate validate this self user with data v2 based on the context it is used
func (*SelfUserWithDataV2) MarshalBinary ¶
func (m *SelfUserWithDataV2) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SelfUserWithDataV2) UnmarshalBinary ¶
func (m *SelfUserWithDataV2) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SetPassword ¶
type SetPassword struct {
// new password
// Required: true
NewPassword string `json:"new_password" yaml:"new_password"`
}
SetPassword set password
swagger:model SetPassword
func (*SetPassword) ContextValidate ¶
ContextValidate validates this set password based on context it is used
func (*SetPassword) MarshalBinary ¶
func (m *SetPassword) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SetPassword) UnmarshalBinary ¶
func (m *SetPassword) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SetTotpSecret ¶
type SetTotpSecret struct {
// new totp secret
// Required: true
NewTotpSecret string `json:"new_totp_secret" yaml:"new_totp_secret"`
}
SetTotpSecret set totp secret
swagger:model SetTotpSecret
func (*SetTotpSecret) ContextValidate ¶
ContextValidate validates this set totp secret based on context it is used
func (*SetTotpSecret) MarshalBinary ¶
func (m *SetTotpSecret) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SetTotpSecret) UnmarshalBinary ¶
func (m *SetTotpSecret) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SetWebAuthn ¶
type SetWebAuthn struct {
// new webauthn
// Required: true
NewWebauthn *WebAuthnCredential `json:"new_webauthn" yaml:"new_webauthn"`
// type
// Enum: ["regular","discoverable"]
Type string `json:"type,omitempty" yaml:"type,omitempty"`
}
SetWebAuthn set web authn
swagger:model SetWebAuthn
func (*SetWebAuthn) ContextValidate ¶
ContextValidate validate this set web authn based on the context it is used
func (*SetWebAuthn) MarshalBinary ¶
func (m *SetWebAuthn) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SetWebAuthn) UnmarshalBinary ¶
func (m *SetWebAuthn) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SupportedJSONSchema ¶
type SupportedJSONSchema struct {
// additional properties
AdditionalProperties bool `json:"additionalProperties,omitempty" yaml:"additionalProperties,omitempty"`
// all of
AllOf []*SupportedJSONSchema `json:"allOf" yaml:"allOf"`
// any of
AnyOf []*SupportedJSONSchema `json:"anyOf" yaml:"anyOf"`
// const
Const string `json:"const,omitempty" yaml:"const,omitempty"`
// contains
Contains *SupportedJSONSchema `json:"contains,omitempty" yaml:"contains,omitempty"`
// dependent required
DependentRequired map[string][]string `json:"dependentRequired,omitempty" yaml:"dependentRequired,omitempty"`
// dependent schemas
DependentSchemas map[string]SupportedJSONSchema `json:"dependentSchemas,omitempty" yaml:"dependentSchemas,omitempty"`
// description
Description string `json:"description,omitempty" yaml:"description,omitempty"`
// else
Else *SupportedJSONSchema `json:"else,omitempty" yaml:"else,omitempty"`
// enum
Enum []string `json:"enum" yaml:"enum"`
// exclusive maximum
ExclusiveMaximum int64 `json:"exclusiveMaximum,omitempty" yaml:"exclusiveMaximum,omitempty"`
// exclusive minimum
ExclusiveMinimum int64 `json:"exclusiveMinimum,omitempty" yaml:"exclusiveMinimum,omitempty"`
// hidden
Hidden bool `json:"hidden,omitempty" yaml:"hidden,omitempty"`
// if
If *SupportedJSONSchema `json:"if,omitempty" yaml:"if,omitempty"`
// items
Items *SupportedJSONSchema `json:"items,omitempty" yaml:"items,omitempty"`
// max contains
MaxContains int64 `json:"maxContains,omitempty" yaml:"maxContains,omitempty"`
// arrays
MaxItems int64 `json:"maxItems,omitempty" yaml:"maxItems,omitempty"`
// strings
MaxLength int64 `json:"maxLength,omitempty" yaml:"maxLength,omitempty"`
// objects
MaxProperties int64 `json:"maxProperties,omitempty" yaml:"maxProperties,omitempty"`
// maximum
Maximum int64 `json:"maximum,omitempty" yaml:"maximum,omitempty"`
// min contains
MinContains int64 `json:"minContains,omitempty" yaml:"minContains,omitempty"`
// min items
MinItems int64 `json:"minItems,omitempty" yaml:"minItems,omitempty"`
// min length
MinLength int64 `json:"minLength,omitempty" yaml:"minLength,omitempty"`
// min properties
MinProperties int64 `json:"minProperties,omitempty" yaml:"minProperties,omitempty"`
// minimum
Minimum int64 `json:"minimum,omitempty" yaml:"minimum,omitempty"`
// numeric
MultipleOf int64 `json:"multipleOf,omitempty" yaml:"multipleOf,omitempty"`
// not
Not *SupportedJSONSchema `json:"not,omitempty" yaml:"not,omitempty"`
// one of
OneOf []*SupportedJSONSchema `json:"oneOf" yaml:"oneOf"`
// pattern
Pattern string `json:"pattern,omitempty" yaml:"pattern,omitempty"`
// pattern properties
PatternProperties map[string]SupportedJSONSchema `json:"patternProperties,omitempty" yaml:"patternProperties,omitempty"`
// properties
Properties map[string]SupportedJSONSchema `json:"properties,omitempty" yaml:"properties,omitempty"`
// property names
PropertyNames *SupportedJSONSchema `json:"propertyNames,omitempty" yaml:"propertyNames,omitempty"`
// required
Required []string `json:"required" yaml:"required"`
// then
Then *SupportedJSONSchema `json:"then,omitempty" yaml:"then,omitempty"`
// title
Title string `json:"title,omitempty" yaml:"title,omitempty"`
// any
Type string `json:"type,omitempty" yaml:"type,omitempty"`
// unique items
UniqueItems bool `json:"uniqueItems,omitempty" yaml:"uniqueItems,omitempty"`
}
SupportedJSONSchema supported JSON schema
swagger:model SupportedJSONSchema
func (*SupportedJSONSchema) ContextValidate ¶
ContextValidate validate this supported JSON schema based on the context it is used
func (*SupportedJSONSchema) MarshalBinary ¶
func (m *SupportedJSONSchema) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SupportedJSONSchema) UnmarshalBinary ¶
func (m *SupportedJSONSchema) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type URLEncodedBase64 ¶
type URLEncodedBase64 string
URLEncodedBase64 URLEncodedBase64 holds URL-encoded base64 data as an opaque string.
Base64url-encoded data carried as an opaque string. Decoding to raw bytes, if needed, is the consumer responsibility.
swagger:model URLEncodedBase64
func (URLEncodedBase64) ContextValidate ¶
ContextValidate validates this URL encoded base64 based on context it is used
type UserEntity ¶
type UserEntity struct {
// A human-palatable name for the user account, intended only for display.
// For example, "Alex P. Müller" or "田中 倫". The Relying Party SHOULD let
// the user choose this, and SHOULD NOT restrict the choice more than necessary.
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
// ID is the user handle of the user account entity. To ensure secure operation,
// authentication and authorization decisions MUST be made on the basis of this id
// member, not the displayName nor name members. See Section 6.1 of
// [RFC8266](https://www.w3.org/TR/webauthn/#biblio-rfc8266).
ID interface{} `json:"id,omitempty" yaml:"id,omitempty"`
// A human-palatable name for the entity. Its function depends on what the PublicKeyCredentialEntity represents:
//
// When inherited by PublicKeyCredentialRpEntity it is a human-palatable identifier for the Relying Party,
// intended only for display. For example, "ACME Corporation", "Wonderful Widgets, Inc." or "ОАО Примертех".
//
// When inherited by PublicKeyCredentialUserEntity, it is a human-palatable identifier for a user account. It is
// intended only for display, i.e., aiding the user in determining the difference between user accounts with similar
// displayNames. For example, "alexm", "alex.p.mueller@example.com" or "+14255551234".
Name string `json:"name,omitempty" yaml:"name,omitempty"`
}
UserEntity The UserEntity represents the PublicKeyCredentialUserEntity IDL and is used to supply additional user account attributes when creating a new credential.
Specification: §5.4.3 User Account Parameters for Credential Generation (https://www.w3.org/TR/webauthn/#dictdef-publickeycredentialuserentity)
swagger:model UserEntity
func (*UserEntity) ContextValidate ¶
ContextValidate validates this user entity based on context it is used
func (*UserEntity) MarshalBinary ¶
func (m *UserEntity) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*UserEntity) UnmarshalBinary ¶
func (m *UserEntity) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type UserMFASession ¶
type UserMFASession struct {
// Session id
ID string `json:"id,omitempty" yaml:"id,omitempty"`
// IP address of the user who created the session
IPAddress string `json:"ip_address,omitempty" yaml:"ip_address,omitempty"`
// Time when the session was issued
// Format: date-time
IssueTime strfmt.DateTime `json:"issue_time,omitempty" yaml:"issue_time,omitempty"`
// User agent of the user who created the session
UserAgent string `json:"user_agent,omitempty" yaml:"user_agent,omitempty"`
}
UserMFASession user m f a session
swagger:model UserMFASession
func (*UserMFASession) ContextValidate ¶
ContextValidate validates this user m f a session based on context it is used
func (*UserMFASession) MarshalBinary ¶
func (m *UserMFASession) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*UserMFASession) UnmarshalBinary ¶
func (m *UserMFASession) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type UserPreferences ¶
type UserPreferences struct {
// Locale is the list of user's preferred languages/locales for UI and communications
// Example: en-US, es-ES
Locales []string `json:"locales" yaml:"locales"`
// mfa
Mfa *MFAPreferences `json:"mfa,omitempty" yaml:"mfa,omitempty"`
}
UserPreferences user preferences
swagger:model UserPreferences
func (*UserPreferences) ContextValidate ¶
ContextValidate validate this user preferences based on the context it is used
func (*UserPreferences) MarshalBinary ¶
func (m *UserPreferences) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*UserPreferences) UnmarshalBinary ¶
func (m *UserPreferences) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type UserVerificationRequirement ¶
type UserVerificationRequirement string
UserVerificationRequirement UserVerificationRequirement is a representation of the UserVerificationRequirement IDL enum.
A WebAuthn Relying Party may require user verification for some of its operations but not for others, and may use this type to express its needs.
Specification: §5.8.6. User Verification Requirement Enumeration (https://www.w3.org/TR/webauthn/#enum-userVerificationRequirement)
swagger:model UserVerificationRequirement
func (UserVerificationRequirement) ContextValidate ¶
func (m UserVerificationRequirement) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this user verification requirement based on context it is used
type WebAuthnCredential ¶
type WebAuthnCredential struct {
Credential
}
WebAuthnCredential web authn credential
swagger:model WebAuthnCredential
func (*WebAuthnCredential) ContextValidate ¶
ContextValidate validate this web authn credential based on the context it is used
func (WebAuthnCredential) MarshalJSON ¶
func (m WebAuthnCredential) MarshalJSON() ([]byte, error)
MarshalJSON marshals this object to a JSON structure
func (*WebAuthnCredential) UnmarshalJSON ¶
func (m *WebAuthnCredential) UnmarshalJSON(raw []byte) error
UnmarshalJSON unmarshals this object from a JSON structure
Source Files
¶
- attestation_format.go
- authentication_extensions.go
- authentication_extensions_client_outputs.go
- authentication_mechanisms.go
- authenticator.go
- authenticator_attachment.go
- authenticator_attestation_response.go
- authenticator_selection.go
- authenticator_transport.go
- c_o_s_e_algorithm_identifier.go
- change_password.go
- change_totp_secret.go
- complete_address_verification.go
- conveyance_preference.go
- credential.go
- credential_attestation.go
- credential_creation.go
- credential_creation_response.go
- credential_descriptor.go
- credential_extensions.go
- credential_flags.go
- credential_mediation_requirement.go
- credential_parameter.go
- credential_properties_output.go
- credential_protection_policy.go
- credential_type.go
- error.go
- federated_account.go
- h_m_a_c_get_secret_inputs.go
- h_m_a_c_get_secret_outputs.go
- large_blob_inputs.go
- large_blob_outputs.go
- large_blob_support.go
- list_user_m_f_a_sessions.go
- m_f_a_preferences.go
- name_web_authn_key.go
- p_r_f_inputs.go
- p_r_f_outputs.go
- p_r_f_values.go
- public_key_credential_creation_options.go
- public_key_credential_hints.go
- relying_party_entity.go
- reset_password_confirm.go
- resident_key_requirement.go
- self_user_credentials.go
- self_user_identifier.go
- self_user_update.go
- self_user_verifiable_address.go
- self_user_with_data.go
- self_user_with_data_v2.go
- set_password.go
- set_totp_secret.go
- set_web_authn.go
- supported_json_schema.go
- url_encoded_base64.go
- user_entity.go
- user_m_f_a_session.go
- user_preferences.go
- user_verification_requirement.go
- web_authn_credential.go