@simplewebauthn/server 12.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.
Files changed (161) hide show
  1. package/README.md +2 -2
  2. package/esm/authentication/generateAuthenticationOptions.d.ts +13 -13
  3. package/esm/authentication/generateAuthenticationOptions.d.ts.map +1 -1
  4. package/esm/authentication/verifyAuthenticationResponse.d.ts +18 -15
  5. package/esm/authentication/verifyAuthenticationResponse.d.ts.map +1 -1
  6. package/esm/helpers/convertCertBufferToPEM.d.ts +1 -1
  7. package/esm/helpers/convertCertBufferToPEM.d.ts.map +1 -1
  8. package/esm/helpers/cose.d.ts +22 -0
  9. package/esm/helpers/cose.d.ts.map +1 -1
  10. package/esm/helpers/cose.js +20 -0
  11. package/esm/helpers/decodeAttestationObject.d.ts +4 -0
  12. package/esm/helpers/decodeAttestationObject.d.ts.map +1 -1
  13. package/esm/helpers/decodeAttestationObject.js +4 -1
  14. package/esm/helpers/decodeClientDataJSON.d.ts +5 -1
  15. package/esm/helpers/decodeClientDataJSON.d.ts.map +1 -1
  16. package/esm/helpers/decodeClientDataJSON.js +4 -1
  17. package/esm/helpers/decodeCredentialPublicKey.d.ts +4 -0
  18. package/esm/helpers/decodeCredentialPublicKey.d.ts.map +1 -1
  19. package/esm/helpers/decodeCredentialPublicKey.js +4 -1
  20. package/esm/helpers/fetch.d.ts +4 -0
  21. package/esm/helpers/fetch.d.ts.map +1 -1
  22. package/esm/helpers/fetch.js +4 -1
  23. package/esm/helpers/generateChallenge.d.ts +4 -0
  24. package/esm/helpers/generateChallenge.d.ts.map +1 -1
  25. package/esm/helpers/generateChallenge.js +4 -1
  26. package/esm/helpers/generateUserID.d.ts +4 -0
  27. package/esm/helpers/generateUserID.d.ts.map +1 -1
  28. package/esm/helpers/generateUserID.js +4 -1
  29. package/esm/helpers/index.d.ts +16 -23
  30. package/esm/helpers/index.d.ts.map +1 -1
  31. package/esm/helpers/index.js +16 -17
  32. package/esm/helpers/iso/isoBase64URL.d.ts +1 -1
  33. package/esm/helpers/iso/isoBase64URL.d.ts.map +1 -1
  34. package/esm/helpers/iso/isoBase64URL.js +4 -0
  35. package/esm/helpers/iso/isoCBOR.d.ts +4 -0
  36. package/esm/helpers/iso/isoCBOR.d.ts.map +1 -1
  37. package/esm/helpers/iso/isoCBOR.js +4 -0
  38. package/esm/helpers/iso/isoCrypto/getWebCrypto.d.ts +1 -1
  39. package/esm/helpers/iso/isoCrypto/getWebCrypto.d.ts.map +1 -1
  40. package/esm/helpers/iso/isoCrypto/index.d.ts +4 -0
  41. package/esm/helpers/iso/isoCrypto/index.d.ts.map +1 -1
  42. package/esm/helpers/iso/isoCrypto/index.js +4 -0
  43. package/esm/helpers/iso/isoUint8Array.d.ts +4 -0
  44. package/esm/helpers/iso/isoUint8Array.d.ts.map +1 -1
  45. package/esm/helpers/iso/isoUint8Array.js +4 -0
  46. package/esm/helpers/parseAuthenticatorData.d.ts +4 -0
  47. package/esm/helpers/parseAuthenticatorData.d.ts.map +1 -1
  48. package/esm/helpers/parseAuthenticatorData.js +4 -1
  49. package/esm/helpers/parseBackupFlags.d.ts +1 -1
  50. package/esm/helpers/parseBackupFlags.d.ts.map +1 -1
  51. package/esm/helpers/validateCertificatePath.d.ts +3 -3
  52. package/esm/helpers/validateCertificatePath.d.ts.map +1 -1
  53. package/esm/helpers/validateCertificatePath.js +81 -58
  54. package/esm/helpers/verifySignature.d.ts +4 -0
  55. package/esm/helpers/verifySignature.d.ts.map +1 -1
  56. package/esm/helpers/verifySignature.js +4 -1
  57. package/esm/index.d.ts +8 -17
  58. package/esm/index.d.ts.map +1 -1
  59. package/esm/index.js +8 -11
  60. package/esm/metadata/mdsTypes.d.ts +5 -1
  61. package/esm/metadata/mdsTypes.d.ts.map +1 -1
  62. package/esm/metadata/verifyAttestationWithMetadata.d.ts +2 -2
  63. package/esm/metadata/verifyAttestationWithMetadata.d.ts.map +1 -1
  64. package/esm/metadata/verifyAttestationWithMetadata.js +1 -1
  65. package/esm/registration/generateRegistrationOptions.d.ts +21 -19
  66. package/esm/registration/generateRegistrationOptions.d.ts.map +1 -1
  67. package/esm/registration/generateRegistrationOptions.js +22 -1
  68. package/esm/registration/verifyRegistrationResponse.d.ts +17 -14
  69. package/esm/registration/verifyRegistrationResponse.d.ts.map +1 -1
  70. package/esm/services/metadataService.d.ts +22 -18
  71. package/esm/services/metadataService.d.ts.map +1 -1
  72. package/esm/services/metadataService.js +0 -19
  73. package/esm/services/settingsService.d.ts +11 -1
  74. package/esm/services/settingsService.d.ts.map +1 -1
  75. package/esm/services/settingsService.js +0 -10
  76. package/esm/types/dom.d.ts +329 -0
  77. package/esm/types/dom.d.ts.map +1 -0
  78. package/esm/types/dom.js +1 -0
  79. package/esm/types/index.d.ts +205 -0
  80. package/esm/types/index.d.ts.map +1 -0
  81. package/esm/types/index.js +1 -0
  82. package/package.json +2 -3
  83. package/script/authentication/generateAuthenticationOptions.d.ts +13 -13
  84. package/script/authentication/generateAuthenticationOptions.d.ts.map +1 -1
  85. package/script/authentication/verifyAuthenticationResponse.d.ts +18 -15
  86. package/script/authentication/verifyAuthenticationResponse.d.ts.map +1 -1
  87. package/script/helpers/convertCertBufferToPEM.d.ts +1 -1
  88. package/script/helpers/convertCertBufferToPEM.d.ts.map +1 -1
  89. package/script/helpers/cose.d.ts +22 -0
  90. package/script/helpers/cose.d.ts.map +1 -1
  91. package/script/helpers/cose.js +20 -0
  92. package/script/helpers/decodeAttestationObject.d.ts +4 -0
  93. package/script/helpers/decodeAttestationObject.d.ts.map +1 -1
  94. package/script/helpers/decodeAttestationObject.js +4 -1
  95. package/script/helpers/decodeClientDataJSON.d.ts +5 -1
  96. package/script/helpers/decodeClientDataJSON.d.ts.map +1 -1
  97. package/script/helpers/decodeClientDataJSON.js +4 -1
  98. package/script/helpers/decodeCredentialPublicKey.d.ts +4 -0
  99. package/script/helpers/decodeCredentialPublicKey.d.ts.map +1 -1
  100. package/script/helpers/decodeCredentialPublicKey.js +4 -1
  101. package/script/helpers/fetch.d.ts +4 -0
  102. package/script/helpers/fetch.d.ts.map +1 -1
  103. package/script/helpers/fetch.js +4 -1
  104. package/script/helpers/generateChallenge.d.ts +4 -0
  105. package/script/helpers/generateChallenge.d.ts.map +1 -1
  106. package/script/helpers/generateChallenge.js +4 -1
  107. package/script/helpers/generateUserID.d.ts +4 -0
  108. package/script/helpers/generateUserID.d.ts.map +1 -1
  109. package/script/helpers/generateUserID.js +4 -1
  110. package/script/helpers/index.d.ts +16 -23
  111. package/script/helpers/index.d.ts.map +1 -1
  112. package/script/helpers/index.js +20 -36
  113. package/script/helpers/iso/isoBase64URL.d.ts +1 -1
  114. package/script/helpers/iso/isoBase64URL.d.ts.map +1 -1
  115. package/script/helpers/iso/isoBase64URL.js +4 -0
  116. package/script/helpers/iso/isoCBOR.d.ts +4 -0
  117. package/script/helpers/iso/isoCBOR.d.ts.map +1 -1
  118. package/script/helpers/iso/isoCBOR.js +4 -0
  119. package/script/helpers/iso/isoCrypto/getWebCrypto.d.ts +1 -1
  120. package/script/helpers/iso/isoCrypto/getWebCrypto.d.ts.map +1 -1
  121. package/script/helpers/iso/isoCrypto/index.d.ts +4 -0
  122. package/script/helpers/iso/isoCrypto/index.d.ts.map +1 -1
  123. package/script/helpers/iso/isoCrypto/index.js +4 -0
  124. package/script/helpers/iso/isoUint8Array.d.ts +4 -0
  125. package/script/helpers/iso/isoUint8Array.d.ts.map +1 -1
  126. package/script/helpers/iso/isoUint8Array.js +4 -0
  127. package/script/helpers/parseAuthenticatorData.d.ts +4 -0
  128. package/script/helpers/parseAuthenticatorData.d.ts.map +1 -1
  129. package/script/helpers/parseAuthenticatorData.js +4 -1
  130. package/script/helpers/parseBackupFlags.d.ts +1 -1
  131. package/script/helpers/parseBackupFlags.d.ts.map +1 -1
  132. package/script/helpers/validateCertificatePath.d.ts +3 -3
  133. package/script/helpers/validateCertificatePath.d.ts.map +1 -1
  134. package/script/helpers/validateCertificatePath.js +81 -58
  135. package/script/helpers/verifySignature.d.ts +4 -0
  136. package/script/helpers/verifySignature.d.ts.map +1 -1
  137. package/script/helpers/verifySignature.js +4 -1
  138. package/script/index.d.ts +8 -17
  139. package/script/index.d.ts.map +1 -1
  140. package/script/index.js +22 -17
  141. package/script/metadata/mdsTypes.d.ts +5 -1
  142. package/script/metadata/mdsTypes.d.ts.map +1 -1
  143. package/script/metadata/verifyAttestationWithMetadata.d.ts +2 -2
  144. package/script/metadata/verifyAttestationWithMetadata.d.ts.map +1 -1
  145. package/script/registration/generateRegistrationOptions.d.ts +21 -19
  146. package/script/registration/generateRegistrationOptions.d.ts.map +1 -1
  147. package/script/registration/generateRegistrationOptions.js +22 -1
  148. package/script/registration/verifyRegistrationResponse.d.ts +17 -14
  149. package/script/registration/verifyRegistrationResponse.d.ts.map +1 -1
  150. package/script/services/metadataService.d.ts +22 -18
  151. package/script/services/metadataService.d.ts.map +1 -1
  152. package/script/services/metadataService.js +0 -19
  153. package/script/services/settingsService.d.ts +11 -1
  154. package/script/services/settingsService.d.ts.map +1 -1
  155. package/script/services/settingsService.js +0 -10
  156. package/script/types/dom.d.ts +329 -0
  157. package/script/types/dom.d.ts.map +1 -0
  158. package/script/types/dom.js +2 -0
  159. package/script/types/index.d.ts +205 -0
  160. package/script/types/index.d.ts.map +1 -0
  161. package/script/types/index.js +2 -0
@@ -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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MAAM,mBAAmB,GAAG,SAAS,GAAG,MAAM,CAAC;AACrD,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AACxH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AACzD,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACtD,MAAM,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;AAC1D,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAChC,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,205 @@
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
+ import type { AttestationConveyancePreference, AuthenticationExtensionsClientInputs, AuthenticationExtensionsClientOutputs, AuthenticatorAssertionResponse, AuthenticatorAttachment, AuthenticatorAttestationResponse, AuthenticatorSelectionCriteria, COSEAlgorithmIdentifier, PublicKeyCredential, PublicKeyCredentialCreationOptions, PublicKeyCredentialDescriptor, PublicKeyCredentialParameters, PublicKeyCredentialRequestOptions, PublicKeyCredentialRpEntity, PublicKeyCredentialType, UserVerificationRequirement } from './dom.js';
10
+ export type { AttestationConveyancePreference, AuthenticationExtensionsClientInputs, AuthenticationExtensionsClientOutputs, AuthenticatorAssertionResponse, AuthenticatorAttachment, AuthenticatorAttestationResponse, AuthenticatorSelectionCriteria, AuthenticatorTransport, COSEAlgorithmIdentifier, Crypto, PublicKeyCredential, PublicKeyCredentialCreationOptions, PublicKeyCredentialDescriptor, PublicKeyCredentialParameters, PublicKeyCredentialRequestOptions, PublicKeyCredentialRpEntity, PublicKeyCredentialType, PublicKeyCredentialUserEntity, UserVerificationRequirement, } from './dom.js';
11
+ /**
12
+ * A variant of PublicKeyCredentialCreationOptions suitable for JSON transmission to the browser to
13
+ * (eventually) get passed into navigator.credentials.create(...) in the browser.
14
+ *
15
+ * This should eventually get replaced with official TypeScript DOM types when WebAuthn L3 types
16
+ * eventually make it into the language:
17
+ *
18
+ * https://w3c.github.io/webauthn/#dictdef-publickeycredentialcreationoptionsjson
19
+ */
20
+ export interface PublicKeyCredentialCreationOptionsJSON {
21
+ rp: PublicKeyCredentialRpEntity;
22
+ user: PublicKeyCredentialUserEntityJSON;
23
+ challenge: Base64URLString;
24
+ pubKeyCredParams: PublicKeyCredentialParameters[];
25
+ timeout?: number;
26
+ excludeCredentials?: PublicKeyCredentialDescriptorJSON[];
27
+ authenticatorSelection?: AuthenticatorSelectionCriteria;
28
+ hints?: PublicKeyCredentialHint[];
29
+ attestation?: AttestationConveyancePreference;
30
+ attestationFormats?: AttestationFormat[];
31
+ extensions?: AuthenticationExtensionsClientInputs;
32
+ }
33
+ /**
34
+ * A variant of PublicKeyCredentialRequestOptions suitable for JSON transmission to the browser to
35
+ * (eventually) get passed into navigator.credentials.get(...) in the browser.
36
+ */
37
+ export interface PublicKeyCredentialRequestOptionsJSON {
38
+ challenge: Base64URLString;
39
+ timeout?: number;
40
+ rpId?: string;
41
+ allowCredentials?: PublicKeyCredentialDescriptorJSON[];
42
+ userVerification?: UserVerificationRequirement;
43
+ hints?: PublicKeyCredentialHint[];
44
+ extensions?: AuthenticationExtensionsClientInputs;
45
+ }
46
+ /**
47
+ * https://w3c.github.io/webauthn/#dictdef-publickeycredentialdescriptorjson
48
+ */
49
+ export interface PublicKeyCredentialDescriptorJSON {
50
+ id: Base64URLString;
51
+ type: PublicKeyCredentialType;
52
+ transports?: AuthenticatorTransportFuture[];
53
+ }
54
+ /**
55
+ * https://w3c.github.io/webauthn/#dictdef-publickeycredentialuserentityjson
56
+ */
57
+ export interface PublicKeyCredentialUserEntityJSON {
58
+ id: string;
59
+ name: string;
60
+ displayName: string;
61
+ }
62
+ /**
63
+ * The value returned from navigator.credentials.create()
64
+ */
65
+ export interface RegistrationCredential extends PublicKeyCredentialFuture {
66
+ response: AuthenticatorAttestationResponseFuture;
67
+ }
68
+ /**
69
+ * A slightly-modified RegistrationCredential to simplify working with ArrayBuffers that
70
+ * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
71
+ *
72
+ * https://w3c.github.io/webauthn/#dictdef-registrationresponsejson
73
+ */
74
+ export interface RegistrationResponseJSON {
75
+ id: Base64URLString;
76
+ rawId: Base64URLString;
77
+ response: AuthenticatorAttestationResponseJSON;
78
+ authenticatorAttachment?: AuthenticatorAttachment;
79
+ clientExtensionResults: AuthenticationExtensionsClientOutputs;
80
+ type: PublicKeyCredentialType;
81
+ }
82
+ /**
83
+ * The value returned from navigator.credentials.get()
84
+ */
85
+ export interface AuthenticationCredential extends PublicKeyCredentialFuture {
86
+ response: AuthenticatorAssertionResponse;
87
+ }
88
+ /**
89
+ * A slightly-modified AuthenticationCredential to simplify working with ArrayBuffers that
90
+ * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
91
+ *
92
+ * https://w3c.github.io/webauthn/#dictdef-authenticationresponsejson
93
+ */
94
+ export interface AuthenticationResponseJSON {
95
+ id: Base64URLString;
96
+ rawId: Base64URLString;
97
+ response: AuthenticatorAssertionResponseJSON;
98
+ authenticatorAttachment?: AuthenticatorAttachment;
99
+ clientExtensionResults: AuthenticationExtensionsClientOutputs;
100
+ type: PublicKeyCredentialType;
101
+ }
102
+ /**
103
+ * A slightly-modified AuthenticatorAttestationResponse to simplify working with ArrayBuffers that
104
+ * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
105
+ *
106
+ * https://w3c.github.io/webauthn/#dictdef-authenticatorattestationresponsejson
107
+ */
108
+ export interface AuthenticatorAttestationResponseJSON {
109
+ clientDataJSON: Base64URLString;
110
+ attestationObject: Base64URLString;
111
+ authenticatorData?: Base64URLString;
112
+ transports?: AuthenticatorTransportFuture[];
113
+ publicKeyAlgorithm?: COSEAlgorithmIdentifier;
114
+ publicKey?: Base64URLString;
115
+ }
116
+ /**
117
+ * A slightly-modified AuthenticatorAssertionResponse to simplify working with ArrayBuffers that
118
+ * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
119
+ *
120
+ * https://w3c.github.io/webauthn/#dictdef-authenticatorassertionresponsejson
121
+ */
122
+ export interface AuthenticatorAssertionResponseJSON {
123
+ clientDataJSON: Base64URLString;
124
+ authenticatorData: Base64URLString;
125
+ signature: Base64URLString;
126
+ userHandle?: Base64URLString;
127
+ }
128
+ /**
129
+ * Public key credential information needed to verify authentication responses
130
+ */
131
+ export type WebAuthnCredential = {
132
+ id: Base64URLString;
133
+ publicKey: Uint8Array;
134
+ counter: number;
135
+ transports?: AuthenticatorTransportFuture[];
136
+ };
137
+ /**
138
+ * An attempt to communicate that this isn't just any string, but a Base64URL-encoded string
139
+ */
140
+ export type Base64URLString = string;
141
+ /**
142
+ * AuthenticatorAttestationResponse in TypeScript's DOM lib is outdated (up through v3.9.7).
143
+ * Maintain an augmented version here so we can implement additional properties as the WebAuthn
144
+ * spec evolves.
145
+ *
146
+ * See https://www.w3.org/TR/webauthn-2/#iface-authenticatorattestationresponse
147
+ *
148
+ * Properties marked optional are not supported in all browsers.
149
+ */
150
+ export interface AuthenticatorAttestationResponseFuture extends AuthenticatorAttestationResponse {
151
+ getTransports(): AuthenticatorTransportFuture[];
152
+ }
153
+ /**
154
+ * A super class of TypeScript's `AuthenticatorTransport` that includes support for the latest
155
+ * transports. Should eventually be replaced by TypeScript's when TypeScript gets updated to
156
+ * know about it (sometime after 4.6.3)
157
+ */
158
+ export type AuthenticatorTransportFuture = 'ble' | 'cable' | 'hybrid' | 'internal' | 'nfc' | 'smart-card' | 'usb';
159
+ /**
160
+ * A super class of TypeScript's `PublicKeyCredentialDescriptor` that knows about the latest
161
+ * transports. Should eventually be replaced by TypeScript's when TypeScript gets updated to
162
+ * know about it (sometime after 4.6.3)
163
+ */
164
+ export interface PublicKeyCredentialDescriptorFuture extends Omit<PublicKeyCredentialDescriptor, 'transports'> {
165
+ transports?: AuthenticatorTransportFuture[];
166
+ }
167
+ /** */
168
+ export type PublicKeyCredentialJSON = RegistrationResponseJSON | AuthenticationResponseJSON;
169
+ /**
170
+ * A super class of TypeScript's `PublicKeyCredential` that knows about upcoming WebAuthn features
171
+ */
172
+ export interface PublicKeyCredentialFuture extends PublicKeyCredential {
173
+ type: PublicKeyCredentialType;
174
+ isConditionalMediationAvailable?(): Promise<boolean>;
175
+ parseCreationOptionsFromJSON?(options: PublicKeyCredentialCreationOptionsJSON): PublicKeyCredentialCreationOptions;
176
+ parseRequestOptionsFromJSON?(options: PublicKeyCredentialRequestOptionsJSON): PublicKeyCredentialRequestOptions;
177
+ toJSON?(): PublicKeyCredentialJSON;
178
+ }
179
+ /**
180
+ * The two types of credentials as defined by bit 3 ("Backup Eligibility") in authenticator data:
181
+ * - `"singleDevice"` credentials will never be backed up
182
+ * - `"multiDevice"` credentials can be backed up
183
+ */
184
+ export type CredentialDeviceType = 'singleDevice' | 'multiDevice';
185
+ /**
186
+ * Categories of authenticators that Relying Parties can pass along to browsers during
187
+ * registration. Browsers that understand these values can optimize their modal experience to
188
+ * start the user off in a particular registration flow:
189
+ *
190
+ * - `hybrid`: A platform authenticator on a mobile device
191
+ * - `security-key`: A portable FIDO2 authenticator capable of being used on multiple devices via a USB or NFC connection
192
+ * - `client-device`: The device that WebAuthn is being called on. Typically synonymous with platform authenticators
193
+ *
194
+ * See https://w3c.github.io/webauthn/#enumdef-publickeycredentialhint
195
+ *
196
+ * These values are less strict than `authenticatorAttachment`
197
+ */
198
+ export type PublicKeyCredentialHint = 'hybrid' | 'security-key' | 'client-device';
199
+ /**
200
+ * Values for an attestation object's `fmt`
201
+ *
202
+ * See https://www.iana.org/assignments/webauthn/webauthn.xhtml#webauthn-attestation-statement-format-ids
203
+ */
204
+ export type AttestationFormat = 'fido-u2f' | 'packed' | 'android-safetynet' | 'android-key' | 'tpm' | 'apple' | 'none';
205
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,+BAA+B,EAC/B,oCAAoC,EACpC,qCAAqC,EACrC,8BAA8B,EAC9B,uBAAuB,EACvB,gCAAgC,EAChC,8BAA8B,EAC9B,uBAAuB,EACvB,mBAAmB,EACnB,kCAAkC,EAClC,6BAA6B,EAC7B,6BAA6B,EAC7B,iCAAiC,EACjC,2BAA2B,EAC3B,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAElB,YAAY,EACV,+BAA+B,EAC/B,oCAAoC,EACpC,qCAAqC,EACrC,8BAA8B,EAC9B,uBAAuB,EACvB,gCAAgC,EAChC,8BAA8B,EAC9B,sBAAsB,EACtB,uBAAuB,EACvB,MAAM,EACN,mBAAmB,EACnB,kCAAkC,EAClC,6BAA6B,EAC7B,6BAA6B,EAC7B,iCAAiC,EACjC,2BAA2B,EAC3B,uBAAuB,EACvB,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,UAAU,CAAC;AAElB;;;;;;;;GAQG;AACH,MAAM,WAAW,sCAAsC;IACrD,EAAE,EAAE,2BAA2B,CAAC;IAChC,IAAI,EAAE,iCAAiC,CAAC;IACxC,SAAS,EAAE,eAAe,CAAC;IAC3B,gBAAgB,EAAE,6BAA6B,EAAE,CAAC;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,iCAAiC,EAAE,CAAC;IACzD,sBAAsB,CAAC,EAAE,8BAA8B,CAAC;IACxD,KAAK,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAClC,WAAW,CAAC,EAAE,+BAA+B,CAAC;IAC9C,kBAAkB,CAAC,EAAE,iBAA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