in src/bll/commands/signin.ts [33:57]
public async exec(args: any[] = undefined): Promise<void> {
Logger.logInfo("SignIn#exec: starts.");
const silent: boolean = args && args[0];
const fromPersistence: Credentials = await this.tryGetCredentialsFromPersistence();
if (silent) {
return this.execSilent(fromPersistence);
}
const typedCredentials: Credentials = await this.requestTypingCredentials(fromPersistence);
if (typedCredentials) {
this.credentialsStore.setCredentials(typedCredentials);
this.saveTargetNameToSettings(typedCredentials);
Logger.logInfo("SignIn#exec: success.");
if (!fromPersistence) {
this.suggestToStoreCredentials(typedCredentials);
} else if (!typedCredentials.equals(fromPersistence)) {
await this.persistentStorageManager.removeCredentials();
this.suggestToUpdateCredentials(typedCredentials);
}
this.myContext.setSignIn(true);
return this.greetUser(typedCredentials);
} else {
Logger.logWarning("SignIn#exec: operation was aborted by user");
}
}