summaryrefslogtreecommitdiffhomepage
path: root/packages/typescript-types
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2022-04-27 22:15:50 -0700
committerGitHub <noreply@github.com>2022-04-27 22:15:50 -0700
commit76383fddef93d4ce4e9f9f7b4b8c3ce4cb685f79 (patch)
treef4d88f5208689e752b699ddaf19526eae40e9e24 /packages/typescript-types
parentdb2d9b2ab4df4c00566951107657a211cef74c90 (diff)
parent02396a1789fbcae2145e607d8f808f6268a759a2 (diff)
Merge pull request #198 from MasterKale/feat/cable-take-2
feat/cable-take-2
Diffstat (limited to 'packages/typescript-types')
-rw-r--r--packages/typescript-types/extract-dom-types.ts1
-rw-r--r--packages/typescript-types/src/index.ts10
2 files changed, 8 insertions, 3 deletions
diff --git a/packages/typescript-types/extract-dom-types.ts b/packages/typescript-types/extract-dom-types.ts
index 856cb63..75d16cc 100644
--- a/packages/typescript-types/extract-dom-types.ts
+++ b/packages/typescript-types/extract-dom-types.ts
@@ -20,7 +20,6 @@ const types = [
'AuthenticatorAssertionResponse',
'AttestationConveyancePreference',
'AuthenticatorAttestationResponse',
- 'AuthenticatorTransport',
'AuthenticationExtensionsClientInputs',
'AuthenticationExtensionsClientOutputs',
'AuthenticatorSelectionCriteria',
diff --git a/packages/typescript-types/src/index.ts b/packages/typescript-types/src/index.ts
index a930861..751474a 100644
--- a/packages/typescript-types/src/index.ts
+++ b/packages/typescript-types/src/index.ts
@@ -6,7 +6,6 @@
import type {
AuthenticatorAssertionResponse,
AuthenticatorAttestationResponse,
- AuthenticatorTransport,
COSEAlgorithmIdentifier,
PublicKeyCredential,
PublicKeyCredentialCreationOptions,
@@ -43,8 +42,9 @@ export interface PublicKeyCredentialRequestOptionsJSON
}
export interface PublicKeyCredentialDescriptorJSON
- extends Omit<PublicKeyCredentialDescriptor, 'id'> {
+ extends Omit<PublicKeyCredentialDescriptor, 'id' | 'transports'> {
id: Base64URLString;
+ transports?: AuthenticatorTransport[];
}
export interface PublicKeyCredentialUserEntityJSON
@@ -146,3 +146,9 @@ export interface AuthenticatorAttestationResponseFuture extends AuthenticatorAtt
getPublicKey?: () => ArrayBuffer;
getPublicKeyAlgorithm?: () => COSEAlgorithmIdentifier[];
}
+
+/**
+ * Communication methods by which an authenticator can talk with the browser to perform WebAuthn
+ * registration and authentication.
+ */
+export type AuthenticatorTransport = "ble" | "internal" | "nfc" | "usb" | "cable";