MCPcopy Create free account
hub / github.com/mscdex/ssh2 / constructor

Method constructor

lib/server.js:85–102  ·  view source on GitHub ↗
(protocol, username, service, method, submethods, cb)

Source from the content-addressed store, hash-verified

83
84class KeyboardAuthContext extends AuthContext {
85 constructor(protocol, username, service, method, submethods, cb) {
86 super(protocol, username, service, method, cb);
87
88 this._multistep = true;
89
90 this._cb = undefined;
91 this._onInfoResponse = (responses) => {
92 const callback = this._cb;
93 if (callback) {
94 this._cb = undefined;
95 callback(responses);
96 }
97 };
98 this.submethods = submethods;
99 this.on('abort', () => {
100 this._cb && this._cb(new Error('Authentication request aborted'));
101 });
102 }
103
104 prompt(prompts, title, instructions, cb) {
105 if (!Array.isArray(prompts))

Callers

nothing calls this directly

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected