SASL PLAIN authentication helper (RFC2595)
Authenticate via sending password in clear-text
# File lib/xmpp4r/sasl.rb, line 59 def auth(password) auth_text = "#{@stream.jid.strip}\x00#{@stream.jid.node}\x00#{password}" error = nil @stream.send(generate_auth('PLAIN', Base64::encode64(auth_text).gsub(/\s/, ''))) { |reply| if reply.name != 'success' error = reply.first_element(nil).name end true } raise error if error end