UNPKG

strophe.js

Version:

Strophe.js is an XMPP library for JavaScript

18 lines (13 loc) 471 B
import SASLMechanism from './sasl.js'; // Building SASL callbacks export default class SASLAnonymous extends SASLMechanism { /** PrivateConstructor: SASLAnonymous * SASL ANONYMOUS authentication. */ constructor (mechname='ANONYMOUS', isClientFirst=false, priority=20) { super(mechname, isClientFirst, priority); } test (connection) { // eslint-disable-line class-methods-use-this return connection.authcid === null; } }