@bitblit/ratchet-warden-common 4.0.88-alpha → 4.0.89-alpha
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/dist/cjs/build/ratchet-warden-common-info.js +5 -5
- package/dist/cjs/client/warden-user-service.js +4 -3
- package/dist/es/build/ratchet-warden-common-info.js +5 -5
- package/dist/es/client/warden-user-service.js +2 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.es.tsbuildinfo +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -5,11 +5,11 @@ class RatchetWardenCommonInfo {
|
|
|
5
5
|
constructor() { }
|
|
6
6
|
static buildInformation() {
|
|
7
7
|
const val = {
|
|
8
|
-
version: '
|
|
9
|
-
hash: '
|
|
10
|
-
branch: 'alpha-2023-03-
|
|
11
|
-
tag: 'alpha-2023-03-
|
|
12
|
-
timeBuiltISO: '2023-03-
|
|
8
|
+
version: '89',
|
|
9
|
+
hash: '1458f175b084b58fabefc52f2a8203c4ed38161d',
|
|
10
|
+
branch: 'alpha-2023-03-19-2',
|
|
11
|
+
tag: 'alpha-2023-03-19-2',
|
|
12
|
+
timeBuiltISO: '2023-03-20T00:02:38-0700',
|
|
13
13
|
notes: '',
|
|
14
14
|
};
|
|
15
15
|
return val;
|
|
@@ -6,7 +6,6 @@ const ratchet_common_1 = require("@bitblit/ratchet-common");
|
|
|
6
6
|
const rxjs_1 = require("rxjs");
|
|
7
7
|
const jwt_decode_1 = tslib_1.__importDefault(require("jwt-decode"));
|
|
8
8
|
const ratchet_common_2 = require("@bitblit/ratchet-common");
|
|
9
|
-
const browser_1 = require("@simplewebauthn/browser");
|
|
10
9
|
class WardenUserService {
|
|
11
10
|
constructor(options) {
|
|
12
11
|
this.options = options;
|
|
@@ -224,7 +223,8 @@ class WardenUserService {
|
|
|
224
223
|
}
|
|
225
224
|
async saveCurrentDeviceAsWebAuthnForCurrentUser() {
|
|
226
225
|
const input = await this.options.wardenClient.generateWebAuthnRegistrationChallengeForLoggedInUser();
|
|
227
|
-
const
|
|
226
|
+
const startRegistration = (await Promise.resolve().then(() => tslib_1.__importStar(require('@simplewebauthn/browser')))).startRegistration;
|
|
227
|
+
const creds = await startRegistration(input);
|
|
228
228
|
const output = await this.options.wardenClient.addWebAuthnRegistrationToLoggedInUser(creds);
|
|
229
229
|
this.updateRecentLoginsFromWardenEntrySummary(output);
|
|
230
230
|
return output;
|
|
@@ -234,7 +234,8 @@ class WardenUserService {
|
|
|
234
234
|
try {
|
|
235
235
|
const input = await this.options.wardenClient.generateWebAuthnAuthenticationChallengeForUserId(userId);
|
|
236
236
|
ratchet_common_1.Logger.info('Got login challenge : %s', input);
|
|
237
|
-
const
|
|
237
|
+
const startAuthentication = (await Promise.resolve().then(() => tslib_1.__importStar(require('@simplewebauthn/browser')))).startAuthentication;
|
|
238
|
+
const creds = await startAuthentication(input);
|
|
238
239
|
ratchet_common_1.Logger.info('Got creds: %j', creds);
|
|
239
240
|
const loginCmd = {
|
|
240
241
|
userId: userId,
|
|
@@ -2,11 +2,11 @@ export class RatchetWardenCommonInfo {
|
|
|
2
2
|
constructor() { }
|
|
3
3
|
static buildInformation() {
|
|
4
4
|
const val = {
|
|
5
|
-
version: '
|
|
6
|
-
hash: '
|
|
7
|
-
branch: 'alpha-2023-03-
|
|
8
|
-
tag: 'alpha-2023-03-
|
|
9
|
-
timeBuiltISO: '2023-03-
|
|
5
|
+
version: '89',
|
|
6
|
+
hash: '1458f175b084b58fabefc52f2a8203c4ed38161d',
|
|
7
|
+
branch: 'alpha-2023-03-19-2',
|
|
8
|
+
tag: 'alpha-2023-03-19-2',
|
|
9
|
+
timeBuiltISO: '2023-03-20T00:02:38-0700',
|
|
10
10
|
notes: '',
|
|
11
11
|
};
|
|
12
12
|
return val;
|
|
@@ -2,7 +2,6 @@ import { Logger } from '@bitblit/ratchet-common';
|
|
|
2
2
|
import { timer } from 'rxjs';
|
|
3
3
|
import jwt_decode from 'jwt-decode';
|
|
4
4
|
import { StringRatchet } from '@bitblit/ratchet-common';
|
|
5
|
-
import { startAuthentication, startRegistration } from '@simplewebauthn/browser';
|
|
6
5
|
export class WardenUserService {
|
|
7
6
|
constructor(options) {
|
|
8
7
|
this.options = options;
|
|
@@ -217,6 +216,7 @@ export class WardenUserService {
|
|
|
217
216
|
}
|
|
218
217
|
async saveCurrentDeviceAsWebAuthnForCurrentUser() {
|
|
219
218
|
const input = await this.options.wardenClient.generateWebAuthnRegistrationChallengeForLoggedInUser();
|
|
219
|
+
const startRegistration = (await import('@simplewebauthn/browser')).startRegistration;
|
|
220
220
|
const creds = await startRegistration(input);
|
|
221
221
|
const output = await this.options.wardenClient.addWebAuthnRegistrationToLoggedInUser(creds);
|
|
222
222
|
this.updateRecentLoginsFromWardenEntrySummary(output);
|
|
@@ -227,6 +227,7 @@ export class WardenUserService {
|
|
|
227
227
|
try {
|
|
228
228
|
const input = await this.options.wardenClient.generateWebAuthnAuthenticationChallengeForUserId(userId);
|
|
229
229
|
Logger.info('Got login challenge : %s', input);
|
|
230
|
+
const startAuthentication = (await import('@simplewebauthn/browser')).startAuthentication;
|
|
230
231
|
const creds = await startAuthentication(input);
|
|
231
232
|
Logger.info('Got creds: %j', creds);
|
|
232
233
|
const loginCmd = {
|