"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const authenticationProvider_1 = require("@mablhq-internal/runtime/providers/authenticationProvider");
const constants_1 = require("../../constants");
const cliUtil_1 = require("@mablhq-internal/runtime/core/cliUtil");
exports.command = `activate-jwt <${constants_1.CommandArgJwt}>`;
exports.describe = false;
exports.builder = (yargs) => {
    yargs.positional(constants_1.CommandArgJwt, {
        describe: 'Json Web Token',
        type: 'string',
        nargs: 1,
        demand: 'JWT argument required',
    });
};
exports.handler = (0, cliUtil_1.failWrapper)(activateJwt);
async function activateJwt(parsed) {
    const auth = new authenticationProvider_1.AuthenticationProvider();
    const jwt = parsed[constants_1.CommandArgJwt];
    return auth.activateJwt(jwt);
}
