Now the AD password can be reset.
This commit is contained in:
parent
c03228dbbe
commit
7e6ab65a37
4 changed files with 316 additions and 305 deletions
|
@ -128,8 +128,12 @@ export class AdminDialog extends IGBDialog {
|
||||||
await dc.endAll();
|
await dc.endAll();
|
||||||
let service = new GBAdminService();
|
let service = new GBAdminService();
|
||||||
await service.saveValue("authenticatorToken", args.token)
|
await service.saveValue("authenticatorToken", args.token)
|
||||||
await dc.context.sendActivity("Token has been updated.");
|
await dc.context.sendActivities([
|
||||||
await dc.replace("/ask")
|
{ type: 'typing' },
|
||||||
|
{ type: 'message', text: "Token has been updated." },
|
||||||
|
{ type: 'message', text: "Please, log out now from the administration work account on next screen." },
|
||||||
|
{ type: 'delay', value: 4000 },
|
||||||
|
])
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
@ -332,7 +332,12 @@ export class GBMinService {
|
||||||
// Otherwise, continue to the active dialog in the stack.
|
// Otherwise, continue to the active dialog in the stack.
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
if (dc.activeDialog) {
|
||||||
await dc.continue()
|
await dc.continue()
|
||||||
|
} else {
|
||||||
|
await dc.begin("/answer", {query: context.activity.text})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Processes events.
|
// Processes events.
|
||||||
|
@ -369,7 +374,7 @@ export class GBMinService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
let msg = `Error in main activity: ${error}.`
|
let msg = `Error in main activity: ${error.message}.\n${error.stack}`
|
||||||
logger.error(msg)
|
logger.error(msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -71,7 +71,10 @@ class GBUIApp extends React.Component {
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
from: { id: "webUser", name: "You" }
|
from: { id: "webUser", name: "You" }
|
||||||
})
|
})
|
||||||
.subscribe(this.send("success"));
|
.subscribe(() => {
|
||||||
|
window.userAgentApplication.logout();
|
||||||
|
console.log("updateToken done")
|
||||||
|
});
|
||||||
}, 400);
|
}, 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,13 +149,12 @@ class GBUIApp extends React.Component {
|
||||||
this.state.instanceClient.authenticatorClientID,
|
this.state.instanceClient.authenticatorClientID,
|
||||||
authority,
|
authority,
|
||||||
function(errorDesc, token, error, tokenType) {
|
function(errorDesc, token, error, tokenType) {
|
||||||
userAgentApplication.acquireTokenSilent(graphScopes).then(function (accessToken) {
|
if (error) {
|
||||||
_this_.sendToken(accessToken);
|
|
||||||
}, function (error) {
|
|
||||||
console.log(error);
|
console.log(error);
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
window.userAgentApplication = userAgentApplication;
|
||||||
|
|
||||||
if (!userAgentApplication.isCallback(window.location.hash) && window.parent === window && !window.opener) {
|
if (!userAgentApplication.isCallback(window.location.hash) && window.parent === window && !window.opener) {
|
||||||
var user = userAgentApplication.getUser();
|
var user = userAgentApplication.getUser();
|
||||||
|
|
|
@ -183,7 +183,7 @@ export class AskDialog extends IGBDialog {
|
||||||
|
|
||||||
// Three forms of asking.
|
// Three forms of asking.
|
||||||
|
|
||||||
if (args.firstTime) {
|
if (args && args.firstTime) {
|
||||||
text = Messages[locale].ask_first_time;
|
text = Messages[locale].ask_first_time;
|
||||||
} else if (args && args.isReturning) {
|
} else if (args && args.isReturning) {
|
||||||
text = Messages[locale].anything_else;
|
text = Messages[locale].anything_else;
|
||||||
|
|
Loading…
Add table
Reference in a new issue