Class: AgentXmpp::Xmpp::SASL::Anonymous
- Defined in:
- lib/agent_xmpp/xmpp/sasl.rb
Overview
Instance Method Summary collapse
-
#auth(password) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….
Methods inherited from Base
Constructor Details
This class inherits a constructor from AgentXmpp::Xmpp::SASL::Base
Instance Method Details
#auth(password) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….
85 86 87 88 89 90 91 92 93 |
# File 'lib/agent_xmpp/xmpp/sasl.rb', line 85 def auth(password) auth_text = "#{@stream.jid.node}" error = nil @stream.send(generate_auth('ANONYMOUS', Base64::encode64(auth_text).gsub(/\s/, ''))) do |reply| error = reply.first_element(nil).name if reply.name != 'success' true end raise error if error end |