Module: Jabber::SASL
- Defined in:
- lib/kinokero/sasl_xoauth2.rb
Overview
****************************************************************************
Defined Under Namespace
Classes: Xoauth2
Class Method Summary collapse
-
.new(stream, mechanism) ⇒ Object
—————————————————————————– Factory function to obtain a SASL helper for the specified mechanism —————————————————————————–.
Class Method Details
.new(stream, mechanism) ⇒ Object
Factory function to obtain a SASL helper for the specified mechanism
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/kinokero/sasl_xoauth2.rb', line 68 def SASL.new(stream, mechanism) case mechanism when MECHANISM_XOAUTH2 # added for the override Xoauth2.new(stream) when 'DIGEST-MD5' DigestMD5.new(stream) when 'PLAIN' Plain.new(stream) when 'ANONYMOUS' Anonymous.new(stream) else raise "Unknown SASL mechanism: #{mechanism}" end # case end |