Documentation
¶
Overview ¶
Package passkeytest is a virtual WebAuthn authenticator for tests (PHASE1 step 17): it answers the options of navigator.credentials.create() and .get() the way a browser with a platform authenticator does – ECDSA P-256, attestation "none", user verification done. Tests only.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator struct {
Origin string
// UserVerified is the UV flag it reports (default true via New).
UserVerified bool
// contains filtered or unexported fields
}
Authenticator holds the passkeys it created.
func New ¶
func New(origin string) *Authenticator
New returns an authenticator in a browser at origin.
func (*Authenticator) Create ¶
func (a *Authenticator) Create(options []byte) ([]byte, error)
Create answers PublicKeyCredentialCreationOptions ({"publicKey": …}).
func (*Authenticator) Get ¶
func (a *Authenticator) Get(options []byte) ([]byte, error)
Get answers PublicKeyCredentialRequestOptions with the first allowed credential it holds.
func (*Authenticator) SetCounter ¶
func (a *Authenticator) SetCounter(n uint32)
SetCounter sets the signature counter of every credential (clone tests).
Click to show internal directories.
Click to hide internal directories.