From d29197896c401e6f8d01116303bc86b41474c216 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Tue, 27 Dec 2022 19:16:52 -0800 Subject: Change over to RegistrationResponseJSON --- packages/typescript-types/src/index.ts | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'packages/typescript-types/src') diff --git a/packages/typescript-types/src/index.ts b/packages/typescript-types/src/index.ts index 4b20694..7333249 100644 --- a/packages/typescript-types/src/index.ts +++ b/packages/typescript-types/src/index.ts @@ -88,13 +88,16 @@ export interface RegistrationCredential extends PublicKeyCredentialFuture { /** * A slightly-modified RegistrationCredential 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-registrationresponsejson */ -export interface RegistrationCredentialJSON - extends Omit { +export interface RegistrationResponseJSON { + id: Base64URLString; rawId: Base64URLString; response: AuthenticatorAttestationResponseJSON; + authenticatorAttachment?: AuthenticatorAttachment; clientExtensionResults: AuthenticationExtensionsClientOutputs; - transports?: AuthenticatorTransportFuture[]; + type: PublicKeyCredentialType; } /** @@ -118,19 +121,13 @@ export interface AuthenticationCredentialJSON /** * A slightly-modified AuthenticatorAttestationResponse 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-authenticatorattestationresponsejson */ -export interface AuthenticatorAttestationResponseJSON - extends Omit< - AuthenticatorAttestationResponseFuture, - | 'clientDataJSON' - | 'attestationObject' - | 'getTransports' - | 'getAuthenticatorData' - | 'getPublicKey' - | 'getPublicKeyAlgorithm' - > { +export interface AuthenticatorAttestationResponseJSON { clientDataJSON: Base64URLString; attestationObject: Base64URLString; + transports: AuthenticatorTransportFuture[]; } /** -- cgit v1.2.3