@dronedeploy/rocos-js-sdk 3.0.1-alpha.21 → 3.0.1-alpha.22
Sign up to get free protection for your applications and to get access to all the features.
@@ -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
|