MCPcopy
hub / github.com/electerm/electerm / publicKeyOnlyAuth

Function publicKeyOnlyAuth

test/unit-ci/session-ssh.spec.js:172–182  ·  view source on GitHub ↗
(publicKey)

Source from the content-addressed store, hash-verified

170}
171
172function publicKeyOnlyAuth (publicKey) {
173 return (ctx) => {
174 if (ctx.method === 'none') {
175 return ctx.reject(['publickey'])
176 }
177 if (ctx.method === 'publickey' && ctx.username === USERNAME && matchesPublicKey(ctx, publicKey)) {
178 return ctx.accept()
179 }
180 return ctx.reject(['publickey'])
181 }
182}
183
184function sameRoundKeyboardInteractiveAuth () {
185 return (ctx) => {

Callers 1

Calls 1

matchesPublicKeyFunction · 0.70

Tested by

no test coverage detected