(ctx, allowed, methodsLeft, isPartial)
| 1246 | }); |
| 1247 | |
| 1248 | const onAuthDecide = (ctx, allowed, methodsLeft, isPartial) => { |
| 1249 | if (authCtx === ctx && !this.authenticated) { |
| 1250 | if (allowed) { |
| 1251 | authCtx = undefined; |
| 1252 | this.authenticated = true; |
| 1253 | proto.authSuccess(); |
| 1254 | pendingAuths = []; |
| 1255 | this.emit('ready'); |
| 1256 | } else { |
| 1257 | proto.authFailure(methodsLeft, isPartial); |
| 1258 | if (pendingAuths.length) { |
| 1259 | authCtx = pendingAuths.pop(); |
| 1260 | if (listenerCount(this, 'authentication')) |
| 1261 | this.emit('authentication', authCtx); |
| 1262 | else |
| 1263 | authCtx.reject(); |
| 1264 | } |
| 1265 | } |
| 1266 | } |
| 1267 | }; |
| 1268 | |
| 1269 | function sendReplies() { |
| 1270 | while (unsentGlobalRequestsReplies.length > 0 |
nothing calls this directly
no test coverage detected