Documentation
¶
Overview ¶
Package passkeytest is a software authenticator for tests: enough of one to make attestations ("none") and assertions that the WebAuthn library accepts, with the flags, origin and counter under the test's control. Not for production use.
Index ¶
- type SoftAuth
- func (a *SoftAuth) Create(opts *protocol.CredentialCreation, rpID, origin string, uv bool) []byte
- func (a *SoftAuth) CredentialID() []byte
- func (a *SoftAuth) SetCredentialID(id []byte)
- func (a *SoftAuth) Sign(opts *protocol.CredentialAssertion, rpID, origin string, uv bool, ...) []byte
- func (a *SoftAuth) UserHandle() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SoftAuth ¶
type SoftAuth struct {
// contains filtered or unexported fields
}
SoftAuth is a software authenticator: enough of one to make attestations ("none") and assertions that the library accepts, with the flags, origin and counter under the test's control.
func (*SoftAuth) Create ¶
Create answers a registration: rpID and origin as the (possibly wrong) caller claims, uv whether it sets the UV flag.
func (*SoftAuth) CredentialID ¶
CredentialID is the authenticator's credential id; SetCredentialID replaces it (to forge a signature over another id).
func (*SoftAuth) SetCredentialID ¶
SetCredentialID sets the credential id.
func (*SoftAuth) Sign ¶
func (a *SoftAuth) Sign(opts *protocol.CredentialAssertion, rpID, origin string, uv bool, signCount uint32, userHandle []byte) []byte
Sign answers a sign-in.
func (*SoftAuth) UserHandle ¶
UserHandle is the handle the last registration carried (what a sign-in must send back).