@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
package/README.md CHANGED
@@ -18,13 +18,13 @@ and **[JSR](https://jsr.io/@simplewebauthn/server)**:
18
18
  ### Node LTS 20.x and higher
19
19
 
20
20
  ```sh
21
- npm install @simplewebauthn/server @simplewebauthn/types
21
+ npm install @simplewebauthn/server
22
22
  ```
23
23
 
24
24
  ### Deno v1.43 and higher
25
25
 
26
26
  ```sh
27
- deno add jsr:@simplewebauthn/server jsr:@simplewebauthn/types
27
+ deno add jsr:@simplewebauthn/server
28
28
  ```
29
29
 
30
30
  ## Documentation
@@ -1,15 +1,5 @@
1
- import type { AuthenticationExtensionsClientInputs, AuthenticatorTransportFuture, Base64URLString, PublicKeyCredentialRequestOptionsJSON, UserVerificationRequirement } from '@simplewebauthn/types';
2
- export type GenerateAuthenticationOptionsOpts = {
3
- rpID: string;
4
- allowCredentials?: {
5
- id: Base64URLString;
6
- transports?: AuthenticatorTransportFuture[];
7
- }[];
8
- challenge?: string | Uint8Array;
9
- timeout?: number;
10
- userVerification?: UserVerificationRequirement;
11
- extensions?: AuthenticationExtensionsClientInputs;
12
- };
1
+ import type { AuthenticationExtensionsClientInputs, AuthenticatorTransportFuture, Base64URLString, PublicKeyCredentialRequestOptionsJSON } from '../types/index.js';
2
+ export type GenerateAuthenticationOptionsOpts = Parameters<typeof generateAuthenticationOptions>[0];
13
3
  /**
14
4
  * Prepare a value to pass into navigator.credentials.get(...) for authenticator authentication
15
5
  *
@@ -22,5 +12,15 @@ export type GenerateAuthenticationOptionsOpts = {
22
12
  * @param userVerification **(Optional)** - Set to `'discouraged'` when asserting as part of a 2FA flow, otherwise set to `'preferred'` or `'required'` as desired. Defaults to `"preferred"`
23
13
  * @param extensions **(Optional)** - Additional plugins the authenticator or browser should use during authentication
24
14
  */
25
- export declare function generateAuthenticationOptions(options: GenerateAuthenticationOptionsOpts): Promise<PublicKeyCredentialRequestOptionsJSON>;
15
+ export declare function generateAuthenticationOptions(options: {
16
+ rpID: string;
17
+ allowCredentials?: {
18
+ id: Base64URLString;
19
+ transports?: AuthenticatorTransportFuture[];
20
+ }[];
21
+ challenge?: string | Uint8Array;
22
+ timeout?: number;
23
+ userVerification?: 'required' | 'preferred' | 'discouraged';
24
+ extensions?: AuthenticationExtensionsClientInputs;
25
+ }): Promise<PublicKeyCredentialRequestOptionsJSON>;
26
26
  //# sourceMappingURL=generateAuthenticationOptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generateAuthenticationOptions.d.ts","sourceRoot":"","sources":["../../src/authentication/generateAuthenticationOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oCAAoC,EACpC,4BAA4B,EAC5B,eAAe,EACf,qCAAqC,EACrC,2BAA2B,EAC5B,MAAM,uBAAuB,CAAC;AAK/B,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE;QACjB,EAAE,EAAE,eAAe,CAAC;QACpB,UAAU,CAAC,EAAE,4BAA4B,EAAE,CAAC;KAC7C,EAAE,CAAC;IACJ,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,2BAA2B,CAAC;IAC/C,UAAU,CAAC,EAAE,oCAAoC,CAAC;CACnD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,iCAAiC,GACzC,OAAO,CAAC,qCAAqC,CAAC,CAoChD"}
1
+ {"version":3,"file":"generateAuthenticationOptions.d.ts","sourceRoot":"","sources":["../../src/authentication/generateAuthenticationOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oCAAoC,EACpC,4BAA4B,EAC5B,eAAe,EACf,qCAAqC,EACtC,MAAM,mBAAmB,CAAC;AAI3B,MAAM,MAAM,iCAAiC,GAAG,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC;AAEpG;;;;;;;;;;;GAWG;AACH,wBAAsB,6BAA6B,CACjD,OAAO,EAAE;IACP,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE;QACjB,EAAE,EAAE,eAAe,CAAC;QACpB,UAAU,CAAC,EAAE,4BAA4B,EAAE,CAAC;KAC7C,EAAE,CAAC;IACJ,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,aAAa,CAAC;IAC5D,UAAU,CAAC,EAAE,oCAAoC,CAAC;CACnD,GACA,OAAO,CAAC,qCAAqC,CAAC,CAoChD"}
@@ -1,17 +1,9 @@
1
- import type { AuthenticationResponseJSON, Base64URLString, CredentialDeviceType, UserVerificationRequirement, WebAuthnCredential } from '@simplewebauthn/types';
2
- import { AuthenticationExtensionsAuthenticatorOutputs } from '../helpers/decodeAuthenticatorExtensions.js';
3
- export type VerifyAuthenticationResponseOpts = {
4
- response: AuthenticationResponseJSON;
5
- expectedChallenge: string | ((challenge: string) => boolean | Promise<boolean>);
6
- expectedOrigin: string | string[];
7
- expectedRPID: string | string[];
8
- credential: WebAuthnCredential;
9
- expectedType?: string | string[];
10
- requireUserVerification?: boolean;
11
- advancedFIDOConfig?: {
12
- userVerification?: UserVerificationRequirement;
13
- };
14
- };
1
+ import type { AuthenticationResponseJSON, Base64URLString, CredentialDeviceType, UserVerificationRequirement, WebAuthnCredential } from '../types/index.js';
2
+ import type { AuthenticationExtensionsAuthenticatorOutputs } from '../helpers/decodeAuthenticatorExtensions.js';
3
+ /**
4
+ * Configurable options when calling `verifyAuthenticationResponse()`
5
+ */
6
+ export type VerifyAuthenticationResponseOpts = Parameters<typeof verifyAuthenticationResponse>[0];
15
7
  /**
16
8
  * Verify that the user has legitimately completed the authentication process
17
9
  *
@@ -27,7 +19,18 @@ export type VerifyAuthenticationResponseOpts = {
27
19
  * @param advancedFIDOConfig **(Optional)** - Options for satisfying more stringent FIDO RP feature requirements
28
20
  * @param advancedFIDOConfig.userVerification **(Optional)** - Enable alternative rules for evaluating the User Presence and User Verified flags in authenticator data: UV (and UP) flags are optional unless this value is `"required"`
29
21
  */
30
- export declare function verifyAuthenticationResponse(options: VerifyAuthenticationResponseOpts): Promise<VerifiedAuthenticationResponse>;
22
+ export declare function verifyAuthenticationResponse(options: {
23
+ response: AuthenticationResponseJSON;
24
+ expectedChallenge: string | ((challenge: string) => boolean | Promise<boolean>);
25
+ expectedOrigin: string | string[];
26
+ expectedRPID: string | string[];
27
+ credential: WebAuthnCredential;
28
+ expectedType?: string | string[];
29
+ requireUserVerification?: boolean;
30
+ advancedFIDOConfig?: {
31
+ userVerification?: UserVerificationRequirement;
32
+ };
33
+ }): Promise<VerifiedAuthenticationResponse>;
31
34
  /**
32
35
  * Result of authentication verification
33
36
  *
@@ -1 +1 @@
1
- {"version":3,"file":"verifyAuthenticationResponse.d.ts","sourceRoot":"","sources":["../../src/authentication/verifyAuthenticationResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,eAAe,EACf,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAO/B,OAAO,EAAE,4CAA4C,EAAE,MAAM,6CAA6C,CAAC;AAI3G,MAAM,MAAM,gCAAgC,GAAG;IAC7C,QAAQ,EAAE,0BAA0B,CAAC;IACrC,iBAAiB,EAAE,MAAM,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAChF,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAClC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAChC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACjC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE;QACnB,gBAAgB,CAAC,EAAE,2BAA2B,CAAC;KAChD,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,8BAA8B,CAAC,CAmNzC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,EAAE;QAClB,YAAY,EAAE,eAAe,CAAC;QAC9B,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,OAAO,CAAC;QACtB,oBAAoB,EAAE,oBAAoB,CAAC;QAC3C,kBAAkB,EAAE,OAAO,CAAC;QAC5B,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,6BAA6B,CAAC,EAAE,4CAA4C,CAAC;KAC9E,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"verifyAuthenticationResponse.d.ts","sourceRoot":"","sources":["../../src/authentication/verifyAuthenticationResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,eAAe,EACf,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,KAAK,EAAE,4CAA4C,EAAE,MAAM,6CAA6C,CAAC;AAIhH;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC,CAAC,CAAC,CAAC;AAElG;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE;IACP,QAAQ,EAAE,0BAA0B,CAAC;IACrC,iBAAiB,EAAE,MAAM,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAChF,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAClC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAChC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACjC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE;QACnB,gBAAgB,CAAC,EAAE,2BAA2B,CAAC;KAChD,CAAC;CACH,GACA,OAAO,CAAC,8BAA8B,CAAC,CAmNzC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,EAAE;QAClB,YAAY,EAAE,eAAe,CAAC;QAC9B,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,OAAO,CAAC;QACtB,oBAAoB,EAAE,oBAAoB,CAAC;QAC3C,kBAAkB,EAAE,OAAO,CAAC;QAC5B,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,6BAA6B,CAAC,EAAE,4CAA4C,CAAC;KAC9E,CAAC;CACH,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Base64URLString } from '@simplewebauthn/types';
1
+ import type { Base64URLString } from '../types/index.js';
2
2
  /**
3
3
  * Convert buffer to an OpenSSL-compatible PEM text format.
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"convertCertBufferToPEM.d.ts","sourceRoot":"","sources":["../../src/helpers/convertCertBufferToPEM.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,UAAU,GAAG,eAAe,GACvC,MAAM,CA4BR"}
1
+ {"version":3,"file":"convertCertBufferToPEM.d.ts","sourceRoot":"","sources":["../../src/helpers/convertCertBufferToPEM.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,UAAU,GAAG,eAAe,GACvC,MAAM,CA4BR"}
@@ -7,6 +7,10 @@
7
7
  *
8
8
  * These types are an unorthodox way of saying "these Maps should involve these discrete lists of
9
9
  * keys", but it works.
10
+ * @module
11
+ */
12
+ /**
13
+ * COSE public key common values
10
14
  */
11
15
  export type COSEPublicKey = {
12
16
  get(key: COSEKEYS.kty): COSEKTY | undefined;
@@ -14,12 +18,18 @@ export type COSEPublicKey = {
14
18
  set(key: COSEKEYS.kty, value: COSEKTY): void;
15
19
  set(key: COSEKEYS.alg, value: COSEALG): void;
16
20
  };
21
+ /**
22
+ * Values specific to Octet Key Pair public keys
23
+ */
17
24
  export type COSEPublicKeyOKP = COSEPublicKey & {
18
25
  get(key: COSEKEYS.crv): number | undefined;
19
26
  get(key: COSEKEYS.x): Uint8Array | undefined;
20
27
  set(key: COSEKEYS.crv, value: number): void;
21
28
  set(key: COSEKEYS.x, value: Uint8Array): void;
22
29
  };
30
+ /**
31
+ * Values specific to Elliptic Curve Cryptography public keys
32
+ */
23
33
  export type COSEPublicKeyEC2 = COSEPublicKey & {
24
34
  get(key: COSEKEYS.crv): number | undefined;
25
35
  get(key: COSEKEYS.x): Uint8Array | undefined;
@@ -28,14 +38,26 @@ export type COSEPublicKeyEC2 = COSEPublicKey & {
28
38
  set(key: COSEKEYS.x, value: Uint8Array): void;
29
39
  set(key: COSEKEYS.y, value: Uint8Array): void;
30
40
  };
41
+ /**
42
+ * Values specific to RSA public keys
43
+ */
31
44
  export type COSEPublicKeyRSA = COSEPublicKey & {
32
45
  get(key: COSEKEYS.n): Uint8Array | undefined;
33
46
  get(key: COSEKEYS.e): Uint8Array | undefined;
34
47
  set(key: COSEKEYS.n, value: Uint8Array): void;
35
48
  set(key: COSEKEYS.e, value: Uint8Array): void;
36
49
  };
50
+ /**
51
+ * A type guard for determining if a COSE public key is an OKP key pair
52
+ */
37
53
  export declare function isCOSEPublicKeyOKP(cosePublicKey: COSEPublicKey): cosePublicKey is COSEPublicKeyOKP;
54
+ /**
55
+ * A type guard for determining if a COSE public key is an EC2 key pair
56
+ */
38
57
  export declare function isCOSEPublicKeyEC2(cosePublicKey: COSEPublicKey): cosePublicKey is COSEPublicKeyEC2;
58
+ /**
59
+ * A type guard for determining if a COSE public key is an RSA key pair
60
+ */
39
61
  export declare function isCOSEPublicKeyRSA(cosePublicKey: COSEPublicKey): cosePublicKey is COSEPublicKeyRSA;
40
62
  /**
41
63
  * COSE Keys
@@ -1 +1 @@
1
- {"version":3,"file":"cose.d.ts","sourceRoot":"","sources":["../../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3B,aAAa,IAAI,gBAAgB,CAGnC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,aAAa,GAC3B,aAAa,IAAI,gBAAgB,CAGnC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,aAAa,GAC3B,aAAa,IAAI,gBAAgB,CAGnC;AAED;;;;;GAKG;AACH,oBAAY,QAAQ;IAClB,GAAG,IAAI;IACP,GAAG,IAAI;IACP,GAAG,KAAK;IACR,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;CACP;AAED;;;;GAIG;AACH,oBAAY,OAAO;IACjB,GAAG,IAAI;IACP,GAAG,IAAI;IACP,GAAG,IAAI;CACR;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,GAAG,IAAI,OAAO,CAEjE;AAED;;;;GAIG;AACH,oBAAY,OAAO;IACjB,IAAI,IAAI;IACR,IAAI,IAAI;IACR,IAAI,IAAI;IACR,OAAO,IAAI;IACX,SAAS,IAAI;CACd;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,GAAG,IAAI,OAAO,CAEjE;AAED;;;;GAIG;AACH,oBAAY,OAAO;IACjB,KAAK,KAAK;IACV,KAAK,KAAK;IACV,KAAK,MAAM;IACX,KAAK,MAAM;IACX,KAAK,MAAM;IACX,KAAK,MAAM;IACX,KAAK,MAAM;IACX,MAAM,MAAM;IACZ,KAAK,OAAO;IACZ,KAAK,OAAO;IACZ,KAAK,OAAO;IACZ,GAAG,SAAS;CACb;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,GAAG,IAAI,OAAO,CAEjE"}
@@ -1,11 +1,31 @@
1
+ /**
2
+ * Fundamental values that are needed to discern the more specific COSE public key types below.
3
+ *
4
+ * The use of `Maps` here is due to CBOR encoding being used with public keys, and the CBOR "Map"
5
+ * type is being decoded to JavaScript's `Map` type instead of, say, a basic Object as us JS
6
+ * developers might prefer.
7
+ *
8
+ * These types are an unorthodox way of saying "these Maps should involve these discrete lists of
9
+ * keys", but it works.
10
+ * @module
11
+ */
12
+ /**
13
+ * A type guard for determining if a COSE public key is an OKP key pair
14
+ */
1
15
  export function isCOSEPublicKeyOKP(cosePublicKey) {
2
16
  const kty = cosePublicKey.get(COSEKEYS.kty);
3
17
  return isCOSEKty(kty) && kty === COSEKTY.OKP;
4
18
  }
19
+ /**
20
+ * A type guard for determining if a COSE public key is an EC2 key pair
21
+ */
5
22
  export function isCOSEPublicKeyEC2(cosePublicKey) {
6
23
  const kty = cosePublicKey.get(COSEKEYS.kty);
7
24
  return isCOSEKty(kty) && kty === COSEKTY.EC2;
8
25
  }
26
+ /**
27
+ * A type guard for determining if a COSE public key is an RSA key pair
28
+ */
9
29
  export function isCOSEPublicKeyRSA(cosePublicKey) {
10
30
  const kty = cosePublicKey.get(COSEKEYS.kty);
11
31
  return isCOSEKty(kty) && kty === COSEKTY.RSA;
@@ -24,6 +24,10 @@ export type AttestationStatement = {
24
24
  get(key: 'pubArea'): Uint8Array | undefined;
25
25
  readonly size: number;
26
26
  };
27
+ /**
28
+ * Make it possible to stub the return value during testing
29
+ * @ignore Don't include this in docs output
30
+ */
27
31
  export declare const _decodeAttestationObjectInternals: {
28
32
  stubThis: (value: AttestationObject) => AttestationObject;
29
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"decodeAttestationObject.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeAttestationObject.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,iBAAiB,EAAE,UAAU,GAC5B,iBAAiB,CAInB;AAED,MAAM,MAAM,iBAAiB,GACzB,UAAU,GACV,QAAQ,GACR,mBAAmB,GACnB,aAAa,GACb,KAAK,GACL,OAAO,GACP,MAAM,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,CAAC,GAAG,E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AAG,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAAC;CAClC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;IACxC,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,UAAU,EAAE,GAAG,SAAS,CAAC;IAC1C,GAAG,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;IAC7C,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,GAAG,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;IAC7C,GAAG,CAAC,GAAG,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAE5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iCAAiC;sBAC1B,iBAAiB;CACpC,CAAC"}
@@ -7,7 +7,10 @@ import { isoCBOR } from './iso/index.js';
7
7
  export function decodeAttestationObject(attestationObject) {
8
8
  return _decodeAttestationObjectInternals.stubThis(isoCBOR.decodeFirst(attestationObject));
9
9
  }
10
- // Make it possible to stub the return value during testing
10
+ /**
11
+ * Make it possible to stub the return value during testing
12
+ * @ignore Don't include this in docs output
13
+ */
11
14
  export const _decodeAttestationObjectInternals = {
12
15
  stubThis: (value) => value,
13
16
  };
@@ -1,4 +1,4 @@
1
- import type { Base64URLString } from '@simplewebauthn/types';
1
+ import type { Base64URLString } from '../types/index.js';
2
2
  /**
3
3
  * Decode an authenticator's base64url-encoded clientDataJSON to JSON
4
4
  */
@@ -13,6 +13,10 @@ export type ClientDataJSON = {
13
13
  status: 'present' | 'supported' | 'not-supported';
14
14
  };
15
15
  };
16
+ /**
17
+ * Make it possible to stub the return value during testing
18
+ * @ignore Don't include this in docs output
19
+ */
16
20
  export declare const _decodeClientDataJSONInternals: {
17
21
  stubThis: (value: ClientDataJSON) => ClientDataJSON;
18
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"decodeClientDataJSON.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeClientDataJSON.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAK1E;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE;QACb,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,eAAe,CAAC;KACnD,CAAC;CACH,CAAC;AAGF,eAAO,MAAM,8BAA8B;sBACvB,cAAc;CACjC,CAAC"}
1
+ {"version":3,"file":"decodeClientDataJSON.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeClientDataJSON.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAK1E;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE;QACb,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,eAAe,CAAC;KACnD,CAAC;CACH,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B;sBACvB,cAAc;CACjC,CAAC"}
@@ -7,7 +7,10 @@ export function decodeClientDataJSON(data) {
7
7
  const clientData = JSON.parse(toString);
8
8
  return _decodeClientDataJSONInternals.stubThis(clientData);
9
9
  }
10
- // Make it possible to stub the return value during testing
10
+ /**
11
+ * Make it possible to stub the return value during testing
12
+ * @ignore Don't include this in docs output
13
+ */
11
14
  export const _decodeClientDataJSONInternals = {
12
15
  stubThis: (value) => value,
13
16
  };
@@ -1,5 +1,9 @@
1
1
  import { COSEPublicKey } from './cose.js';
2
2
  export declare function decodeCredentialPublicKey(publicKey: Uint8Array): COSEPublicKey;
3
+ /**
4
+ * Make it possible to stub the return value during testing
5
+ * @ignore Don't include this in docs output
6
+ */
3
7
  export declare const _decodeCredentialPublicKeyInternals: {
4
8
  stubThis: (value: COSEPublicKey) => COSEPublicKey;
5
9
  };
@@ -1 +1 @@
1
- {"version":3,"file":"decodeCredentialPublicKey.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeCredentialPublicKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,UAAU,GACpB,aAAa,CAIf;AAGD,eAAO,MAAM,mCAAmC;sBAC5B,aAAa;CAChC,CAAC"}
1
+ {"version":3,"file":"decodeCredentialPublicKey.d.ts","sourceRoot":"","sources":["../../src/helpers/decodeCredentialPublicKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,UAAU,GACpB,aAAa,CAIf;AAED;;;GAGG;AACH,eAAO,MAAM,mCAAmC;sBAC5B,aAAa;CAChC,CAAC"}
@@ -2,7 +2,10 @@ import { isoCBOR } from './iso/index.js';
2
2
  export function decodeCredentialPublicKey(publicKey) {
3
3
  return _decodeCredentialPublicKeyInternals.stubThis(isoCBOR.decodeFirst(publicKey));
4
4
  }
5
- // Make it possible to stub the return value during testing
5
+ /**
6
+ * Make it possible to stub the return value during testing
7
+ * @ignore Don't include this in docs output
8
+ */
6
9
  export const _decodeCredentialPublicKeyInternals = {
7
10
  stubThis: (value) => value,
8
11
  };
@@ -3,6 +3,10 @@
3
3
  * across multiple runtimes.
4
4
  */
5
5
  export declare function fetch(url: string): Promise<Response>;
6
+ /**
7
+ * Make it possible to stub the return value during testing
8
+ * @ignore Don't include this in docs output
9
+ */
6
10
  export declare const _fetchInternals: {
7
11
  stubThis: (url: string) => Promise<Response>;
8
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/helpers/fetch.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAEpD;AAGD,eAAO,MAAM,eAAe;oBACV,MAAM;CACvB,CAAC"}
1
+ {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/helpers/fetch.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAEpD;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe;oBACV,MAAM;CACvB,CAAC"}
@@ -6,7 +6,10 @@ import { fetch as crossFetch } from 'cross-fetch';
6
6
  export function fetch(url) {
7
7
  return _fetchInternals.stubThis(url);
8
8
  }
9
- // Make it possible to stub the return value during testing
9
+ /**
10
+ * Make it possible to stub the return value during testing
11
+ * @ignore Don't include this in docs output
12
+ */
10
13
  export const _fetchInternals = {
11
14
  stubThis: (url) => crossFetch(url),
12
15
  };
@@ -2,6 +2,10 @@
2
2
  * Generate a suitably random value to be used as an attestation or assertion challenge
3
3
  */
4
4
  export declare function generateChallenge(): Promise<Uint8Array>;
5
+ /**
6
+ * Make it possible to stub the return value during testing
7
+ * @ignore Don't include this in docs output
8
+ */
5
9
  export declare const _generateChallengeInternals: {
6
10
  stubThis: (value: Uint8Array) => Uint8Array;
7
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"generateChallenge.d.ts","sourceRoot":"","sources":["../../src/helpers/generateChallenge.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,UAAU,CAAC,CAc7D;AAGD,eAAO,MAAM,2BAA2B;sBACpB,UAAU;CAC7B,CAAC"}
1
+ {"version":3,"file":"generateChallenge.d.ts","sourceRoot":"","sources":["../../src/helpers/generateChallenge.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,UAAU,CAAC,CAc7D;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B;sBACpB,UAAU;CAC7B,CAAC"}
@@ -15,7 +15,10 @@ export async function generateChallenge() {
15
15
  await isoCrypto.getRandomValues(challenge);
16
16
  return _generateChallengeInternals.stubThis(challenge);
17
17
  }
18
- // Make it possible to stub the return value during testing
18
+ /**
19
+ * Make it possible to stub the return value during testing
20
+ * @ignore Don't include this in docs output
21
+ */
19
22
  export const _generateChallengeInternals = {
20
23
  stubThis: (value) => value,
21
24
  };
@@ -2,6 +2,10 @@
2
2
  * Generate a suitably random value to be used as user ID
3
3
  */
4
4
  export declare function generateUserID(): Promise<Uint8Array>;
5
+ /**
6
+ * Make it possible to stub the return value during testing
7
+ * @ignore Don't include this in docs output
8
+ */
5
9
  export declare const _generateUserIDInternals: {
6
10
  stubThis: (value: Uint8Array) => Uint8Array;
7
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"generateUserID.d.ts","sourceRoot":"","sources":["../../src/helpers/generateUserID.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC,CAU1D;AAGD,eAAO,MAAM,wBAAwB;sBACjB,UAAU;CAC7B,CAAC"}
1
+ {"version":3,"file":"generateUserID.d.ts","sourceRoot":"","sources":["../../src/helpers/generateUserID.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC,CAU1D;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB;sBACjB,UAAU;CAC7B,CAAC"}
@@ -11,7 +11,10 @@ export async function generateUserID() {
11
11
  await isoCrypto.getRandomValues(newUserID);
12
12
  return _generateUserIDInternals.stubThis(newUserID);
13
13
  }
14
- // Make it possible to stub the return value during testing
14
+ /**
15
+ * Make it possible to stub the return value during testing
16
+ * @ignore Don't include this in docs output
17
+ */
15
18
  export const _generateUserIDInternals = {
16
19
  stubThis: (value) => value,
17
20
  };
@@ -1,24 +1,17 @@
1
- import { convertAAGUIDToString } from './convertAAGUIDToString.js';
2
- import { convertCertBufferToPEM } from './convertCertBufferToPEM.js';
3
- import { convertCOSEtoPKCS } from './convertCOSEtoPKCS.js';
4
- import { decodeAttestationObject } from './decodeAttestationObject.js';
5
- import { decodeClientDataJSON } from './decodeClientDataJSON.js';
6
- import { decodeCredentialPublicKey } from './decodeCredentialPublicKey.js';
7
- import { generateChallenge } from './generateChallenge.js';
8
- import { generateUserID } from './generateUserID.js';
9
- import { getCertificateInfo } from './getCertificateInfo.js';
10
- import { isCertRevoked } from './isCertRevoked.js';
11
- import { parseAuthenticatorData } from './parseAuthenticatorData.js';
12
- import { toHash } from './toHash.js';
13
- import { validateCertificatePath } from './validateCertificatePath.js';
14
- import { verifySignature } from './verifySignature.js';
15
- import { isoBase64URL, isoCBOR, isoCrypto, isoUint8Array } from './iso/index.js';
16
- import * as cose from './cose.js';
17
- export { convertAAGUIDToString, convertCertBufferToPEM, convertCOSEtoPKCS, cose, decodeAttestationObject, decodeClientDataJSON, decodeCredentialPublicKey, generateChallenge, generateUserID, getCertificateInfo, isCertRevoked, isoBase64URL, isoCBOR, isoCrypto, isoUint8Array, parseAuthenticatorData, toHash, validateCertificatePath, verifySignature, };
18
- import type { AttestationFormat, AttestationObject, AttestationStatement } from './decodeAttestationObject.js';
19
- import type { CertificateInfo } from './getCertificateInfo.js';
20
- import type { ClientDataJSON } from './decodeClientDataJSON.js';
21
- import type { COSEPublicKey, COSEPublicKeyEC2, COSEPublicKeyOKP, COSEPublicKeyRSA } from './cose.js';
22
- import type { ParsedAuthenticatorData } from './parseAuthenticatorData.js';
23
- export type { AttestationFormat, AttestationObject, AttestationStatement, CertificateInfo, ClientDataJSON, COSEPublicKey, COSEPublicKeyEC2, COSEPublicKeyOKP, COSEPublicKeyRSA, ParsedAuthenticatorData, };
1
+ export * from './convertAAGUIDToString.js';
2
+ export * from './convertCertBufferToPEM.js';
3
+ export * from './convertCOSEtoPKCS.js';
4
+ export * from './decodeAttestationObject.js';
5
+ export * from './decodeClientDataJSON.js';
6
+ export * from './decodeCredentialPublicKey.js';
7
+ export * from './generateChallenge.js';
8
+ export * from './generateUserID.js';
9
+ export * from './getCertificateInfo.js';
10
+ export * from './isCertRevoked.js';
11
+ export * from './parseAuthenticatorData.js';
12
+ export * from './toHash.js';
13
+ export * from './validateCertificatePath.js';
14
+ export * from './verifySignature.js';
15
+ export * from './iso/index.js';
16
+ export * as cose from './cose.js';
24
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,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gB,EAChB,gBAAgB,EAChB,uBAAuB,GACxB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC"}
@@ -1,17 +1,16 @@
1
- import { convertAAGUIDToString } from './convertAAGUIDToString.js';
2
- import { convertCertBufferToPEM } from './convertCertBufferToPEM.js';
3
- import { convertCOSEtoPKCS } from './convertCOSEtoPKCS.js';
4
- import { decodeAttestationObject } from './decodeAttestationObject.js';
5
- import { decodeClientDataJSON } from './decodeClientDataJSON.js';
6
- import { decodeCredentialPublicKey } from './decodeCredentialPublicKey.js';
7
- import { generateChallenge } from './generateChallenge.js';
8
- import { generateUserID } from './generateUserID.js';
9
- import { getCertificateInfo } from './getCertificateInfo.js';
10
- import { isCertRevoked } from './isCertRevoked.js';
11
- import { parseAuthenticatorData } from './parseAuthenticatorData.js';
12
- import { toHash } from './toHash.js';
13
- import { validateCertificatePath } from './validateCertificatePath.js';
14
- import { verifySignature } from './verifySignature.js';
15
- import { isoBase64URL, isoCBOR, isoCrypto, isoUint8Array } from './iso/index.js';
16
- import * as cose from './cose.js';
17
- export { convertAAGUIDToString, convertCertBufferToPEM, convertCOSEtoPKCS, cose, decodeAttestationObject, decodeClientDataJSON, decodeCredentialPublicKey, generateChallenge, generateUserID, getCertificateInfo, isCertRevoked, isoBase64URL, isoCBOR, isoCrypto, isoUint8Array, parseAuthenticatorData, toHash, validateCertificatePath, verifySignature, };
1
+ export * from './convertAAGUIDToString.js';
2
+ export * from './convertCertBufferToPEM.js';
3
+ export * from './convertCOSEtoPKCS.js';
4
+ export * from './decodeAttestationObject.js';
5
+ export * from './decodeClientDataJSON.js';
6
+ export * from './decodeCredentialPublicKey.js';
7
+ export * from './generateChallenge.js';
8
+ export * from './generateUserID.js';
9
+ export * from './getCertificateInfo.js';
10
+ export * from './isCertRevoked.js';
11
+ export * from './parseAuthenticatorData.js';
12
+ export * from './toHash.js';
13
+ export * from './validateCertificatePath.js';
14
+ export * from './verifySignature.js';
15
+ export * from './iso/index.js';
16
+ export * as cose from './cose.js';
@@ -1,4 +1,4 @@
1
- import type { Base64URLString } from '@simplewebauthn/types';
1
+ import type { Base64URLString } from '../../types/index.js';
2
2
  /**
3
3
  * Decode from a Base64URL-encoded string to an ArrayBuffer. Best used when converting a
4
4
  * credential ID from a JSON string to an ArrayBuffer, like in allowCredentials or
@@ -1 +1 @@
1
- {"version":3,"file":"isoBase64URL.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoBase64URL.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,eAAe,EAAE,MAAM,EACvB,IAAI,GAAE,QAAQ,GAAG,WAAyB,GACzC,UAAU,CAGZ;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,UAAU,EAClB,EAAE,GAAE,QAAQ,GAAG,WAAyB,GACvC,MAAM,CAER;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAIxD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIlD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,CAEnE"}
1
+ {"version":3,"file":"isoBase64URL.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoBase64URL.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,eAAe,EAAE,MAAM,EACvB,IAAI,GAAE,QAAQ,GAAG,WAAyB,GACzC,UAAU,CAGZ;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,UAAU,EAClB,EAAE,GAAE,QAAQ,GAAG,WAAyB,GACvC,MAAM,CAER;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAIxD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIlD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,CAEnE"}
@@ -1,3 +1,7 @@
1
+ /**
2
+ * A runtime-agnostic collection of methods for working with Base64URL encoding
3
+ * @module
4
+ */
1
5
  import base64 from '@hexagon/base64';
2
6
  /**
3
7
  * Decode from a Base64URL-encoded string to an ArrayBuffer. Best used when converting a
@@ -1,3 +1,7 @@
1
+ /**
2
+ * A runtime-agnostic collection of methods for working with CBOR encoding
3
+ * @module
4
+ */
1
5
  import * as tinyCbor from '@levischuck/tiny-cbor';
2
6
  /**
3
7
  * Whatever CBOR encoder is used should keep CBOR data the same length when data is re-encoded
@@ -1 +1 @@
1
- {"version":3,"file":"isoCBOR.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoCBOR.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAQzD;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,GAAG,UAAU,CAE3D"}
1
+ {"version":3,"file":"isoCBOR.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoCBOR.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAQzD;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,GAAG,UAAU,CAE3D"}
@@ -1,3 +1,7 @@
1
+ /**
2
+ * A runtime-agnostic collection of methods for working with CBOR encoding
3
+ * @module
4
+ */
1
5
  import * as tinyCbor from '@levischuck/tiny-cbor';
2
6
  /**
3
7
  * Whatever CBOR encoder is used should keep CBOR data the same length when data is re-encoded
@@ -1,4 +1,4 @@
1
- import type { Crypto } from '@simplewebauthn/types';
1
+ import type { Crypto } from '../../../types/index.js';
2
2
  /**
3
3
  * Try to get an instance of the Crypto API from the current runtime. Should support Node,
4
4
  * as well as others, like Deno, that implement Web APIs.
@@ -1 +1 @@
1
- {"version":3,"file":"getWebCrypto.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/getWebCrypto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAIpD;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAgC9C;AAED,qBAAa,gBAAiB,SAAQ,KAAK;;CAM1C;AAGD,eAAO,MAAM,sBAAsB;;iCAGJ,MAAM,GAAG,SAAS;CAGhD,CAAC"}
1
+ {"version":3,"file":"getWebCrypto.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/getWebCrypto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAItD;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAgC9C;AAED,qBAAa,gBAAiB,SAAQ,KAAK;;CAM1C;AAGD,eAAO,MAAM,sBAAsB;;iCAGJ,MAAM,GAAG,SAAS;CAGhD,CAAC"}
@@ -1,3 +1,7 @@
1
+ /**
2
+ * A runtime-agnostic collection of methods for working with the WebCrypto API
3
+ * @module
4
+ */
1
5
  export { digest } from './digest.js';
2
6
  export { getRandomValues } from './getRandomValues.js';
3
7
  export { verify } from './verify.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
@@ -1,3 +1,7 @@
1
+ /**
2
+ * A runtime-agnostic collection of methods for working with the WebCrypto API
3
+ * @module
4
+ */
1
5
  export { digest } from './digest.js';
2
6
  export { getRandomValues } from './getRandomValues.js';
3
7
  export { verify } from './verify.js';
@@ -1,3 +1,7 @@
1
+ /**
2
+ * A runtime-agnostic collection of methods for working with Uint8Arrays
3
+ * @module
4
+ */
1
5
  /**
2
6
  * Make sure two Uint8Arrays are deeply equivalent
3
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"isoUint8Array.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoUint8Array.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAMxE;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAK/C;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAe/C;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAYvD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAGtD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,CAG7D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAEzD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,QAAQ,CAEtD"}
1
+ {"version":3,"file":"isoUint8Array.d.ts","sourceRo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