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