summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/helpers/decodeAuthenticatorExtensions.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2022-11-05 22:41:00 -0700
committerMatthew Miller <matthew@millerti.me>2022-11-05 22:42:53 -0700
commit94101488e87a56393693e617d5502c6eae096d50 (patch)
tree9d15019b5ad3195e8491f1feb10f0b0600e733a4 /packages/server/src/helpers/decodeAuthenticatorExtensions.ts
parent3e372d7cbe5121cce5201cc0609767421b3218f0 (diff)
Replace most Buffer types with Uint8Array
Diffstat (limited to 'packages/server/src/helpers/decodeAuthenticatorExtensions.ts')
-rw-r--r--packages/server/src/helpers/decodeAuthenticatorExtensions.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/server/src/helpers/decodeAuthenticatorExtensions.ts b/packages/server/src/helpers/decodeAuthenticatorExtensions.ts
index a889879..738fa37 100644
--- a/packages/server/src/helpers/decodeAuthenticatorExtensions.ts
+++ b/packages/server/src/helpers/decodeAuthenticatorExtensions.ts
@@ -6,7 +6,7 @@ import cbor from 'cbor';
* @param extensionData Authenticator Extension Data buffer
*/
export function decodeAuthenticatorExtensions(
- extensionData: Buffer,
+ extensionData: Uint8Array,
): AuthenticationExtensionsAuthenticatorOutputs | undefined {
let toCBOR: AuthenticationExtensionsAuthenticatorOutputs | undefined;
try {
@@ -24,14 +24,14 @@ export type AuthenticationExtensionsAuthenticatorOutputs = {
};
export type DevicePublicKeyAuthenticatorOutput = {
- dpk?: Buffer;
- scp?: Buffer;
+ dpk?: Uint8Array;
+ scp?: Uint8Array;
sig?: string;
- aaguid?: Buffer;
+ aaguid?: Uint8Array;
};
// TODO: Need to verify this format
// https://w3c.github.io/webauthn/#sctn-uvm-extension.
export type UVMAuthenticatorOutput = {
- uvm?: Buffer[];
+ uvm?: Uint8Array[];
};