@prove-identity/prove-auth 2.8.2 → 2.9.0

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 (32) hide show
  1. package/README.md +8 -9
  2. package/build/bundle/release/prove-auth.js +1 -1
  3. package/build/lib/index.d.ts +2 -2
  4. package/build/lib/proveauth/authenticator-builder.d.ts +3 -0
  5. package/build/lib/proveauth/authenticator-builder.js +7 -3
  6. package/build/lib/proveauth/internal/auth-request.d.ts +1 -0
  7. package/build/lib/proveauth/internal/auth-response.d.ts +5 -1
  8. package/build/lib/proveauth/internal/auth-session.d.ts +3 -1
  9. package/build/lib/proveauth/internal/auth-session.js +50 -9
  10. package/build/lib/proveauth/internal/auth-status-actions.js +3 -3
  11. package/build/lib/proveauth/internal/device-passive-register-step.d.ts +1 -0
  12. package/build/lib/proveauth/internal/device-passive-register-step.js +55 -39
  13. package/build/lib/proveauth/internal/device-passive-silent-step.js +4 -0
  14. package/build/lib/proveauth/internal/device-passive-step.d.ts +12 -4
  15. package/build/lib/proveauth/internal/device-passive-step.js +172 -52
  16. package/build/lib/proveauth/internal/device-passive-stepup-step.d.ts +2 -1
  17. package/build/lib/proveauth/internal/device-passive-stepup-step.js +25 -3
  18. package/build/lib/proveauth/internal/device-passive-verify-step.d.ts +3 -2
  19. package/build/lib/proveauth/internal/device-passive-verify-step.js +29 -11
  20. package/build/lib/proveauth/internal/fido-options-error.d.ts +30 -0
  21. package/build/lib/proveauth/internal/fido-options-error.js +161 -0
  22. package/build/lib/proveauth/internal/main-authenticator.js +1 -1
  23. package/build/lib/proveauth/internal/mobile-instantlink-step.js +36 -29
  24. package/build/lib/proveauth/internal/mobile-otp-step.d.ts +3 -0
  25. package/build/lib/proveauth/internal/mobile-otp-step.js +115 -67
  26. package/build/lib/proveauth/internal/scan-message-step.js +1 -1
  27. package/build/lib/proveauth/internal/settings.js +1 -0
  28. package/build/lib/proveauth/internal/web-socket-close-reasons.d.ts +15 -0
  29. package/build/lib/proveauth/internal/web-socket-close-reasons.js +19 -0
  30. package/build/lib/proveauth/version.d.ts +1 -1
  31. package/build/lib/proveauth/version.js +1 -1
  32. package/package.json +1 -1
@@ -29,7 +29,7 @@ class ScanMessageStep {
29
29
  })
30
30
  .then((response) => {
31
31
  if (response.error) {
32
- reject(new auth_error_1.default(response.error.message, response.error.code, response.next));
32
+ reject(new auth_error_1.default(response.error.message, response.error.code, response.next, false));
33
33
  }
34
34
  else {
35
35
  resolve(response.next);
@@ -16,6 +16,7 @@ class Settings {
16
16
  this.deviceId = null;
17
17
  this.namespace = null;
18
18
  this.fidoPasskeyRegistered = false;
19
+ this.darwiniumResult = undefined;
19
20
  }
20
21
  get deviceId() {
21
22
  return this.storage.getItem(this.getKey(Settings.DEVICE_ID_KEY));
@@ -0,0 +1,15 @@
1
+ export declare enum WebSocketCloseReasons {
2
+ NORMAL_CLOSURE = "Normal closure",
3
+ GOING_AWAY = "The connection is closed because a server is going down or a browser has navigated away from the page.",
4
+ PROTOCOL_ERROR = "The connection is closed due to a protocol error",
5
+ UNSUPPORTED_DATA = "The connection is closed because it has received unsupported data",
6
+ NO_STATUS_RECEIVED = "No closed status code was actually present.",
7
+ ABNORMAL_CLOSURE = "The connection was closed unexpectedly without a close frame",
8
+ INVALID_FRAME_PAYLOAD_DATA = "The connection was closed because it received inconsistent data in a message.",
9
+ POLICY_VIOLATION = "The connection was closed due to policy violation",
10
+ MESSAGE_TOO_BIG = "The connection was closed because it has received a message that is too big for it to process.",
11
+ MANDATORY_EXTENSION = "The connection was closed because the client required a server extension that was not supported.",
12
+ INTERNAL_ERROR = "The connection was closed because the server encountered an unexpected error",
13
+ TLS_HANDSHAKE = "The connection was closed due to a failure to perform a TLS handshake",
14
+ UNKNOWN_REASON = "Unknown reason"
15
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebSocketCloseReasons = void 0;
4
+ var WebSocketCloseReasons;
5
+ (function (WebSocketCloseReasons) {
6
+ WebSocketCloseReasons["NORMAL_CLOSURE"] = "Normal closure";
7
+ WebSocketCloseReasons["GOING_AWAY"] = "The connection is closed because a server is going down or a browser has navigated away from the page.";
8
+ WebSocketCloseReasons["PROTOCOL_ERROR"] = "The connection is closed due to a protocol error";
9
+ WebSocketCloseReasons["UNSUPPORTED_DATA"] = "The connection is closed because it has received unsupported data";
10
+ WebSocketCloseReasons["NO_STATUS_RECEIVED"] = "No closed status code was actually present.";
11
+ WebSocketCloseReasons["ABNORMAL_CLOSURE"] = "The connection was closed unexpectedly without a close frame";
12
+ WebSocketCloseReasons["INVALID_FRAME_PAYLOAD_DATA"] = "The connection was closed because it received inconsistent data in a message.";
13
+ WebSocketCloseReasons["POLICY_VIOLATION"] = "The connection was closed due to policy violation";
14
+ WebSocketCloseReasons["MESSAGE_TOO_BIG"] = "The connection was closed because it has received a message that is too big for it to process.";
15
+ WebSocketCloseReasons["MANDATORY_EXTENSION"] = "The connection was closed because the client required a server extension that was not supported.";
16
+ WebSocketCloseReasons["INTERNAL_ERROR"] = "The connection was closed because the server encountered an unexpected error";
17
+ WebSocketCloseReasons["TLS_HANDSHAKE"] = "The connection was closed due to a failure to perform a TLS handshake";
18
+ WebSocketCloseReasons["UNKNOWN_REASON"] = "Unknown reason";
19
+ })(WebSocketCloseReasons = exports.WebSocketCloseReasons || (exports.WebSocketCloseReasons = {}));
@@ -1,3 +1,3 @@
1
- export declare const VERSION = "2.8.2";
1
+ export declare const VERSION = "2.9.0";
2
2
  export declare const API_CONTRACT_VERSION = "2.9.0";
3
3
  export declare const USER_AGENT_VERSIONS: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.USER_AGENT_VERSIONS = exports.API_CONTRACT_VERSION = exports.VERSION = void 0;
4
- exports.VERSION = '2.8.2';
4
+ exports.VERSION = '2.9.0';
5
5
  exports.API_CONTRACT_VERSION = '2.9.0';
6
6
  exports.USER_AGENT_VERSIONS = `ProveAuth/${exports.VERSION} Contract/${exports.API_CONTRACT_VERSION} WEB/1`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prove-identity/prove-auth",
3
- "version": "2.8.2",
3
+ "version": "2.9.0",
4
4
  "description": "Prove Auth SDK for Web",
5
5
  "main": "build/lib/index.js",
6
6
  "files": [