summaryrefslogtreecommitdiffhomepage
path: root/packages/typescript-types
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2022-12-27 19:17:42 -0800
committerMatthew Miller <matthew@millerti.me>2022-12-27 19:17:42 -0800
commitd821ec1f64463f135cd5e15dfd8bdd170bf91730 (patch)
tree2389122a82a4b44f3f4a1853874657c570545a21 /packages/typescript-types
parentd29197896c401e6f8d01116303bc86b41474c216 (diff)
Change over to AuthenticationResponseJSON
Diffstat (limited to 'packages/typescript-types')
-rw-r--r--packages/typescript-types/src/index.ts18
1 files changed, 10 insertions, 8 deletions
diff --git a/packages/typescript-types/src/index.ts b/packages/typescript-types/src/index.ts
index 7333249..43e2f5b 100644
--- a/packages/typescript-types/src/index.ts
+++ b/packages/typescript-types/src/index.ts
@@ -110,12 +110,16 @@ export interface AuthenticationCredential extends PublicKeyCredentialFuture {
/**
* A slightly-modified AuthenticationCredential to simplify working with ArrayBuffers that
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
+ *
+ * https://w3c.github.io/webauthn/#dictdef-authenticationresponsejson
*/
-export interface AuthenticationCredentialJSON
- extends Omit<AuthenticationCredential, 'response' | 'rawId' | 'getClientExtensionResults'> {
+export interface AuthenticationResponseJSON {
+ id: Base64URLString;
rawId: Base64URLString;
response: AuthenticatorAssertionResponseJSON;
+ authenticatorAttachment?: AuthenticatorAttachment;
clientExtensionResults: AuthenticationExtensionsClientOutputs;
+ type: PublicKeyCredentialType;
}
/**
@@ -133,14 +137,12 @@ export interface AuthenticatorAttestationResponseJSON {
/**
* A slightly-modified AuthenticatorAssertionResponse to simplify working with ArrayBuffers that
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
+ *
+ * https://w3c.github.io/webauthn/#dictdef-authenticatorassertionresponsejson
*/
-export interface AuthenticatorAssertionResponseJSON
- extends Omit<
- AuthenticatorAssertionResponse,
- 'authenticatorData' | 'clientDataJSON' | 'signature' | 'userHandle'
- > {
- authenticatorData: Base64URLString;
+export interface AuthenticatorAssertionResponseJSON {
clientDataJSON: Base64URLString;
+ authenticatorData: Base64URLString;
signature: Base64URLString;
userHandle?: string;
}