@sprucelabs/heartwood-view-controllers 128.6.3 → 128.7.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.
|
@@ -11,6 +11,7 @@ export default class AuthenticatorImpl implements Authenticator {
|
|
|
11
11
|
static getInstance(): Authenticator;
|
|
12
12
|
static reset(): void;
|
|
13
13
|
static setStorage(storage: Storage | null): void;
|
|
14
|
+
static hasStorage(): boolean;
|
|
14
15
|
setSessionToken(token: string, person: Person): void;
|
|
15
16
|
getSessionToken(): string | null;
|
|
16
17
|
getPerson(): Person | null;
|
|
@@ -30,6 +30,9 @@ class AuthenticatorImpl {
|
|
|
30
30
|
static setStorage(storage) {
|
|
31
31
|
this.storage = storage;
|
|
32
32
|
}
|
|
33
|
+
static hasStorage() {
|
|
34
|
+
return !!this.storage;
|
|
35
|
+
}
|
|
33
36
|
setSessionToken(token, person) {
|
|
34
37
|
this.storage.setItem('sessionToken', token);
|
|
35
38
|
this.storage.setItem('person', JSON.stringify(person));
|
|
@@ -11,6 +11,7 @@ export default class AuthenticatorImpl implements Authenticator {
|
|
|
11
11
|
static getInstance(): Authenticator;
|
|
12
12
|
static reset(): void;
|
|
13
13
|
static setStorage(storage: Storage | null): void;
|
|
14
|
+
static hasStorage(): boolean;
|
|
14
15
|
setSessionToken(token: string, person: Person): void;
|
|
15
16
|
getSessionToken(): string | null;
|
|
16
17
|
getPerson(): Person | null;
|
|
@@ -35,6 +35,9 @@ export default class AuthenticatorImpl {
|
|
|
35
35
|
static setStorage(storage) {
|
|
36
36
|
this.storage = storage;
|
|
37
37
|
}
|
|
38
|
+
static hasStorage() {
|
|
39
|
+
return !!this.storage;
|
|
40
|
+
}
|
|
38
41
|
setSessionToken(token, person) {
|
|
39
42
|
this.storage.setItem('sessionToken', token);
|
|
40
43
|
this.storage.setItem('person', JSON.stringify(person));
|
package/package.json
CHANGED