Authen::SASL::Perl â Perl implementation of the SASL Authentication framework
| Use Case | Command | Description |
|---|---|---|
| Initialize SASL client with Perl | use Authen::SASL qw(Perl); $sasl = Authen::SASL->new(mechanism => '...', callback => {...}); | đ Load the Perl implementation and create a SASL client object |
| Use CRAM-MD5 mechanism | mechanism => 'CRAM-MD5' | đ Challenge-response; no plaintext passwords sent |
| Use DIGEST-MD5 mechanism | mechanism => 'DIGEST-MD5' | đĄī¸ Stronger challenge-response; resists replay/dictionary attacks |
| Use PLAIN/LOGIN mechanism | mechanism => 'PLAIN' or mechanism => 'LOGIN' | â ī¸ Sends credentials in cleartext; use only with TLS/encryption |
| Use GSSAPI (Kerberos) mechanism | mechanism => 'GSSAPI' | đ Generic Security Services; primarily Kerberos 5 |
| Use EXTERNAL mechanism | mechanism => 'EXTERNAL' | đ Delegates to external authentication system |
| Server-side DIGEST-MD5 options | server_new(options => { no_integrity => 1, no_confidentiality => 1 }) | âī¸ Configure security layer negotiation for DIGEST-MD5 server |
use Authen::SASL qw(Perl);
$sasl = Authen::SASL->new(
mechanism => 'CRAM-MD5 PLAIN ANONYMOUS',
callback => {
user => $user,
pass => \&fetch_password
}
);
Authen::SASL::Perl is the pure Perl implementation of SASL mechanisms in the Authen::SASL framework.
At the time of this writing it provides the client part implementation for the following SASL mechanisms:
As for server support, only PLAIN, LOGIN and DIGEST-MD5 are supported at the time of this writing.
server_new OPTIONS is a hashref that is only relevant for DIGEST-MD5 for now and it supports the following options:
no_integrity â đĢ Disable integrity layerno_confidentiality â đĢ Disable confidentiality layerwhich configures how the security layers are negotiated with the client (or rather imposed to the client).
Peter Marschall <peter AT adpm.de>
Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap AT perl.org>
Copyright (c) 2004-2006 Peter Marschall. All rights reserved. This document is distributed, and may be redistributed, under the same terms as Perl itself.
Generated by phpman v4.10.0-16-g1a0e228 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-22 15:57 @216.73.217.0
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)