Documentation ¶
Index ¶
Constants ¶
View Source
const ( // User Present flag. AuthDataFlag_UserPresent = 1 << iota // Reserved for future use. AuthDataFlag_RFU1 // User Verified flag. AuthDataFlag_UserVerified // Reserved for future use. AuthDataFlag_RFU2 // Reserved for future use. AuthDataFlag_RFU3 // Reserved for future use. AuthDataFlag_RFU4 // Attested credential data included. AuthDataFlag_AttestedCredentialData // Extension data included. AuthDataFlag_ExtensionData )
View Source
const ( // ClientDataTypeCreate is the type of a client data for a registration. ClientDataTypeCreate = "webauthn.create" // ClientDataTypeGet is the type of a client data for an authentication. ClientDataTypeGet = "webauthn.get" )
Variables ¶
View Source
var CertExtID_FidoGenCEAAGUID = []int{1, 3, 6, 1, 4, 1, 45724, 1, 1, 4}
const id-fido-gen-ce-aaguid
Functions ¶
Types ¶
type AttestationObject ¶
type AttestationObject struct { AuthData []byte `cbor:"authData"` Fmt string `cbor:"fmt"` AttStmt map[string]any `cbor:"attStmt"` // contains filtered or unexported fields }
AttestationObject represents the structure of the attestation object.
func (*AttestationObject) AuthenticatorData ¶
func (o *AttestationObject) AuthenticatorData() (*AuthenticatorData, error)
type AttestedCredential ¶
type AttestedCredential struct { AAGUID [16]byte CredID []byte CredPublicKeyType pubkey.KeyType CredPublicKey crypto.PublicKey }
func (*AttestedCredential) Decode ¶
func (c *AttestedCredential) Decode(buf []byte) error
type AuthenticatorAssertionResponse ¶
type AuthenticatorAssertionResponse struct { AuthData []byte ClientDataJSON []byte Signature []byte UserHandle []byte // contains filtered or unexported fields }
AuthenticatorAssertionResponse is an authentication response.
func (*AuthenticatorAssertionResponse) AuthenticatorData ¶
func (a *AuthenticatorAssertionResponse) AuthenticatorData() (*AuthenticatorData, error)
func (*AuthenticatorAssertionResponse) ClientData ¶
func (a *AuthenticatorAssertionResponse) ClientData() (*ClientData, error)
type AuthenticatorAttestationResponse ¶
type AuthenticatorAttestationResponse struct { ClientDataJSON []byte AttestationObjectCBOR []byte // contains filtered or unexported fields }
AuthenticatorAttestationResponse is a registration response.
func (*AuthenticatorAttestationResponse) AttestationObject ¶
func (a *AuthenticatorAttestationResponse) AttestationObject() (*AttestationObject, error)
func (*AuthenticatorAttestationResponse) ClientData ¶
func (a *AuthenticatorAttestationResponse) ClientData() (*ClientData, error)
func (*AuthenticatorAttestationResponse) Verify ¶
func (a *AuthenticatorAttestationResponse) Verify() error
Verify checks a signed WebAuthn response against the public key of the device.
type AuthenticatorData ¶
type AuthenticatorData struct { RPIDHash [sha256.Size]byte Flags byte SignCount uint32 AttestedCredential *AttestedCredential }
AuthenticatorData represents the authenticator data structure.
func (*AuthenticatorData) Decode ¶
func (a *AuthenticatorData) Decode(buf []byte) error
type ClientData ¶
type ClientData struct { Type string `json:"type"` Challenge string `json:"challenge"` Origin string `json:"origin"` CrossOrigin *bool `json:"crossOrigin,omitempty"` }
func (*ClientData) DecodeChallenge ¶
func (c *ClientData) DecodeChallenge() (challenge.Challenge, error)
type PubKeyCredParam ¶
PubKeyCredParam defines a supported type of public key and its signature algorithm.
Click to show internal directories.
Click to hide internal directories.