Documentation ¶
Index ¶
- Constants
- Variables
- func DecodePublicKey(coseKey *COSEKey) (crypto.PublicKey, error)
- func VerifyFIDOU2FAttestationStatement(attStmt []byte, rawAuthData []byte, clientDataHash [32]byte) error
- func VerifyNoneAttestationStatement(attStmt []byte, _ []byte, _ [32]byte) error
- func VerifyPackedAttestationStatement(attStmt []byte, rawAuthData []byte, clientDataHash [32]byte) error
- func VerifySignature(rawKey cbor.RawMessage, message, sig []byte) error
- type AssertionPublicKeyCredential
- type AttestationConveyancePreference
- type AttestationObject
- type AttestationPublicKeyCredential
- type AttestationStatementFormat
- type AttestedCredentialData
- type AuthenticationExtensionsClientInputs
- type AuthenticationExtensionsClientOutputs
- type AuthenticationValidator
- type AuthenticatorAssertionResponse
- type AuthenticatorAttachment
- type AuthenticatorAttestationResponse
- type AuthenticatorData
- type AuthenticatorResponse
- type AuthenticatorSelectionCriteria
- type AuthenticatorTransport
- type CMCredential
- type COSEAlgorithmIdentifier
- type COSEEllipticCurve
- type COSEKey
- type COSEKeyType
- type CollectedClientData
- type Credential
- type CredentialCreationOptions
- type CredentialFinder
- type CredentialRequestOptions
- type Error
- type Extension
- type FIDOU2FAttestationStatement
- type Option
- func AllowCredentials(creds []PublicKeyCredentialDescriptor) Option
- func Attestation(pref AttestationConveyancePreference) Option
- func AuthenticatorSelection(criteria AuthenticatorSelectionCriteria) Option
- func ExcludeCredentials(creds []PublicKeyCredentialDescriptor) Option
- func Extensions(exts ...Extension) Option
- func RelyingPartyID(rpID string) Option
- func Timeout(timeout uint) Option
- func UserVerification(req UserVerificationRequirement) Option
- type PackedAttestationStatement
- type PublicKeyCredential
- type PublicKeyCredentialCreationOptions
- type PublicKeyCredentialDescriptor
- type PublicKeyCredentialEntity
- type PublicKeyCredentialParameters
- type PublicKeyCredentialRPEntity
- type PublicKeyCredentialRequestOptions
- type PublicKeyCredentialType
- type PublicKeyCredentialUserEntity
- type RegistrationValidator
- type RelyingParty
- type TokenBinding
- type TokenBindingStatus
- type User
- type UserFinder
- type UserVerificationRequirement
Constants ¶
const ( ExtensionAppID = "appid" ExtensionTxAuthSimple = "txAuthSimple" ExtensionTxAuthGeneric = "txAuthGeneric" ExtensionAuthnSel = "authnSel" ExtensionExts = "exts" ExtensionUVI = "uvi" ExtensionLoc = "loc" ExtensionUVM = "uvm" ExtensionBiometricPerfBounds = "biometricPerfBounds" )
Identifiers for defined extensions
const ( StatusSupported = "supported" StatusPresent = "present" )
enum values for the TokenBindingStatus type
Variables ¶
var ( ErrDecodeAttestedCredentialData = Error{/* contains filtered or unexported fields */} ErrDecodeAuthenticatorData = Error{/* contains filtered or unexported fields */} ErrDecodeCOSEKey = Error{/* contains filtered or unexported fields */} ErrECDAANotSupported = Error{/* contains filtered or unexported fields */} ErrEncodeAttestedCredentialData = Error{/* contains filtered or unexported fields */} ErrEncodeAuthenticatorData = Error{/* contains filtered or unexported fields */} ErrGenerateChallenge = Error{/* contains filtered or unexported fields */} ErrMarshalAttestationObject = Error{/* contains filtered or unexported fields */} ErrOption = Error{/* contains filtered or unexported fields */} ErrNotImplemented = Error{/* contains filtered or unexported fields */} ErrUnmarshalAttestationObject = Error{/* contains filtered or unexported fields */} ErrVerifyAttestation = Error{/* contains filtered or unexported fields */} ErrVerifyAuthentication = Error{/* contains filtered or unexported fields */} ErrVerifyClientExtensionOutput = Error{/* contains filtered or unexported fields */} ErrVerifyRegistration = Error{/* contains filtered or unexported fields */} ErrVerifySignature = Error{/* contains filtered or unexported fields */} )
Categorical top-level errors
var AuthenticationExtensionValidators map[string]AuthenticationValidator = map[string]AuthenticationValidator{ ExtensionAppID: ValidateAppID(), }
AuthenticationExtensionValidators is a map to all extension validators for extensions allowed during the authentication ceremony
var ChallengeLength = 32
ChallengeLength represents the size of the generated challenge. Must be greater than 16.
var RegistrationExtensionValidators map[string]RegistrationValidator = map[string]RegistrationValidator{}
RegistrationExtensionValidators is a map to all extension validators for extensions allowed during the registration ceremony
Functions ¶
func DecodePublicKey ¶
DecodePublicKey parses a crypto.PublicKey from a COSEKey
func VerifyFIDOU2FAttestationStatement ¶ added in v0.3.0
func VerifyFIDOU2FAttestationStatement(attStmt []byte, rawAuthData []byte, clientDataHash [32]byte) error
VerifyFIDOU2FAttestationStatement verifies that an attestation statement of type "fido-u2f" is valid
func VerifyNoneAttestationStatement ¶
VerifyNoneAttestationStatement verifies that at attestation statement of type "none" is valid
func VerifyPackedAttestationStatement ¶ added in v0.4.0
func VerifyPackedAttestationStatement(attStmt []byte, rawAuthData []byte, clientDataHash [32]byte) error
VerifyPackedAttestationStatement verifies that an attestation statement of type "packed" is valid
func VerifySignature ¶
func VerifySignature(rawKey cbor.RawMessage, message, sig []byte) error
VerifySignature verifies a signature using a provided COSEKey, message, and signature
Types ¶
type AssertionPublicKeyCredential ¶
type AssertionPublicKeyCredential struct { PublicKeyCredential Response AuthenticatorAssertionResponse `json:"response"` }
AssertionPublicKeyCredential is the PublicKeyCredential returned from a call to navigator.credentials.get(), with an AuthenticatorAssertionResponse
type AttestationConveyancePreference ¶
type AttestationConveyancePreference string
AttestationConveyancePreference may be used by relying parties to specify their preference regarding attestation conveyance during credential generation.
const ( ConveyanceNone AttestationConveyancePreference = "none" ConveyanceIndirect AttestationConveyancePreference = "indirect" ConveyanceDirect AttestationConveyancePreference = "direct" )
enum values for AttestationConveyancePreference type
type AttestationObject ¶
type AttestationObject struct { AuthData AuthenticatorData Fmt AttestationStatementFormat AttStmt cbor.RawMessage }
AttestationObject contains both authenticator data and an attestation statement.
func FinishRegistration ¶
func FinishRegistration( rp RelyingParty, credFinder CredentialFinder, opts *PublicKeyCredentialCreationOptions, cred *AttestationPublicKeyCredential, vals ...RegistrationValidator, ) ( *AttestationObject, error, )
FinishRegistration completes the registration ceremony by validating the provided public key credential, and returns the attestation object containing all authenticator data that should be stored.
func (*AttestationObject) MarshalBinary ¶ added in v0.2.0
func (ao *AttestationObject) MarshalBinary() (data []byte, err error)
MarshalBinary implements the BinaryMarshaler interface, and returns the raw CBOR encoding of AttestationObject
func (*AttestationObject) UnmarshalBinary ¶ added in v0.2.0
func (ao *AttestationObject) UnmarshalBinary(data []byte) error
UnmarshalBinary implements the BinaryUnmarshaler interface, and populates an AttestationObject with the provided raw CBOR
type AttestationPublicKeyCredential ¶
type AttestationPublicKeyCredential struct { PublicKeyCredential Response AuthenticatorAttestationResponse `json:"response"` }
AttestationPublicKeyCredential is the PublicKeyCredential returned from a call to navigator.credentials.create(), with an AuthenticatorAttestationResponse
type AttestationStatementFormat ¶
type AttestationStatementFormat string
AttestationStatementFormat is the identifier for an attestation statement format.
const ( AttestationFormatPacked AttestationStatementFormat = "packed" AttestationFormatTPM AttestationStatementFormat = "tpm" AttestationFormatAndroidKey AttestationStatementFormat = "android-key" AttestationFormatAndroidSafetyNet AttestationStatementFormat = "android-safetynet" AttestationFormatFidoU2F AttestationStatementFormat = "fido-u2f" AttestationFormatNone AttestationStatementFormat = "none" )
enum values for AttestationStatementFormat
func SupportedAttestationStatementFormats ¶
func SupportedAttestationStatementFormats() []AttestationStatementFormat
SupportedAttestationStatementFormats returns the list of attestation formats currently supported by the library
func (AttestationStatementFormat) Valid ¶
func (asf AttestationStatementFormat) Valid() error
Valid determines if the Attestation Format Identifier is a valid value
type AttestedCredentialData ¶
type AttestedCredentialData struct { AAGUID [16]byte CredentialID []byte CredentialPublicKey cbor.RawMessage }
AttestedCredentialData is a variable-length byte array added to the authenticator data when generating an attestation object for a given credential. §6.4.1
type AuthenticationExtensionsClientInputs ¶
type AuthenticationExtensionsClientInputs map[string]interface{}
AuthenticationExtensionsClientInputs contains the client extension input values for zero or more extensions. §5.7
func BuildExtensions ¶
func BuildExtensions(exts ...Extension) AuthenticationExtensionsClientInputs
BuildExtensions builds the extension map to be added to the options object
type AuthenticationExtensionsClientOutputs ¶
type AuthenticationExtensionsClientOutputs map[string]interface{}
AuthenticationExtensionsClientOutputs containing the client extension output values for zero or more WebAuthn extensions. §5.8
type AuthenticationValidator ¶ added in v0.5.0
type AuthenticationValidator func(opts *PublicKeyCredentialRequestOptions, cred *AssertionPublicKeyCredential) error
AuthenticationValidator is a function that can do additional custom validations against the AssertionPublicKeyCredential return by the client and the PublicKeyCredentialRequestOptions sent to the client. Returning a non-nil error ends the authentication ceremony unsuccessfully.
func ValidateAppID ¶ added in v0.5.0
func ValidateAppID() AuthenticationValidator
ValidateAppID validates the AppID extension and updates the credential request options with the valid AppID as needed
type AuthenticatorAssertionResponse ¶
type AuthenticatorAssertionResponse struct { AuthenticatorResponse AuthenticatorData []byte `json:"authenticatorData"` Signature []byte `json:"signature"` UserHandle []byte `json:"userHandle"` }
AuthenticatorAssertionResponse represents an authenticator's response to a client’s request for generation of a new authentication assertion given the WebAuthn Relying Party's challenge and OPTIONAL list of credentials it is aware of.
type AuthenticatorAttachment ¶
type AuthenticatorAttachment string
AuthenticatorAttachment describes authenticators' attachment modalities.
const ( AttachmentPlatform AuthenticatorAttachment = "platform" AttachmentCrossPlatform AuthenticatorAttachment = "cross-platform" )
enum values for AuthenticatorAttachment type
type AuthenticatorAttestationResponse ¶
type AuthenticatorAttestationResponse struct { AuthenticatorResponse AttestationObject []byte `json:"attestationObject"` }
AuthenticatorAttestationResponse represents the authenticator's response to a client’s request for the creation of a new public key credential.
type AuthenticatorData ¶
type AuthenticatorData struct { RPIDHash [32]byte UP bool UV bool AT bool ED bool SignCount uint32 AttestedCredentialData AttestedCredentialData Extensions map[string]interface{} }
AuthenticatorData encodes contextual bindings made by the authenticator.
func FinishAuthentication ¶
func FinishAuthentication( rp RelyingParty, userFinder UserFinder, opts *PublicKeyCredentialRequestOptions, cred *AssertionPublicKeyCredential, vals ...AuthenticationValidator, ) (*AuthenticatorData, error)
FinishAuthentication completes the authentication ceremony by validating the provided credential assertion against the stored public key.
func (*AuthenticatorData) Decode ¶
func (ad *AuthenticatorData) Decode(data io.Reader) error
Decode decodes the ad hoc AuthenticatorData structure
func (*AuthenticatorData) Encode ¶ added in v0.2.0
func (ad *AuthenticatorData) Encode(w io.Writer) error
Encode encodes the AuthenticatorData structure into the raw binary authData
func (*AuthenticatorData) MarshalBinary ¶ added in v0.2.0
func (ad *AuthenticatorData) MarshalBinary() (data []byte, err error)
MarshalBinary implements the BinaryMarshaler interface, and returns the raw binary authData
func (*AuthenticatorData) UnmarshalBinary ¶ added in v0.2.0
func (ad *AuthenticatorData) UnmarshalBinary(data []byte) error
UnmarshalBinary implements the BinaryUnmarshaler interface, and populates an AuthenticatorData with the provided raw authData
type AuthenticatorResponse ¶
type AuthenticatorResponse struct {
ClientDataJSON []byte `json:"clientDataJSON"`
}
AuthenticatorResponse is the is the basic authenticator response
type AuthenticatorSelectionCriteria ¶
type AuthenticatorSelectionCriteria struct { AuthenticatorAttachment AuthenticatorAttachment `json:"authenticatorAttachment,omitempty"` RequireResidentKey bool `json:"requireResidentKey,omitempty"` UserVerification UserVerificationRequirement `json:"userVerification,omitempty"` }
AuthenticatorSelectionCriteria may be used to specify their requirements regarding authenticator attributes.
type AuthenticatorTransport ¶
type AuthenticatorTransport string
AuthenticatorTransport defines hints as to how clients might communicate with a particular authenticator in order to obtain an assertion for a specific credential.
const ( TransportUSB AuthenticatorTransport = "usb" TransportNFC AuthenticatorTransport = "nfc" TransportBLE AuthenticatorTransport = "ble" TransportInternal AuthenticatorTransport = "internal" )
enum values for AuthenticatorTransport type
type CMCredential ¶
CMCredential is the basic Credential Management Credential type that is inherited by PublicKeyCredential
type COSEAlgorithmIdentifier ¶
type COSEAlgorithmIdentifier int
COSEAlgorithmIdentifier is a number identifying a cryptographic algorithm
const ( AlgorithmRS1 COSEAlgorithmIdentifier = -65535 AlgorithmRS512 COSEAlgorithmIdentifier = -259 AlgorithmRS384 COSEAlgorithmIdentifier = -258 AlgorithmRS256 COSEAlgorithmIdentifier = -257 AlgorithmPS512 COSEAlgorithmIdentifier = -39 AlgorithmPS384 COSEAlgorithmIdentifier = -38 AlgorithmPS256 COSEAlgorithmIdentifier = -37 AlgorithmES512 COSEAlgorithmIdentifier = -36 AlgorithmES384 COSEAlgorithmIdentifier = -35 AlgorithmEdDSA COSEAlgorithmIdentifier = -8 AlgorithmES256 COSEAlgorithmIdentifier = -7 )
enum values for COSEAlgorithmIdentifier type
func SupportedKeyAlgorithms ¶
func SupportedKeyAlgorithms() []COSEAlgorithmIdentifier
SupportedKeyAlgorithms returns the list of key algorithms currently supported by the library
type COSEEllipticCurve ¶
type COSEEllipticCurve int
COSEEllipticCurve is a number identifying an elliptic curve
const ( CurveP256 COSEEllipticCurve = 1 CurveP384 COSEEllipticCurve = 2 CurveP521 COSEEllipticCurve = 3 )
enum values for COSEEllipticCurve type
type COSEKey ¶
type COSEKey struct { Kty int `cbor:"1,keyasint,omitempty"` Kid []byte `cbor:"2,keyasint,omitempty"` Alg int `cbor:"3,keyasint,omitempty"` KeyOpts int `cbor:"4,keyasint,omitempty"` IV []byte `cbor:"5,keyasint,omitempty"` CrvOrNOrK cbor.RawMessage `cbor:"-1,keyasint,omitempty"` // K for symmetric keys, Crv for elliptic curve keys, N for RSA modulus XOrE cbor.RawMessage `cbor:"-2,keyasint,omitempty"` // X for curve x-coordinate, E for RSA public exponent Y cbor.RawMessage `cbor:"-3,keyasint,omitempty"` // Y for curve y-cooridate D []byte `cbor:"-4,keyasint,omitempty"` }
COSEKey represents a key decoded from COSE format.
type COSEKeyType ¶
type COSEKeyType int
COSEKeyType is a number identifying a key type
const ( KeyTypeOKP COSEKeyType = 1 KeyTypeEC2 COSEKeyType = 2 KeyTypeRSA COSEKeyType = 3 )
enum values for COSEKeyType type
type CollectedClientData ¶
type CollectedClientData struct { Type string `json:"type"` Challenge string `json:"challenge"` Origin string `json:"origin"` TokenBinding *TokenBinding `json:"tokenBinding,omitempty"` }
CollectedClientData represents the contextual bindings of both the WebAuthn Relying Party and the client.
type Credential ¶
type Credential interface { Owner() User CredentialSignCount() uint CredentialID() []byte CredentialPublicKey() []byte }
Credential defines functions which return data required about the stored credentials
type CredentialCreationOptions ¶
type CredentialCreationOptions struct {
PublicKey PublicKeyCredentialCreationOptions `json:"publicKey"`
}
CredentialCreationOptions specifies the parameters to create a credential
type CredentialFinder ¶
type CredentialFinder func([]byte) (Credential, error)
CredentialFinder defines a function which takes a credential ID as a parameter and returns an object which implements the Credential interface and an error
type CredentialRequestOptions ¶
type CredentialRequestOptions struct {
PublicKey PublicKeyCredentialRequestOptions `json:"publicKey"`
}
CredentialRequestOptions specifies the parameters to retrieve a credential
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error represents an error in a WebAuthn relying party operation
type Extension ¶
type Extension func(AuthenticationExtensionsClientInputs)
Extension defines an extension to a creation options or request options object
type FIDOU2FAttestationStatement ¶ added in v0.3.0
FIDOU2FAttestationStatement represents a decoded attestation statement of type "fido-u2f"
type Option ¶
type Option func(interface{}) error
Option is a function that can be passed as a parameter to StartRegistration or StartAuthentication functions which adjusts the final options object. Options must typecheck for a pointer to PublicKeyCredentialCreationOptions or PublicKeyCredentialRequestOptions
func AllowCredentials ¶
func AllowCredentials(creds []PublicKeyCredentialDescriptor) Option
AllowCredentials returns an option that adds a list of allowed credentials to the credential request object
func Attestation ¶
func Attestation(pref AttestationConveyancePreference) Option
Attestation returns an option that adds an attestation conveyance preference to the creation options object
func AuthenticatorSelection ¶
func AuthenticatorSelection(criteria AuthenticatorSelectionCriteria) Option
AuthenticatorSelection returns an option that adds authenticator selection criteria to the creation options object
func ExcludeCredentials ¶
func ExcludeCredentials(creds []PublicKeyCredentialDescriptor) Option
ExcludeCredentials returns an option that adds a list of credentials to exclude to the creation options object
func Extensions ¶
Extensions returns an option that adds one or more extensions to the creation options object or request options object
func RelyingPartyID ¶
RelyingPartyID returns an option that specifies the Relying Party ID in the credential request object
func Timeout ¶
Timeout returns an option that adds a custom timeout to the credential creation options or credential request options object
func UserVerification ¶
func UserVerification(req UserVerificationRequirement) Option
UserVerification returns an option that adds the relying party argument for user verification to the credential request object
type PackedAttestationStatement ¶ added in v0.4.0
type PackedAttestationStatement struct { Alg COSEAlgorithmIdentifier `cbor:"alg"` Sig []byte `cbor:"sig"` X5C [][]byte `cbor:"x5c"` ECDAAKeyID []byte `cbor:"ecdaaKeyId"` }
PackedAttestationStatement represents a decoded attestation statement of type "packed"
type PublicKeyCredential ¶
type PublicKeyCredential struct { CMCredential RawID []byte `json:"rawId"` Extensions AuthenticationExtensionsClientOutputs `json:"extensions,omitempty"` }
PublicKeyCredential inherits from Credential and contains the attributes that are returned to the caller when a new credential is created, or a new assertion is requested.
type PublicKeyCredentialCreationOptions ¶
type PublicKeyCredentialCreationOptions struct { RP PublicKeyCredentialRPEntity `json:"rp"` User PublicKeyCredentialUserEntity `json:"user"` Challenge []byte `json:"challenge"` PubKeyCredParams []PublicKeyCredentialParameters `json:"pubKeyCredParams"` Timeout uint `json:"timeout,omitempty"` ExcludeCredentials []PublicKeyCredentialDescriptor `json:"excludeCredentials,omitempty"` AuthenticatorSelection *AuthenticatorSelectionCriteria `json:"authenticatorSelection,omitempty"` Attestation AttestationConveyancePreference `json:"attestation,omitempty"` Extensions AuthenticationExtensionsClientInputs `json:"extensions,omitempty"` }
PublicKeyCredentialCreationOptions represent options for credential creation
func StartRegistration ¶
func StartRegistration( rp RelyingParty, user User, opts ...Option, ) ( *PublicKeyCredentialCreationOptions, error, )
StartRegistration starts the registration ceremony by creating a credential creation options object to be sent to the client.
type PublicKeyCredentialDescriptor ¶
type PublicKeyCredentialDescriptor struct { Type PublicKeyCredentialType `json:"type"` ID []byte `json:"id"` Transports []AuthenticatorTransport `json:"transports,omitempty"` }
PublicKeyCredentialDescriptor 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.
type PublicKeyCredentialEntity ¶
type PublicKeyCredentialEntity struct { Name string `json:"name"` Icon string `json:"icon,omitempty"` }
PublicKeyCredentialEntity describes a user account, or a WebAuthn Relying Party, which a public key credential is associated with or scoped to, respectively.
type PublicKeyCredentialParameters ¶
type PublicKeyCredentialParameters struct { Type PublicKeyCredentialType `json:"type"` Alg COSEAlgorithmIdentifier `json:"alg"` }
PublicKeyCredentialParameters is used to supply additional parameters when creating a new credential.
func SupportedPublicKeyCredentialParameters ¶
func SupportedPublicKeyCredentialParameters() []PublicKeyCredentialParameters
SupportedPublicKeyCredentialParameters enumerates the credential types and algorithms currently supported by this library.
type PublicKeyCredentialRPEntity ¶
type PublicKeyCredentialRPEntity struct { PublicKeyCredentialEntity ID string `json:"id,omitempty"` }
PublicKeyCredentialRPEntity is used to supply additional Relying Party attributes when creating a new credential.
type PublicKeyCredentialRequestOptions ¶
type PublicKeyCredentialRequestOptions struct { Challenge []byte `json:"challenge"` Timeout uint `json:"timeout,omitempty"` RPID string `json:"rpId,omitempty"` AllowCredentials []PublicKeyCredentialDescriptor `json:"allowCredentials,omitempty"` UserVerification UserVerificationRequirement `json:"userVerification,omitempty"` Extensions AuthenticationExtensionsClientInputs `json:"extensions,omitempty"` }
PublicKeyCredentialRequestOptions supplies get() with the data it needs to generate an assertion.
func StartAuthentication ¶
func StartAuthentication( opts ...Option, ) ( *PublicKeyCredentialRequestOptions, error, )
StartAuthentication starts the authentication ceremony by creating a credential request options object to be sent to the client
type PublicKeyCredentialType ¶
type PublicKeyCredentialType string
PublicKeyCredentialType defines the valid credential types.
const (
PublicKey PublicKeyCredentialType = "public-key"
)
enum values for PublicKeyCredentialType type
type PublicKeyCredentialUserEntity ¶
type PublicKeyCredentialUserEntity struct { PublicKeyCredentialEntity ID []byte `json:"id"` DisplayName string `json:"displayName"` }
PublicKeyCredentialUserEntity is used to supply additional user account attributes when creating a new credential.
type RegistrationValidator ¶ added in v0.5.0
type RegistrationValidator func(opts *PublicKeyCredentialCreationOptions, cred *AttestationPublicKeyCredential) error
RegistrationValidator is a function that can do additional custom validations against the AttestationPublicKeyCredential returned by the client and the PublicKeyCredentialCreationOptions sent to the client. Returning a non-nil error ends the registration ceremony unsuccessfully.
type RelyingParty ¶
type RelyingParty interface { EntityID() string EntityName() string EntityIcon() string Origin() string }
RelyingParty defines functions which return data required about the Relying Party in order to perform WebAuthn transactions.
type TokenBinding ¶
type TokenBinding struct { Status TokenBindingStatus `json:"status"` ID string `json:"id,omitempty"` }
TokenBinding contains information about the state of the Token Binding protocol used when communicating with the Relying Party.
type TokenBindingStatus ¶
type TokenBindingStatus string
TokenBindingStatus represents a token binding status value.
type User ¶
type User interface { EntityName() string EntityIcon() string EntityID() []byte EntityDisplayName() string Credentials() map[string]Credential }
User defines functions which return data required about the authenticating user in order to perform WebAuthn transactions.
type UserFinder ¶
UserFinder defines a function which takes a user handle as a parameter and returns an object which implements the User interface and an error
type UserVerificationRequirement ¶
type UserVerificationRequirement string
UserVerificationRequirement describes relying party user verification requirements
const ( VerificationRequired UserVerificationRequirement = "required" VerificationPreferred UserVerificationRequirement = "preferred" VerificationDiscouraged UserVerificationRequirement = "discouraged" )
enum values for UserVerificationRequirement type