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