Add READMEs for remaining packages
- db-schema: Database schema types from kysely-codegen - db: Database client and helper functions - testing: Overview of testing packages - test-helpers: Database testing utilities - virtual-authenticator: WebAuthn virtual authenticator Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
39
packages/testing/virtual-authenticator/README.md
Normal file
39
packages/testing/virtual-authenticator/README.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# @reviq/virtual-authenticator
|
||||
|
||||
WebAuthn virtual authenticator for testing passkey registration and authentication flows.
|
||||
|
||||
## Usage
|
||||
|
||||
```typescript
|
||||
import { VirtualAuthenticator } from "@reviq/virtual-authenticator";
|
||||
|
||||
const authenticator = new VirtualAuthenticator({
|
||||
aaguid: "00000000-0000-0000-0000-000000000000",
|
||||
});
|
||||
|
||||
// Create a credential during registration
|
||||
const credential = await authenticator.create(
|
||||
publicKeyCredentialCreationOptions,
|
||||
);
|
||||
|
||||
// Use the credential during authentication
|
||||
const assertion = await authenticator.get(
|
||||
publicKeyCredentialRequestOptions,
|
||||
);
|
||||
```
|
||||
|
||||
## Exports
|
||||
|
||||
### Classes
|
||||
- `VirtualAuthenticator` - Simulates a WebAuthn authenticator
|
||||
|
||||
### Utilities
|
||||
- `base64urlToUint8Array(str)` - Decode base64url to bytes
|
||||
- `uint8ArrayToBase64url(bytes)` - Encode bytes to base64url
|
||||
- `parseAaguid(str)` - Parse an AAGUID string to bytes
|
||||
|
||||
### Constants
|
||||
- `DEFAULT_AAGUID` - Default AAGUID for the virtual authenticator
|
||||
|
||||
### Types
|
||||
- `VirtualAuthenticatorOptions` - Configuration options for the authenticator
|
||||
Reference in New Issue
Block a user