Method: Jabber::SASL::Anonymous#auth
- Defined in:
- lib/xmpp4r/sasl.rb
#auth(password) ⇒ Object
Authenticate by sending nothing with the ANONYMOUS token
78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/xmpp4r/sasl.rb', line 78 def auth(password) auth_text = "#{@stream.jid.node}" error = nil @stream.send(generate_auth('ANONYMOUS', Base64::encode64(auth_text).gsub(/\s/, ''))) { |reply| if reply.name != 'success' error = reply.first_element(nil).name end true } raise error if error end |