Class: AgentXmpp::Xmpp::SASL::Plain
- Defined in:
- lib/agent_xmpp/xmpp/sasl.rb
Overview
Instance Method Summary collapse
-
#auth(jid, password) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….
Methods inherited from Base
Constructor Details
This class inherits a constructor from AgentXmpp::Xmpp::SASL::Base
Instance Method Details
#auth(jid, password) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….
73 74 75 76 |
# File 'lib/agent_xmpp/xmpp/sasl.rb', line 73 def auth(jid, password) auth_text = "#{jid.strip}\x00#{jid.node}\x00#{password}" generate_auth('PLAIN', Base64::encode64(auth_text).gsub(/\s/, '')) end |