@dronedeploy/rocos-js-sdk 3.0.1-alpha.21 → 3.0.1-alpha.22
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.
@@ -58,7 +58,12 @@ class AuthService extends BaseServiceAbstract_1.BaseServiceAbstract {
|
|
58
58
|
}
|
59
59
|
this.config.token = this.token.value;
|
60
60
|
// output a message for token change
|
61
|
-
this.
|
61
|
+
if (this.isTokenValid(this.token)) {
|
62
|
+
this.tokenSubject$.next(this.token);
|
63
|
+
}
|
64
|
+
else {
|
65
|
+
void this.getToken();
|
66
|
+
}
|
62
67
|
}
|
63
68
|
/**
|
64
69
|
* Clear token
|
@@ -55,7 +55,12 @@ export class AuthService extends BaseServiceAbstract {
|
|
55
55
|
}
|
56
56
|
this.config.token = this.token.value;
|
57
57
|
// output a message for token change
|
58
|
-
this.
|
58
|
+
if (this.isTokenValid(this.token)) {
|
59
|
+
this.tokenSubject$.next(this.token);
|
60
|
+
}
|
61
|
+
else {
|
62
|
+
void this.getToken();
|
63
|
+
}
|
59
64
|
}
|
60
65
|
/**
|
61
66
|
* Clear token
|