@nsshunt/stsoauth2plugin 1.0.46 → 1.0.48
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/stsoauth2plugin.mjs
CHANGED
|
@@ -2565,7 +2565,7 @@ class STSOAuth2Manager {
|
|
|
2565
2565
|
__privateAdd(this, _semaphoreRetrySleep, 50);
|
|
2566
2566
|
__privateAdd(this, _ProcessMessageResponse, (data) => {
|
|
2567
2567
|
const messageResponse = data;
|
|
2568
|
-
debug$1(`STSOAuth2Manager:#ProcessMessageResponse: message data = [${JSON.stringify(messageResponse)}]
|
|
2568
|
+
debug$1(chalk$1.yellow(`STSOAuth2Manager:#ProcessMessageResponse: message data = [${JSON.stringify(messageResponse)}]`));
|
|
2569
2569
|
if (messageResponse.messageId === -1) {
|
|
2570
2570
|
switch (messageResponse.command) {
|
|
2571
2571
|
case IOauth2ListenerCommand.AUTHENTICATE_EVENT:
|
|
@@ -2602,10 +2602,10 @@ class STSOAuth2Manager {
|
|
|
2602
2602
|
__privateGet(this, _messageHandlers)[message.messageId] = (response) => {
|
|
2603
2603
|
clearTimeout(timeout);
|
|
2604
2604
|
delete __privateGet(this, _messageHandlers)[message.messageId];
|
|
2605
|
-
debug$1(`STSOAuth2Manager:#PostMessage: resolve callback response= [${JSON.stringify(response)}]
|
|
2605
|
+
debug$1(chalk$1.yellow(`STSOAuth2Manager:#PostMessage: resolve callback response= [${JSON.stringify(response)}]`));
|
|
2606
2606
|
resolve(response);
|
|
2607
2607
|
};
|
|
2608
|
-
debug$1(`STSOAuth2Manager:#PostMessage: posting message = [${JSON.stringify(message)}]
|
|
2608
|
+
debug$1(chalk$1.yellow(`STSOAuth2Manager:#PostMessage: posting message = [${JSON.stringify(message)}]`));
|
|
2609
2609
|
__privateGet(this, _oauth2ManagerPort).postMessage(message);
|
|
2610
2610
|
});
|
|
2611
2611
|
});
|
|
@@ -2649,10 +2649,10 @@ class STSOAuth2Manager {
|
|
|
2649
2649
|
}
|
|
2650
2650
|
});
|
|
2651
2651
|
__privateAdd(this, _SetupRoute, (app, router) => {
|
|
2652
|
-
debug$1(`STSOAuth2Manager:#SetupRoute
|
|
2652
|
+
debug$1(chalk$1.gray(`STSOAuth2Manager:#SetupRoute`));
|
|
2653
2653
|
router.beforeEach(async (to, from, next) => {
|
|
2654
2654
|
const oAuth2Manager = app.config.globalProperties.$sts[STSOAuth2ManagerPluginKey];
|
|
2655
|
-
debug$1(`beforeEach: from: [${from.path}], to: [${to.path}]
|
|
2655
|
+
debug$1(chalk$1.gray(`beforeEach: from: [${from.path}], to: [${to.path}]`));
|
|
2656
2656
|
if (__privateGet(this, _GetStore).call(this).LoggedIn === false) {
|
|
2657
2657
|
console.log(`Not logged in`);
|
|
2658
2658
|
if (to.path.localeCompare("/authorize") === 0) {
|
|
@@ -2741,7 +2741,7 @@ class STSOAuth2Manager {
|
|
|
2741
2741
|
throw new Error(`STSOAuth2Manager:ExecuteRefreshToken:maxSemaphoreRetries: [${__privateGet(this, _maxSemaphoreRetries)}] exceeded.`);
|
|
2742
2742
|
}
|
|
2743
2743
|
await Sleep(__privateGet(this, _semaphoreRetrySleep));
|
|
2744
|
-
debug$1(`STSOAuth2Manager:ExecuteRefreshToken:locked by operationSemaphore, retry count: [${retryCount}]
|
|
2744
|
+
debug$1(chalk$1.cyan(`STSOAuth2Manager:ExecuteRefreshToken:locked by operationSemaphore, retry count: [${retryCount}]`));
|
|
2745
2745
|
return await this.ExecuteRefreshToken(retryCount + 1);
|
|
2746
2746
|
} else {
|
|
2747
2747
|
__privateSet(this, _operationSemaphore, true);
|
|
@@ -3376,10 +3376,10 @@ class STSOAuth2Worker {
|
|
|
3376
3376
|
}
|
|
3377
3377
|
*/
|
|
3378
3378
|
__privateAdd(this, _RefreshToken, async () => {
|
|
3379
|
-
debug(`STSOAuth2Worker:#RefreshToken:start
|
|
3379
|
+
debug(chalk$1.cyan(`STSOAuth2Worker:#RefreshToken:start`));
|
|
3380
3380
|
const sessionData = __privateGet(this, _clientSessionStore).get(__privateGet(this, _STORAGE_SESSION_KEY2));
|
|
3381
3381
|
if (sessionData) {
|
|
3382
|
-
debug(`STSOAuth2Worker:#RefreshToken:sessionData: [${JSON.stringify(sessionData)}]
|
|
3382
|
+
debug(chalk$1.cyan(`STSOAuth2Worker:#RefreshToken:sessionData: [${JSON.stringify(sessionData)}]`));
|
|
3383
3383
|
const currentSessionData = sessionData.tokenResponse;
|
|
3384
3384
|
const refreshFlowParameters = {
|
|
3385
3385
|
client_id: __privateGet(this, _options2).client_id,
|