diff options
author | Matthew Miller <matthew@millerti.me> | 2022-12-10 22:40:45 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-10 22:40:45 -0800 |
commit | 461b67c0c6fadfb55c1da6c9c8ab2693ba4c9a03 (patch) | |
tree | ae713d608966ac977390e7bbfbeab5ea79a191bc /packages/typescript-types/src | |
parent | 33528afe001d4aca62052dce204c0398c3127ffd (diff) | |
parent | 90dd7f247182329987a8e23f476d9280d8d5c265 (diff) |
Merge pull request #299 from MasterKale/feat/isomorphic
feat/isomorphic
Diffstat (limited to 'packages/typescript-types/src')
-rw-r--r-- | packages/typescript-types/src/index.ts | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/packages/typescript-types/src/index.ts b/packages/typescript-types/src/index.ts index 7513555..3bb93ba 100644 --- a/packages/typescript-types/src/index.ts +++ b/packages/typescript-types/src/index.ts @@ -6,7 +6,6 @@ import type { AuthenticatorAssertionResponse, AuthenticatorAttestationResponse, - COSEAlgorithmIdentifier, PublicKeyCredential, PublicKeyCredentialCreationOptions, PublicKeyCredentialDescriptor, @@ -14,7 +13,6 @@ import type { PublicKeyCredentialUserEntity, AuthenticationExtensionsClientInputs, AuthenticationExtensionsClientOutputs, - AuthenticatorAttachment, } from './dom'; export * from './dom'; @@ -95,7 +93,15 @@ export interface AuthenticationCredentialJSON * are Base64URL-encoded in the browser so that they can be sent as JSON to the server. */ export interface AuthenticatorAttestationResponseJSON - extends Omit<AuthenticatorAttestationResponseFuture, 'clientDataJSON' | 'attestationObject'> { + extends Omit< + AuthenticatorAttestationResponseFuture, + | 'clientDataJSON' + | 'attestationObject' + | 'getTransports' + | 'getAuthenticatorData' + | 'getPublicKey' + | 'getPublicKeyAlgorithm' + > { clientDataJSON: Base64URLString; attestationObject: Base64URLString; } @@ -119,8 +125,8 @@ export interface AuthenticatorAssertionResponseJSON * A WebAuthn-compatible device and the information needed to verify assertions by it */ export type AuthenticatorDevice = { - credentialPublicKey: Buffer; - credentialID: Buffer; + credentialPublicKey: Uint8Array; + credentialID: Uint8Array; // Number of times this authenticator is expected to have been used counter: number; // From browser's `startRegistration()` -> RegistrationCredentialJSON.transports (API L2 and up) @@ -142,10 +148,7 @@ export type Base64URLString = string; * Properties marked optional are not supported in all browsers. */ export interface AuthenticatorAttestationResponseFuture extends AuthenticatorAttestationResponse { - getTransports?: () => AuthenticatorTransportFuture[]; - getAuthenticatorData?: () => ArrayBuffer; - getPublicKey?: () => ArrayBuffer; - getPublicKeyAlgorithm?: () => COSEAlgorithmIdentifier[]; + getTransports: () => AuthenticatorTransportFuture[]; } /** @@ -171,8 +174,6 @@ export interface PublicKeyCredentialDescriptorFuture export interface PublicKeyCredentialFuture extends PublicKeyCredential { // See https://github.com/w3c/webauthn/issues/1745 isConditionalMediationAvailable?(): Promise<boolean>; - // See https://w3c.github.io/webauthn/#dom-publickeycredential-authenticatorattachment - authenticatorAttachment?: AuthenticatorAttachment; } /** |