s-bit-agent
Version:
s.BitAgent is a simple Bitwarden CLI wrapper which provides a SSH2 Key Agent solution for Bitwarden.
18 lines • 752 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RequestSession = void 0;
const handler_1 = require("../../types/handler");
const message_1 = require("../../types/message");
class RequestSession {
constructor() {
this.messageType = handler_1.SBitAgentMessageType.REQUEST_SESSION;
}
async handle(message, prefix, agentService, client) {
const session = await agentService.sessionService.getSession('IPC Request: ' + message.reason);
return session
? new message_1.ResponseSession(session)
: new message_1.ResponseFailure('Session request got rejected by the user');
}
}
exports.RequestSession = RequestSession;
//# sourceMappingURL=RequestSession.js.map