@lifeready/core 10.0.0 → 10.0.2
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.
|
@@ -9,7 +9,7 @@ import { APOLLO_OPTIONS } from 'apollo-angular';
|
|
|
9
9
|
import graphlib, { Graph } from '@dagrejs/graphlib';
|
|
10
10
|
import { JWE, JWS, JWK } from 'node-jose';
|
|
11
11
|
import gql from 'graphql-tag';
|
|
12
|
-
import
|
|
12
|
+
import moment from 'moment';
|
|
13
13
|
import * as i1 from '@aws-amplify/auth/lib-esm/Auth';
|
|
14
14
|
import { AuthClass } from '@aws-amplify/auth/lib-esm/Auth';
|
|
15
15
|
import { ApolloLink, createHttpLink, InMemoryCache, from } from '@apollo/client/core';
|
|
@@ -312,8 +312,6 @@ function assertExactlyOne(options) {
|
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
// Ref: https://stackoverflow.com/questions/59735280/angular-8-moment-error-cannot-call-a-namespace-moment
|
|
316
|
-
const moment$1 = moment_;
|
|
317
315
|
const ServerTimeQuery = gql `
|
|
318
316
|
query {
|
|
319
317
|
serverTime {
|
|
@@ -326,7 +324,7 @@ class TimeService {
|
|
|
326
324
|
this.auth = auth;
|
|
327
325
|
this.apollo = apollo;
|
|
328
326
|
this.VERIFY_ENABLED = true;
|
|
329
|
-
this.MAX_DIFF_MSEC = moment
|
|
327
|
+
this.MAX_DIFF_MSEC = moment
|
|
330
328
|
.duration({ seconds: 30 })
|
|
331
329
|
.asMilliseconds();
|
|
332
330
|
this.offsetMs = null; // Millisecond offset of local clock.
|
|
@@ -375,7 +373,7 @@ class TimeService {
|
|
|
375
373
|
}), // body data type must match "Content-Type" header
|
|
376
374
|
});
|
|
377
375
|
const now = Date.now();
|
|
378
|
-
const verifyTime = moment
|
|
376
|
+
const verifyTime = moment(response.headers.get('Date')).valueOf();
|
|
379
377
|
const serverTime = now + this.offsetMs;
|
|
380
378
|
const diff = Math.abs(serverTime - verifyTime);
|
|
381
379
|
if (diff > this.MAX_DIFF_MSEC) {
|
|
@@ -4018,8 +4016,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
4018
4016
|
args: [KC_CONFIG]
|
|
4019
4017
|
}] }, { type: i1$2.HttpClient }, { type: LrApolloService }, { type: KeyService }, { type: KeyMetaService }, { type: KeyGraphService }, { type: EncryptionService }] });
|
|
4020
4018
|
|
|
4021
|
-
// Ref: https://stackoverflow.com/questions/59735280/angular-8-moment-error-cannot-call-a-namespace-moment
|
|
4022
|
-
const moment = moment_;
|
|
4023
4019
|
class PasswordCheck {
|
|
4024
4020
|
}
|
|
4025
4021
|
class PasswordService {
|