mirror of
https://github.com/azure/login.git
synced 2026-03-15 09:20:56 -04:00
added review comments
This commit is contained in:
@@ -23,7 +23,7 @@ const core = __importStar(require("@actions/core"));
|
||||
const Utils_1 = __importDefault(require("./Utilities/Utils"));
|
||||
const PowerShellToolRunner_1 = __importDefault(require("./Utilities/PowerShellToolRunner"));
|
||||
const ScriptBuilder_1 = __importDefault(require("./Utilities/ScriptBuilder"));
|
||||
const Constants_1 = require("./Constants");
|
||||
const Constants_1 = __importDefault(require("./Constants"));
|
||||
class ServicePrincipalLogin {
|
||||
constructor(servicePrincipalId, servicePrincipalKey, tenantId, subscriptionId) {
|
||||
this.servicePrincipalId = servicePrincipalId;
|
||||
@@ -34,14 +34,14 @@ class ServicePrincipalLogin {
|
||||
initialize() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
Utils_1.default.setPSModulePath();
|
||||
const azLatestVersion = yield Utils_1.default.getLatestModule(Constants_1.Constants.moduleName);
|
||||
const azLatestVersion = yield Utils_1.default.getLatestModule(Constants_1.default.moduleName);
|
||||
core.debug(`Az Module version used: ${azLatestVersion}`);
|
||||
Utils_1.default.setPSModulePath(`${Constants_1.Constants.prefix}${azLatestVersion}`);
|
||||
Utils_1.default.setPSModulePath(`${Constants_1.default.prefix}${azLatestVersion}`);
|
||||
});
|
||||
}
|
||||
login() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
PowerShellToolRunner_1.default.init();
|
||||
yield PowerShellToolRunner_1.default.init();
|
||||
const scriptBuilder = new ScriptBuilder_1.default();
|
||||
const script = scriptBuilder.getScript(ServicePrincipalLogin.scheme, this.tenantId, this.servicePrincipalId, this.servicePrincipalKey, this.subscriptionId, ServicePrincipalLogin.environment, ServicePrincipalLogin.scopeLevel);
|
||||
PowerShellToolRunner_1.default.executePowerShellCommand(script);
|
||||
@@ -49,6 +49,6 @@ class ServicePrincipalLogin {
|
||||
}
|
||||
}
|
||||
exports.ServicePrincipalLogin = ServicePrincipalLogin;
|
||||
ServicePrincipalLogin.environment = Constants_1.Constants.environment;
|
||||
ServicePrincipalLogin.scopeLevel = Constants_1.Constants.scopeLevel;
|
||||
ServicePrincipalLogin.scheme = Constants_1.Constants.scheme;
|
||||
ServicePrincipalLogin.environment = Constants_1.default.environment;
|
||||
ServicePrincipalLogin.scopeLevel = Constants_1.default.scopeLevel;
|
||||
ServicePrincipalLogin.scheme = Constants_1.default.scheme;
|
||||
|
||||
Reference in New Issue
Block a user