Class: AgentXmpp::Xmpp::SASL::Plain

Inherits:
Base
  • Object
show all
Defined in:
lib/agent_xmpp/xmpp/sasl.rb

Overview


Instance Method Summary collapse

Methods inherited from Base

#initialize

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