Module: Net::SASL
- Defined in:
- lib/net/sasl.rb,
lib/net/sasl/version.rb,
lib/net/sasl/registry.rb,
lib/net/sasl/authenticator.rb,
lib/net/sasl/login_authenticator.rb,
lib/net/sasl/plain_authenticator.rb,
lib/net/sasl/cram_md5_authenticator.rb,
lib/net/sasl/digest_md5_authenticator.rb
Overview
Pluggable authentication mechanisms for protocols which support SASL (Simple Authentication and Security Layer), such as IMAP4, SMTP, LDAP, and XMPP. SASL is described by RFC4422: “SASL is conceptually a framework that provides an abstraction layer between protocols and mechanisms as illustrated in the following diagram.”
SMTP LDAP XMPP Other protocols ...
\ | | /
\ | | /
SASL abstraction layer
/ | | \
/ | | \
EXTERNAL GSSAPI PLAIN Other mechanisms ...
This library was originally implemented for Net::IMAP, and has been extracted from there.
Defined Under Namespace
Classes: Authenticator, ChallengeParseError, CramMD5Authenticator, DataFormatError, DigestMD5Authenticator, Error, LoginAuthenticator, PlainAuthenticator, Registry
Constant Summary collapse
- DEFAULT_REGISTRY =
The default global registry used by Net::SASL.authenticator
Registry.new
- VERSION =
"0.1.0"
Class Method Summary collapse
-
.add_authenticator(mechanism, authenticator) ⇒ Object
Adds an authenticator to the global registry, for use with Net::SASL.authenticator.
-
.authenticator(mechanism, *args, **kwargs) ⇒ Object
Builds an authenticator in its initial state, based on
mechanism
name.
Class Method Details
.add_authenticator(mechanism, authenticator) ⇒ Object
Adds an authenticator to the global registry, for use with Net::SASL.authenticator. See Net::SASL::Registry#add_authenticator.
46 47 48 |
# File 'lib/net/sasl.rb', line 46 def self.add_authenticator(mechanism, authenticator) DEFAULT_REGISTRY.add_authenticator(mechanism, authenticator) end |
.authenticator(mechanism, *args, **kwargs) ⇒ Object
Builds an authenticator in its initial state, based on mechanism
name. Any additional arguments will be passed directly to the chosen authenticator’s #new
method. See Net::SASL::Registry#authenticator.
53 54 55 |
# File 'lib/net/sasl.rb', line 53 def self.authenticator(mechanism, *args, **kwargs) DEFAULT_REGISTRY.authenticator(mechanism, *args, **kwargs) end |