| Module | Jabber::SASL |
| In: |
lib/xmpp4r/sasl.rb
|
Helpers for SASL authentication (RFC2222)
You might not need to use them directly, they are invoked by Jabber::Client#auth
| NS_SASL | = | 'urn:ietf:params:xml:ns:xmpp-sasl' |
Factory function to obtain a SASL helper for the specified mechanism
# File lib/xmpp4r/sasl.rb, line 19
19: def SASL.new(stream, mechanism)
20: case mechanism
21: when 'DIGEST-MD5'
22: DigestMD5.new(stream)
23: when 'PLAIN'
24: Plain.new(stream)
25: when 'ANONYMOUS'
26: Anonymous.new(stream)
27: else
28: raise "Unknown SASL mechanism: #{mechanism}"
29: end
30: end