diff options
author | Matthew Miller <matthew@millerti.me> | 2022-12-27 19:16:52 -0800 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2022-12-27 19:17:18 -0800 |
commit | d29197896c401e6f8d01116303bc86b41474c216 (patch) | |
tree | 723401f0e16ab3fab4de5b202c025aaecbbbd904 /packages/typescript-types/src | |
parent | 5c189467882fc11a9ac7fcbac5cc8ab5d6bba03f (diff) |
Change over to RegistrationResponseJSON
Diffstat (limited to 'packages/typescript-types/src')
-rw-r--r-- | packages/typescript-types/src/index.ts | 23 |
1 files changed, 10 insertions, 13 deletions
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<RegistrationCredential, 'response' | 'rawId' | 'getClientExtensionResults'> { +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[]; } /** |