plugin-auth.js 394 B

12345678910111213141516171819
  1. 'use strict';
  2. const Command = require('../../command');
  3. /**
  4. * Base authentication plugin
  5. */
  6. class PluginAuth extends Command {
  7. constructor(resolve, reject, multiAuthResolver) {
  8. super(resolve, reject);
  9. this.multiAuthResolver = multiAuthResolver;
  10. }
  11. successSend(packet, out, opts, info) {
  12. this.multiAuthResolver(packet, out, opts, info);
  13. }
  14. }
  15. module.exports = PluginAuth;