Documentation
¶
Overview ¶
Package passkeytest is a software WebAuthn authenticator for passkey integration tests: it answers real registration and assertion ceremonies with a P-256 key, so tests exercise the production ceremony code paths.
Index ¶
- func UserHandle(t testing.TB, id any) []byte
- type Authenticator
- func (a *Authenticator) Assert(t testing.TB, assertion *protocol.CredentialAssertion, signCount uint32) []byte
- func (a *Authenticator) Assertion(t testing.TB, rpID, challenge string, signCount uint32) []byte
- func (a *Authenticator) Attestation(t testing.TB, rpID string, userHandle []byte, challenge string) []byte
- func (a *Authenticator) Register(t testing.TB, creation *protocol.CredentialCreation) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Authenticator ¶
type Authenticator struct {
Key *ecdsa.PrivateKey
CredentialID []byte
UserHandle []byte
Origin string
UserVerified bool
BackupEligible bool
BackupState bool
}
Authenticator is one resident (discoverable) credential. The flag fields are applied to every response it produces; defaults model a synced platform passkey with user verification.
func (*Authenticator) Assert ¶
func (a *Authenticator) Assert(t testing.TB, assertion *protocol.CredentialAssertion, signCount uint32) []byte
Assert answers an in-process assertion ceremony.
func (*Authenticator) Assertion ¶
Assertion signs a discoverable assertion for the ceremony parameters with the given signature counter (0 models a synced passkey).
func (*Authenticator) Attestation ¶
func (a *Authenticator) Attestation(t testing.TB, rpID string, userHandle []byte, challenge string) []byte
Attestation builds a `none`-format registration response for the ceremony parameters, binding the credential to userHandle.
func (*Authenticator) Register ¶
func (a *Authenticator) Register(t testing.TB, creation *protocol.CredentialCreation) []byte
Register answers an in-process creation ceremony.