@simplewebauthn/browser 11.0.0 → 13.0.0-alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -23
- package/dist/bundle/index.es5.umd.min.js +2 -2
- package/dist/bundle/index.umd.min.js +2 -2
- package/esm/helpers/base64URLStringToBuffer.d.ts +9 -0
- package/esm/helpers/base64URLStringToBuffer.d.ts.map +1 -0
- package/esm/helpers/base64URLStringToBuffer.js +29 -0
- package/esm/helpers/browserSupportsWebAuthn.d.ts +12 -0
- package/esm/helpers/browserSupportsWebAuthn.d.ts.map +1 -0
- package/esm/helpers/browserSupportsWebAuthn.js +14 -0
- package/esm/helpers/browserSupportsWebAuthnAutofill.d.ts +9 -0
- package/esm/helpers/browserSupportsWebAuthnAutofill.d.ts.map +1 -0
- package/esm/helpers/browserSupportsWebAuthnAutofill.js +26 -0
- package/esm/helpers/bufferToBase64URLString.d.ts +8 -0
- package/esm/helpers/bufferToBase64URLString.d.ts.map +1 -0
- package/esm/helpers/bufferToBase64URLString.js +15 -0
- package/esm/helpers/identifyAuthenticationError.d.ts +9 -0
- package/esm/helpers/identifyAuthenticationError.d.ts.map +1 -0
- package/esm/helpers/identifyAuthenticationError.js +61 -0
- package/esm/helpers/identifyRegistrationError.d.ts +9 -0
- package/esm/helpers/identifyRegistrationError.d.ts.map +1 -0
- package/esm/helpers/identifyRegistrationError.js +126 -0
- package/esm/helpers/isValidDomain.d.ts +10 -0
- package/esm/helpers/isValidDomain.d.ts.map +1 -0
- package/esm/helpers/isValidDomain.js +14 -0
- package/esm/helpers/platformAuthenticatorIsAvailable.d.ts +8 -0
- package/esm/helpers/platformAuthenticatorIsAvailable.d.ts.map +1 -0
- package/esm/helpers/platformAuthenticatorIsAvailable.js +13 -0
- package/esm/helpers/toAuthenticatorAttachment.d.ts +6 -0
- package/esm/helpers/toAuthenticatorAttachment.d.ts.map +1 -0
- package/esm/helpers/toAuthenticatorAttachment.js +13 -0
- package/esm/helpers/toPublicKeyCredentialDescriptor.d.ts +3 -0
- package/esm/helpers/toPublicKeyCredentialDescriptor.d.ts.map +1 -0
- package/esm/helpers/toPublicKeyCredentialDescriptor.js +14 -0
- package/esm/helpers/webAuthnAbortService.d.ts +22 -0
- package/esm/helpers/webAuthnAbortService.d.ts.map +1 -0
- package/esm/helpers/webAuthnAbortService.js +37 -0
- package/{dist/types → esm}/helpers/webAuthnError.d.ts +18 -0
- package/esm/helpers/webAuthnError.d.ts.map +1 -0
- package/esm/helpers/webAuthnError.js +31 -0
- package/esm/index.d.ts +11 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +10 -0
- package/esm/methods/startAuthentication.d.ts +15 -0
- package/esm/methods/startAuthentication.d.ts.map +1 -0
- package/esm/methods/startAuthentication.js +89 -0
- package/esm/methods/startRegistration.d.ts +13 -0
- package/esm/methods/startRegistration.d.ts.map +1 -0
- package/esm/methods/startRegistration.js +115 -0
- package/esm/package.json +3 -0
- package/esm/types/dom.d.ts +329 -0
- package/esm/types/dom.d.ts.map +1 -0
- package/esm/types/dom.js +1 -0
- package/esm/types/index.d.ts +205 -0
- package/esm/types/index.d.ts.map +1 -0
- package/esm/types/index.js +1 -0
- package/package.json +25 -31
- package/script/helpers/base64URLStringToBuffer.d.ts +9 -0
- package/script/helpers/base64URLStringToBuffer.d.ts.map +1 -0
- package/script/helpers/base64URLStringToBuffer.js +32 -0
- package/script/helpers/browserSupportsWebAuthn.d.ts +12 -0
- package/script/helpers/browserSupportsWebAuthn.d.ts.map +1 -0
- package/script/helpers/browserSupportsWebAuthn.js +18 -0
- package/script/helpers/browserSupportsWebAuthnAutofill.d.ts +9 -0
- package/script/helpers/browserSupportsWebAuthnAutofill.d.ts.map +1 -0
- package/script/helpers/browserSupportsWebAuthnAutofill.js +30 -0
- package/script/helpers/bufferToBase64URLString.d.ts +8 -0
- package/script/helpers/bufferToBase64URLString.d.ts.map +1 -0
- package/script/helpers/bufferToBase64URLString.js +18 -0
- package/script/helpers/identifyAuthenticationError.d.ts +9 -0
- package/script/helpers/identifyAuthenticationError.d.ts.map +1 -0
- package/script/helpers/identifyAuthenticationError.js +64 -0
- package/script/helpers/identifyRegistrationError.d.ts +9 -0
- package/script/helpers/identifyRegistrationError.d.ts.map +1 -0
- package/script/helpers/identifyRegistrationError.js +129 -0
- package/script/helpers/isValidDomain.d.ts +10 -0
- package/script/helpers/isValidDomain.d.ts.map +1 -0
- package/script/helpers/isValidDomain.js +17 -0
- package/script/helpers/platformAuthenticatorIsAvailable.d.ts +8 -0
- package/script/helpers/platformAuthenticatorIsAvailable.d.ts.map +1 -0
- package/script/helpers/platformAuthenticatorIsAvailable.js +16 -0
- package/script/helpers/toAuthenticatorAttachment.d.ts +6 -0
- package/script/helpers/toAuthenticatorAttachment.d.ts.map +1 -0
- package/script/helpers/toAuthenticatorAttachment.js +16 -0
- package/script/helpers/toPublicKeyCredentialDescriptor.d.ts +3 -0
- package/script/helpers/toPublicKeyCredentialDescriptor.d.ts.map +1 -0
- package/script/helpers/toPublicKeyCredentialDescriptor.js +17 -0
- package/script/helpers/webAuthnAbortService.d.ts +22 -0
- package/script/helpers/webAuthnAbortService.d.ts.map +1 -0
- package/script/helpers/webAuthnAbortService.js +40 -0
- package/script/helpers/webAuthnError.d.ts +28 -0
- package/script/helpers/webAuthnError.d.ts.map +1 -0
- package/script/helpers/webAuthnError.js +35 -0
- package/script/index.d.ts +11 -0
- package/script/index.d.ts.map +1 -0
- package/script/index.js +26 -0
- package/script/methods/startAuthentication.d.ts +15 -0
- package/script/methods/startAuthentication.d.ts.map +1 -0
- package/script/methods/startAuthentication.js +92 -0
- package/script/methods/startRegistration.d.ts +13 -0
- package/script/methods/startRegistration.d.ts.map +1 -0
- package/script/methods/startRegistration.js +118 -0
- package/script/package.json +3 -0
- package/script/types/dom.d.ts +329 -0
- package/script/types/dom.d.ts.map +1 -0
- package/script/types/dom.js +2 -0
- package/script/types/index.d.ts +205 -0
- package/script/types/index.d.ts.map +1 -0
- package/script/types/index.js +2 -0
- package/dist/bundle/index.js +0 -398
- package/dist/types/helpers/base64URLStringToBuffer.d.ts +0 -1
- package/dist/types/helpers/browserSupportsWebAuthn.d.ts +0 -1
- package/dist/types/helpers/browserSupportsWebAuthnAutofill.d.ts +0 -1
- package/dist/types/helpers/bufferToBase64URLString.d.ts +0 -1
- package/dist/types/helpers/identifyAuthenticationError.d.ts +0 -5
- package/dist/types/helpers/identifyRegistrationError.d.ts +0 -5
- package/dist/types/helpers/isValidDomain.d.ts +0 -1
- package/dist/types/helpers/platformAuthenticatorIsAvailable.d.ts +0 -1
- package/dist/types/helpers/toAuthenticatorAttachment.d.ts +0 -2
- package/dist/types/helpers/toPublicKeyCredentialDescriptor.d.ts +0 -2
- package/dist/types/helpers/webAuthnAbortService.d.ts +0 -7
- package/dist/types/index.d.ts +0 -11
- package/dist/types/methods/startAuthentication.d.ts +0 -7
- package/dist/types/methods/startRegistration.d.ts +0 -6
- package/jest-environment.js +0 -29
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC"}
|
package/script/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./methods/startRegistration.js"), exports);
|
|
18
|
+
__exportStar(require("./methods/startAuthentication.js"), exports);
|
|
19
|
+
__exportStar(require("./helpers/browserSupportsWebAuthn.js"), exports);
|
|
20
|
+
__exportStar(require("./helpers/platformAuthenticatorIsAvailable.js"), exports);
|
|
21
|
+
__exportStar(require("./helpers/browserSupportsWebAuthnAutofill.js"), exports);
|
|
22
|
+
__exportStar(require("./helpers/base64URLStringToBuffer.js"), exports);
|
|
23
|
+
__exportStar(require("./helpers/bufferToBase64URLString.js"), exports);
|
|
24
|
+
__exportStar(require("./helpers/webAuthnAbortService.js"), exports);
|
|
25
|
+
__exportStar(require("./helpers/webAuthnError.js"), exports);
|
|
26
|
+
__exportStar(require("./types/index.js"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AuthenticationResponseJSON, PublicKeyCredentialRequestOptionsJSON } from '../types/index.js';
|
|
2
|
+
export type StartAuthenticationOpts = Parameters<typeof startAuthentication>[0];
|
|
3
|
+
/**
|
|
4
|
+
* Begin authenticator "login" via WebAuthn assertion
|
|
5
|
+
*
|
|
6
|
+
* @param optionsJSON Output from **@simplewebauthn/server**'s `generateAuthenticationOptions()`
|
|
7
|
+
* @param useBrowserAutofill (Optional) Initialize conditional UI to enable logging in via browser autofill prompts. Defaults to `false`.
|
|
8
|
+
* @param verifyBrowserAutofillInput (Optional) Ensure a suitable `<input>` element is present when `useBrowserAutofill` is `true`. Defaults to `true`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function startAuthentication(options: {
|
|
11
|
+
optionsJSON: PublicKeyCredentialRequestOptionsJSON;
|
|
12
|
+
useBrowserAutofill?: boolean;
|
|
13
|
+
verifyBrowserAutofillInput?: boolean;
|
|
14
|
+
}): Promise<AuthenticationResponseJSON>;
|
|
15
|
+
//# sourceMappingURL=startAuthentication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startAuthentication.d.ts","sourceRoot":"","sources":["../../src/methods/startAuthentication.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,0BAA0B,EAC1B,qCAAqC,EACtC,MAAM,mBAAmB,CAAC;AAU3B,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;AAEhF;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE;IACP,WAAW,EAAE,qCAAqC,CAAC;IACnD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC,GACA,OAAO,CAAC,0BAA0B,CAAC,CAkGrC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startAuthentication = startAuthentication;
|
|
4
|
+
const bufferToBase64URLString_js_1 = require("../helpers/bufferToBase64URLString.js");
|
|
5
|
+
const base64URLStringToBuffer_js_1 = require("../helpers/base64URLStringToBuffer.js");
|
|
6
|
+
const browserSupportsWebAuthn_js_1 = require("../helpers/browserSupportsWebAuthn.js");
|
|
7
|
+
const browserSupportsWebAuthnAutofill_js_1 = require("../helpers/browserSupportsWebAuthnAutofill.js");
|
|
8
|
+
const toPublicKeyCredentialDescriptor_js_1 = require("../helpers/toPublicKeyCredentialDescriptor.js");
|
|
9
|
+
const identifyAuthenticationError_js_1 = require("../helpers/identifyAuthenticationError.js");
|
|
10
|
+
const webAuthnAbortService_js_1 = require("../helpers/webAuthnAbortService.js");
|
|
11
|
+
const toAuthenticatorAttachment_js_1 = require("../helpers/toAuthenticatorAttachment.js");
|
|
12
|
+
/**
|
|
13
|
+
* Begin authenticator "login" via WebAuthn assertion
|
|
14
|
+
*
|
|
15
|
+
* @param optionsJSON Output from **@simplewebauthn/server**'s `generateAuthenticationOptions()`
|
|
16
|
+
* @param useBrowserAutofill (Optional) Initialize conditional UI to enable logging in via browser autofill prompts. Defaults to `false`.
|
|
17
|
+
* @param verifyBrowserAutofillInput (Optional) Ensure a suitable `<input>` element is present when `useBrowserAutofill` is `true`. Defaults to `true`.
|
|
18
|
+
*/
|
|
19
|
+
async function startAuthentication(options) {
|
|
20
|
+
const { optionsJSON, useBrowserAutofill = false, verifyBrowserAutofillInput = true, } = options;
|
|
21
|
+
if (!(0, browserSupportsWebAuthn_js_1.browserSupportsWebAuthn)()) {
|
|
22
|
+
throw new Error('WebAuthn is not supported in this browser');
|
|
23
|
+
}
|
|
24
|
+
// We need to avoid passing empty array to avoid blocking retrieval
|
|
25
|
+
// of public key
|
|
26
|
+
let allowCredentials;
|
|
27
|
+
if (optionsJSON.allowCredentials?.length !== 0) {
|
|
28
|
+
allowCredentials = optionsJSON.allowCredentials?.map(toPublicKeyCredentialDescriptor_js_1.toPublicKeyCredentialDescriptor);
|
|
29
|
+
}
|
|
30
|
+
// We need to convert some values to Uint8Arrays before passing the credentials to the navigator
|
|
31
|
+
const publicKey = {
|
|
32
|
+
...optionsJSON,
|
|
33
|
+
challenge: (0, base64URLStringToBuffer_js_1.base64URLStringToBuffer)(optionsJSON.challenge),
|
|
34
|
+
allowCredentials,
|
|
35
|
+
};
|
|
36
|
+
// Prepare options for `.get()`
|
|
37
|
+
const getOptions = {};
|
|
38
|
+
/**
|
|
39
|
+
* Set up the page to prompt the user to select a credential for authentication via the browser's
|
|
40
|
+
* input autofill mechanism.
|
|
41
|
+
*/
|
|
42
|
+
if (useBrowserAutofill) {
|
|
43
|
+
if (!(await (0, browserSupportsWebAuthnAutofill_js_1.browserSupportsWebAuthnAutofill)())) {
|
|
44
|
+
throw Error('Browser does not support WebAuthn autofill');
|
|
45
|
+
}
|
|
46
|
+
// Check for an <input> with "webauthn" in its `autocomplete` attribute
|
|
47
|
+
const eligibleInputs = document.querySelectorAll("input[autocomplete$='webauthn']");
|
|
48
|
+
// WebAuthn autofill requires at least one valid input
|
|
49
|
+
if (eligibleInputs.length < 1 && verifyBrowserAutofillInput) {
|
|
50
|
+
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
51
|
+
}
|
|
52
|
+
// `CredentialMediationRequirement` doesn't know about "conditional" yet as of
|
|
53
|
+
// typescript@4.6.3
|
|
54
|
+
getOptions.mediation = 'conditional';
|
|
55
|
+
// Conditional UI requires an empty allow list
|
|
56
|
+
publicKey.allowCredentials = [];
|
|
57
|
+
}
|
|
58
|
+
// Finalize options
|
|
59
|
+
getOptions.publicKey = publicKey;
|
|
60
|
+
// Set up the ability to cancel this request if the user attempts another
|
|
61
|
+
getOptions.signal = webAuthnAbortService_js_1.WebAuthnAbortService.createNewAbortSignal();
|
|
62
|
+
// Wait for the user to complete assertion
|
|
63
|
+
let credential;
|
|
64
|
+
try {
|
|
65
|
+
credential = (await navigator.credentials.get(getOptions));
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
throw (0, identifyAuthenticationError_js_1.identifyAuthenticationError)({ error: err, options: getOptions });
|
|
69
|
+
}
|
|
70
|
+
if (!credential) {
|
|
71
|
+
throw new Error('Authentication was not completed');
|
|
72
|
+
}
|
|
73
|
+
const { id, rawId, response, type } = credential;
|
|
74
|
+
let userHandle = undefined;
|
|
75
|
+
if (response.userHandle) {
|
|
76
|
+
userHandle = (0, bufferToBase64URLString_js_1.bufferToBase64URLString)(response.userHandle);
|
|
77
|
+
}
|
|
78
|
+
// Convert values to base64 to make it easier to send back to the server
|
|
79
|
+
return {
|
|
80
|
+
id,
|
|
81
|
+
rawId: (0, bufferToBase64URLString_js_1.bufferToBase64URLString)(rawId),
|
|
82
|
+
response: {
|
|
83
|
+
authenticatorData: (0, bufferToBase64URLString_js_1.bufferToBase64URLString)(response.authenticatorData),
|
|
84
|
+
clientDataJSON: (0, bufferToBase64URLString_js_1.bufferToBase64URLString)(response.clientDataJSON),
|
|
85
|
+
signature: (0, bufferToBase64URLString_js_1.bufferToBase64URLString)(response.signature),
|
|
86
|
+
userHandle,
|
|
87
|
+
},
|
|
88
|
+
type,
|
|
89
|
+
clientExtensionResults: credential.getClientExtensionResults(),
|
|
90
|
+
authenticatorAttachment: (0, toAuthenticatorAttachment_js_1.toAuthenticatorAttachment)(credential.authenticatorAttachment),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PublicKeyCredentialCreationOptionsJSON, RegistrationResponseJSON } from '../types/index.js';
|
|
2
|
+
export type StartRegistrationOpts = Parameters<typeof startRegistration>[0];
|
|
3
|
+
/**
|
|
4
|
+
* Begin authenticator "registration" via WebAuthn attestation
|
|
5
|
+
*
|
|
6
|
+
* @param optionsJSON Output from **@simplewebauthn/server**'s `generateRegistrationOptions()`
|
|
7
|
+
* @param useAutoRegister (Optional) Try to silently create a passkey with the password manager that the user just signed in with. Defaults to `false`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function startRegistration(options: {
|
|
10
|
+
optionsJSON: PublicKeyCredentialCreationOptionsJSON;
|
|
11
|
+
useAutoRegister?: boolean;
|
|
12
|
+
}): Promise<RegistrationResponseJSON>;
|
|
13
|
+
//# sourceMappingURL=startRegistration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startRegistration.d.ts","sourceRoot":"","sources":["../../src/methods/startRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,sCAAsC,EAEtC,wBAAwB,EACzB,MAAM,mBAAmB,CAAC;AAS3B,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAE5E;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE;IACP,WAAW,EAAE,sCAAsC,CAAC;IACpD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,GACA,OAAO,CAAC,wBAAwB,CAAC,CA6GnC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startRegistration = startRegistration;
|
|
4
|
+
const bufferToBase64URLString_js_1 = require("../helpers/bufferToBase64URLString.js");
|
|
5
|
+
const base64URLStringToBuffer_js_1 = require("../helpers/base64URLStringToBuffer.js");
|
|
6
|
+
const browserSupportsWebAuthn_js_1 = require("../helpers/browserSupportsWebAuthn.js");
|
|
7
|
+
const toPublicKeyCredentialDescriptor_js_1 = require("../helpers/toPublicKeyCredentialDescriptor.js");
|
|
8
|
+
const identifyRegistrationError_js_1 = require("../helpers/identifyRegistrationError.js");
|
|
9
|
+
const webAuthnAbortService_js_1 = require("../helpers/webAuthnAbortService.js");
|
|
10
|
+
const toAuthenticatorAttachment_js_1 = require("../helpers/toAuthenticatorAttachment.js");
|
|
11
|
+
/**
|
|
12
|
+
* Begin authenticator "registration" via WebAuthn attestation
|
|
13
|
+
*
|
|
14
|
+
* @param optionsJSON Output from **@simplewebauthn/server**'s `generateRegistrationOptions()`
|
|
15
|
+
* @param useAutoRegister (Optional) Try to silently create a passkey with the password manager that the user just signed in with. Defaults to `false`.
|
|
16
|
+
*/
|
|
17
|
+
async function startRegistration(options) {
|
|
18
|
+
const { optionsJSON, useAutoRegister = false } = options;
|
|
19
|
+
if (!(0, browserSupportsWebAuthn_js_1.browserSupportsWebAuthn)()) {
|
|
20
|
+
throw new Error('WebAuthn is not supported in this browser');
|
|
21
|
+
}
|
|
22
|
+
// We need to convert some values to Uint8Arrays before passing the credentials to the navigator
|
|
23
|
+
const publicKey = {
|
|
24
|
+
...optionsJSON,
|
|
25
|
+
challenge: (0, base64URLStringToBuffer_js_1.base64URLStringToBuffer)(optionsJSON.challenge),
|
|
26
|
+
user: {
|
|
27
|
+
...optionsJSON.user,
|
|
28
|
+
id: (0, base64URLStringToBuffer_js_1.base64URLStringToBuffer)(optionsJSON.user.id),
|
|
29
|
+
},
|
|
30
|
+
excludeCredentials: optionsJSON.excludeCredentials?.map(toPublicKeyCredentialDescriptor_js_1.toPublicKeyCredentialDescriptor),
|
|
31
|
+
};
|
|
32
|
+
// Prepare options for `.create()`
|
|
33
|
+
const createOptions = {};
|
|
34
|
+
/**
|
|
35
|
+
* Try to use conditional create to register a passkey for the user with the password manager
|
|
36
|
+
* the user just used to authenticate with. The user won't be shown any prominent UI by the
|
|
37
|
+
* browser.
|
|
38
|
+
*/
|
|
39
|
+
if (useAutoRegister) {
|
|
40
|
+
// @ts-ignore: `mediation` doesn't yet exist on CredentialCreationOptions but it's possible as of Sept 2024
|
|
41
|
+
createOptions.mediation = 'conditional';
|
|
42
|
+
}
|
|
43
|
+
// Finalize options
|
|
44
|
+
createOptions.publicKey = publicKey;
|
|
45
|
+
// Set up the ability to cancel this request if the user attempts another
|
|
46
|
+
createOptions.signal = webAuthnAbortService_js_1.WebAuthnAbortService.createNewAbortSignal();
|
|
47
|
+
// Wait for the user to complete attestation
|
|
48
|
+
let credential;
|
|
49
|
+
try {
|
|
50
|
+
credential = (await navigator.credentials.create(createOptions));
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
throw (0, identifyRegistrationError_js_1.identifyRegistrationError)({ error: err, options: createOptions });
|
|
54
|
+
}
|
|
55
|
+
if (!credential) {
|
|
56
|
+
throw new Error('Registration was not completed');
|
|
57
|
+
}
|
|
58
|
+
const { id, rawId, response, type } = credential;
|
|
59
|
+
// Continue to play it safe with `getTransports()` for now, even when L3 types say it's required
|
|
60
|
+
let transports = undefined;
|
|
61
|
+
if (typeof response.getTransports === 'function') {
|
|
62
|
+
transports = response.getTransports();
|
|
63
|
+
}
|
|
64
|
+
// L3 says this is required, but browser and webview support are still not guaranteed.
|
|
65
|
+
let responsePublicKeyAlgorithm = undefined;
|
|
66
|
+
if (typeof response.getPublicKeyAlgorithm === 'function') {
|
|
67
|
+
try {
|
|
68
|
+
responsePublicKeyAlgorithm = response.getPublicKeyAlgorithm();
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
warnOnBrokenImplementation('getPublicKeyAlgorithm()', error);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
let responsePublicKey = undefined;
|
|
75
|
+
if (typeof response.getPublicKey === 'function') {
|
|
76
|
+
try {
|
|
77
|
+
const _publicKey = response.getPublicKey();
|
|
78
|
+
if (_publicKey !== null) {
|
|
79
|
+
responsePublicKey = (0, bufferToBase64URLString_js_1.bufferToBase64URLString)(_publicKey);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
warnOnBrokenImplementation('getPublicKey()', error);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
// L3 says this is required, but browser and webview support are still not guaranteed.
|
|
87
|
+
let responseAuthenticatorData;
|
|
88
|
+
if (typeof response.getAuthenticatorData === 'function') {
|
|
89
|
+
try {
|
|
90
|
+
responseAuthenticatorData = (0, bufferToBase64URLString_js_1.bufferToBase64URLString)(response.getAuthenticatorData());
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
warnOnBrokenImplementation('getAuthenticatorData()', error);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
id,
|
|
98
|
+
rawId: (0, bufferToBase64URLString_js_1.bufferToBase64URLString)(rawId),
|
|
99
|
+
response: {
|
|
100
|
+
attestationObject: (0, bufferToBase64URLString_js_1.bufferToBase64URLString)(response.attestationObject),
|
|
101
|
+
clientDataJSON: (0, bufferToBase64URLString_js_1.bufferToBase64URLString)(response.clientDataJSON),
|
|
102
|
+
transports,
|
|
103
|
+
publicKeyAlgorithm: responsePublicKeyAlgorithm,
|
|
104
|
+
publicKey: responsePublicKey,
|
|
105
|
+
authenticatorData: responseAuthenticatorData,
|
|
106
|
+
},
|
|
107
|
+
type,
|
|
108
|
+
clientExtensionResults: credential.getClientExtensionResults(),
|
|
109
|
+
authenticatorAttachment: (0, toAuthenticatorAttachment_js_1.toAuthenticatorAttachment)(credential.authenticatorAttachment),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Visibly warn when we detect an issue related to a passkey provider intercepting WebAuthn API
|
|
114
|
+
* calls
|
|
115
|
+
*/
|
|
116
|
+
function warnOnBrokenImplementation(methodName, cause) {
|
|
117
|
+
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${methodName}. You should report this error to them.\n`, cause);
|
|
118
|
+
}
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DO NOT MODIFY THESE FILES!
|
|
3
|
+
*
|
|
4
|
+
* These files were copied from the **types** package. To update this file, make changes to those
|
|
5
|
+
* files instead and then run the following command from the monorepo root folder:
|
|
6
|
+
*
|
|
7
|
+
* deno task codegen:types
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Generated from typescript@5.6.3
|
|
11
|
+
* To regenerate, run the following command from the package root:
|
|
12
|
+
* deno task extract-dom-types
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Available only in secure contexts.
|
|
16
|
+
*
|
|
17
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAssertionResponse)
|
|
18
|
+
*/
|
|
19
|
+
export interface AuthenticatorAssertionResponse extends AuthenticatorResponse {
|
|
20
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAssertionResponse/authenticatorData) */
|
|
21
|
+
readonly authenticatorData: ArrayBuffer;
|
|
22
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAssertionResponse/signature) */
|
|
23
|
+
readonly signature: ArrayBuffer;
|
|
24
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAssertionResponse/userHandle) */
|
|
25
|
+
readonly userHandle: ArrayBuffer | null;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Available only in secure contexts.
|
|
29
|
+
*
|
|
30
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAttestationResponse)
|
|
31
|
+
*/
|
|
32
|
+
export interface AuthenticatorAttestationResponse extends AuthenticatorResponse {
|
|
33
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAttestationResponse/attestationObject) */
|
|
34
|
+
readonly attestationObject: ArrayBuffer;
|
|
35
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAttestationResponse/getAuthenticatorData) */
|
|
36
|
+
getAuthenticatorData(): ArrayBuffer;
|
|
37
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAttestationResponse/getPublicKey) */
|
|
38
|
+
getPublicKey(): ArrayBuffer | null;
|
|
39
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAttestationResponse/getPublicKeyAlgorithm) */
|
|
40
|
+
getPublicKeyAlgorithm(): COSEAlgorithmIdentifier;
|
|
41
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorAttestationResponse/getTransports) */
|
|
42
|
+
getTransports(): string[];
|
|
43
|
+
}
|
|
44
|
+
export interface AuthenticationExtensionsClientInputs {
|
|
45
|
+
appid?: string;
|
|
46
|
+
credProps?: boolean;
|
|
47
|
+
hmacCreateSecret?: boolean;
|
|
48
|
+
minPinLength?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface AuthenticationExtensionsClientOutputs {
|
|
51
|
+
appid?: boolean;
|
|
52
|
+
credProps?: CredentialPropertiesOutput;
|
|
53
|
+
hmacCreateSecret?: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface AuthenticatorSelectionCriteria {
|
|
56
|
+
authenticatorAttachment?: AuthenticatorAttachment;
|
|
57
|
+
requireResidentKey?: boolean;
|
|
58
|
+
residentKey?: ResidentKeyRequirement;
|
|
59
|
+
userVerification?: UserVerificationRequirement;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives.
|
|
63
|
+
*
|
|
64
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto)
|
|
65
|
+
*/
|
|
66
|
+
export interface Crypto {
|
|
67
|
+
/**
|
|
68
|
+
* Available only in secure contexts.
|
|
69
|
+
*
|
|
70
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
71
|
+
*/
|
|
72
|
+
readonly subtle: SubtleCrypto;
|
|
73
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
|
74
|
+
getRandomValues<T extends ArrayBufferView | null>(array: T): T;
|
|
75
|
+
/**
|
|
76
|
+
* Available only in secure contexts.
|
|
77
|
+
*
|
|
78
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID)
|
|
79
|
+
*/
|
|
80
|
+
randomUUID(): `${string}-${string}-${string}-${string}-${string}`;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Available only in secure contexts.
|
|
84
|
+
*
|
|
85
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential)
|
|
86
|
+
*/
|
|
87
|
+
export interface PublicKeyCredential extends Credential {
|
|
88
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/authenticatorAttachment) */
|
|
89
|
+
readonly authenticatorAttachment: string | null;
|
|
90
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/rawId) */
|
|
91
|
+
readonly rawId: ArrayBuffer;
|
|
92
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/response) */
|
|
93
|
+
readonly response: AuthenticatorResponse;
|
|
94
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/getClientExtensionResults) */
|
|
95
|
+
getClientExtensionResults(): AuthenticationExtensionsClientOutputs;
|
|
96
|
+
}
|
|
97
|
+
export interface PublicKeyCredentialCreationOptions {
|
|
98
|
+
attestation?: AttestationConveyancePreference;
|
|
99
|
+
authenticatorSelection?: AuthenticatorSelectionCriteria;
|
|
100
|
+
challenge: BufferSource;
|
|
101
|
+
excludeCredentials?: PublicKeyCredentialDescriptor[];
|
|
102
|
+
extensions?: AuthenticationExtensionsClientInputs;
|
|
103
|
+
pubKeyCredParams: PublicKeyCredentialParameters[];
|
|
104
|
+
rp: PublicKeyCredentialRpEntity;
|
|
105
|
+
timeout?: number;
|
|
106
|
+
user: PublicKeyCredentialUserEntity;
|
|
107
|
+
}
|
|
108
|
+
export interface PublicKeyCredentialDescriptor {
|
|
109
|
+
id: BufferSource;
|
|
110
|
+
transports?: AuthenticatorTransport[];
|
|
111
|
+
type: PublicKeyCredentialType;
|
|
112
|
+
}
|
|
113
|
+
export interface PublicKeyCredentialParameters {
|
|
114
|
+
alg: COSEAlgorithmIdentifier;
|
|
115
|
+
type: PublicKeyCredentialType;
|
|
116
|
+
}
|
|
117
|
+
export interface PublicKeyCredentialRequestOptions {
|
|
118
|
+
allowCredentials?: PublicKeyCredentialDescriptor[];
|
|
119
|
+
challenge: BufferSource;
|
|
120
|
+
extensions?: AuthenticationExtensionsClientInputs;
|
|
121
|
+
rpId?: string;
|
|
122
|
+
timeout?: number;
|
|
123
|
+
userVerification?: UserVerificationRequirement;
|
|
124
|
+
}
|
|
125
|
+
export interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity {
|
|
126
|
+
displayName: string;
|
|
127
|
+
id: BufferSource;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Available only in secure contexts.
|
|
131
|
+
*
|
|
132
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorResponse)
|
|
133
|
+
*/
|
|
134
|
+
export interface AuthenticatorResponse {
|
|
135
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AuthenticatorResponse/clientDataJSON) */
|
|
136
|
+
readonly clientDataJSON: ArrayBuffer;
|
|
137
|
+
}
|
|
138
|
+
export interface CredentialPropertiesOutput {
|
|
139
|
+
rk?: boolean;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto).
|
|
143
|
+
* Available only in secure contexts.
|
|
144
|
+
*
|
|
145
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
|
|
146
|
+
*/
|
|
147
|
+
export interface SubtleCrypto {
|
|
148
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
|
|
149
|
+
decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
|
|
150
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
|
|
151
|
+
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
|
|
152
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
|
|
153
|
+
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
154
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
|
|
155
|
+
digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
|
|
156
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
|
|
157
|
+
encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
|
|
158
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
|
|
159
|
+
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
|
|
160
|
+
exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
|
|
161
|
+
exportKey(format: KeyFormat, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
162
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
|
163
|
+
generateKey(algorithm: "Ed25519", extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise<CryptoKeyPair>;
|
|
164
|
+
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
|
|
165
|
+
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
166
|
+
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
|
|
167
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
|
|
168
|
+
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
169
|
+
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
170
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
|
|
171
|
+
sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
|
|
172
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
|
|
173
|
+
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
174
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
|
|
175
|
+
verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>;
|
|
176
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
|
|
177
|
+
wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Available only in secure contexts.
|
|
181
|
+
*
|
|
182
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Credential)
|
|
183
|
+
*/
|
|
184
|
+
export interface Credential {
|
|
185
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Credential/id) */
|
|
186
|
+
readonly id: string;
|
|
187
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Credential/type) */
|
|
188
|
+
readonly type: string;
|
|
189
|
+
}
|
|
190
|
+
export interface PublicKeyCredentialRpEntity extends PublicKeyCredentialEntity {
|
|
191
|
+
id?: string;
|
|
192
|
+
}
|
|
193
|
+
export interface PublicKeyCredentialEntity {
|
|
194
|
+
name: string;
|
|
195
|
+
}
|
|
196
|
+
export interface RsaOaepParams extends Algorithm {
|
|
197
|
+
label?: BufferSource;
|
|
198
|
+
}
|
|
199
|
+
export interface AesCtrParams extends Algorithm {
|
|
200
|
+
counter: BufferSource;
|
|
201
|
+
length: number;
|
|
202
|
+
}
|
|
203
|
+
export interface AesCbcParams extends Algorithm {
|
|
204
|
+
iv: BufferSource;
|
|
205
|
+
}
|
|
206
|
+
export interface AesGcmParams extends Algorithm {
|
|
207
|
+
additionalData?: BufferSource;
|
|
208
|
+
iv: BufferSource;
|
|
209
|
+
tagLength?: number;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
|
|
213
|
+
* Available only in secure contexts.
|
|
214
|
+
*
|
|
215
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
216
|
+
*/
|
|
217
|
+
export interface CryptoKey {
|
|
218
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
|
|
219
|
+
readonly algorithm: KeyAlgorithm;
|
|
220
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
|
|
221
|
+
readonly extractable: boolean;
|
|
222
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
|
|
223
|
+
readonly type: KeyType;
|
|
224
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
|
|
225
|
+
readonly usages: KeyUsage[];
|
|
226
|
+
}
|
|
227
|
+
export interface EcdhKeyDeriveParams extends Algorithm {
|
|
228
|
+
public: CryptoKey;
|
|
229
|
+
}
|
|
230
|
+
export interface HkdfParams extends Algorithm {
|
|
231
|
+
hash: HashAlgorithmIdentifier;
|
|
232
|
+
info: BufferSource;
|
|
233
|
+
salt: BufferSource;
|
|
234
|
+
}
|
|
235
|
+
export interface Pbkdf2Params extends Algorithm {
|
|
236
|
+
hash: HashAlgorithmIdentifier;
|
|
237
|
+
iterations: number;
|
|
238
|
+
salt: BufferSource;
|
|
239
|
+
}
|
|
240
|
+
export interface AesDerivedKeyParams extends Algorithm {
|
|
241
|
+
length: number;
|
|
242
|
+
}
|
|
243
|
+
export interface HmacImportParams extends Algorithm {
|
|
244
|
+
hash: HashAlgorithmIdentifier;
|
|
245
|
+
length?: number;
|
|
246
|
+
}
|
|
247
|
+
export interface JsonWebKey {
|
|
248
|
+
alg?: string;
|
|
249
|
+
crv?: string;
|
|
250
|
+
d?: string;
|
|
251
|
+
dp?: string;
|
|
252
|
+
dq?: string;
|
|
253
|
+
e?: string;
|
|
254
|
+
ext?: boolean;
|
|
255
|
+
k?: string;
|
|
256
|
+
key_ops?: string[];
|
|
257
|
+
kty?: string;
|
|
258
|
+
n?: string;
|
|
259
|
+
oth?: RsaOtherPrimesInfo[];
|
|
260
|
+
p?: string;
|
|
261
|
+
q?: string;
|
|
262
|
+
qi?: string;
|
|
263
|
+
use?: string;
|
|
264
|
+
x?: string;
|
|
265
|
+
y?: string;
|
|
266
|
+
}
|
|
267
|
+
export interface CryptoKeyPair {
|
|
268
|
+
privateKey: CryptoKey;
|
|
269
|
+
publicKey: CryptoKey;
|
|
270
|
+
}
|
|
271
|
+
export interface RsaHashedKeyGenParams extends RsaKeyGenParams {
|
|
272
|
+
hash: HashAlgorithmIdentifier;
|
|
273
|
+
}
|
|
274
|
+
export interface EcKeyGenParams extends Algorithm {
|
|
275
|
+
namedCurve: NamedCurve;
|
|
276
|
+
}
|
|
277
|
+
export interface AesKeyGenParams extends Algorithm {
|
|
278
|
+
length: number;
|
|
279
|
+
}
|
|
280
|
+
export interface HmacKeyGenParams extends Algorithm {
|
|
281
|
+
hash: HashAlgorithmIdentifier;
|
|
282
|
+
length?: number;
|
|
283
|
+
}
|
|
284
|
+
export interface RsaHashedImportParams extends Algorithm {
|
|
285
|
+
hash: HashAlgorithmIdentifier;
|
|
286
|
+
}
|
|
287
|
+
export interface EcKeyImportParams extends Algorithm {
|
|
288
|
+
namedCurve: NamedCurve;
|
|
289
|
+
}
|
|
290
|
+
export interface AesKeyAlgorithm extends KeyAlgorithm {
|
|
291
|
+
length: number;
|
|
292
|
+
}
|
|
293
|
+
export interface RsaPssParams extends Algorithm {
|
|
294
|
+
saltLength: number;
|
|
295
|
+
}
|
|
296
|
+
export interface EcdsaParams extends Algorithm {
|
|
297
|
+
hash: HashAlgorithmIdentifier;
|
|
298
|
+
}
|
|
299
|
+
export interface Algorithm {
|
|
300
|
+
name: string;
|
|
301
|
+
}
|
|
302
|
+
export interface KeyAlgorithm {
|
|
303
|
+
name: string;
|
|
304
|
+
}
|
|
305
|
+
export interface RsaOtherPrimesInfo {
|
|
306
|
+
d?: string;
|
|
307
|
+
r?: string;
|
|
308
|
+
t?: string;
|
|
309
|
+
}
|
|
310
|
+
export interface RsaKeyGenParams extends Algorithm {
|
|
311
|
+
modulusLength: number;
|
|
312
|
+
publicExponent: BigInteger;
|
|
313
|
+
}
|
|
314
|
+
export type AttestationConveyancePreference = "direct" | "enterprise" | "indirect" | "none";
|
|
315
|
+
export type AuthenticatorTransport = "ble" | "hybrid" | "internal" | "nfc" | "usb";
|
|
316
|
+
export type COSEAlgorithmIdentifier = number;
|
|
317
|
+
export type UserVerificationRequirement = "discouraged" | "preferred" | "required";
|
|
318
|
+
export type AuthenticatorAttachment = "cross-platform" | "platform";
|
|
319
|
+
export type ResidentKeyRequirement = "discouraged" | "preferred" | "required";
|
|
320
|
+
export type BufferSource = ArrayBufferView | ArrayBuffer;
|
|
321
|
+
export type PublicKeyCredentialType = "public-key";
|
|
322
|
+
export type AlgorithmIdentifier = Algorithm | string;
|
|
323
|
+
export type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
|
|
324
|
+
export type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
|
|
325
|
+
export type KeyType = "private" | "public" | "secret";
|
|
326
|
+
export type HashAlgorithmIdentifier = AlgorithmIdentifier;
|
|
327
|
+
export type NamedCurve = string;
|
|
328
|
+
export type BigInteger = Uint8Array;
|
|
329
|
+
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/types/dom.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH;;;;GAIG;AACH;;;;GAIG;AACH,MAAM,WAAW,8BAA+B,SAAQ,qBAAqB;IACzE,mHAAmH;IACnH,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC;IACxC,2GAA2G;IAC3G,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,4GAA4G;IAC5G,QAAQ,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;CAC3C;AAED;;;;GAIG;AACH,MAAM,WAAW,gCAAiC,SAAQ,qBAAqB;IAC3E,qHAAqH;IACrH,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC;IACxC,wHAAwH;IACxH,oBAAoB,IAAI,WAAW,CAAC;IACpC,gHAAgH;IAChH,YAAY,IAAI,WAAW,GAAG,IAAI,CAAC;IACnC,yHAAyH;IACzH,qBAAqB,IAAI,uBAAuB,CAAC;IACjD,iHAAiH;IACjH,aAAa,IAAI,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,oCAAo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