Module | EventMachine::Protocols::SASLauthclient |
In: |
lib/protocols/saslauth.rb
|
Implements the SASL authd client protocol. This is a very, very simple protocol that mimics the one used by saslauthd and pwcheck, two outboard daemons included in the standard SASL library distro. The only thing this is really suitable for is SASL PLAIN (user+password) authentication, but the SASL libs that are linked into standard servers (like imapd and sendmail) implement the other ones.
You can use this module directly as a handler for EM Connections, or include it in a module or handler class of your own.
First connect to a SASL server (it‘s probably a TCP server, or more likely a Unix-domain socket). Then call the validate? method, passing at least a username and a password. validate? returns a Deferrable which will either succeed or fail, depending on the status of the authentication operation.
MaxFieldSize | = | 128*1024 |