Class | Jabber::SASL::Plain |
In: |
lib/xmpp4r/sasl.rb
|
Parent: | Base |
Authenticate via sending password in clear-text
# File lib/xmpp4r/sasl.rb, line 53 53: def auth(password) 54: auth_text = "#{@stream.jid.strip}\x00#{@stream.jid.node}\x00#{password}" 55: error = nil 56: @stream.send(generate_auth('PLAIN', Base64::encode64(auth_text).strip)) { |reply| 57: if reply.name != 'success' 58: error = reply.first_element(nil).name 59: end 60: true 61: } 62: 63: raise error if error 64: end