DJabberd::SASL(3)
π DJabberd::SASL(3) π
okay so bestie, welcome to the DJabberd::SASL page β it's part of the User Contributed Perl Documentation crew, and it's basically the blueprint page. no actual SASL logic in here, just the scaffolding. think of it as the mannequin, not the outfit. π
β¨ NAME β¨
DJabberd::SASL β the base plugin for SASL negotiation. that's it, that's the whole name. iconic minimalism. π
π¦ DESCRIPTION π¦
So this base plugin is literally just the skeleton you need to build SASL layers inside DJabberd. It gives you exactly one hook β GetSASLManager β which kicks off the SASL negotiation and hands back a SASL Manager object. That's its whole job. It also hooks the SASL stanzas over to the default DJabberd::Stanza::SASL class. π«Ά
Want to see a real live concrete plugin built on top of this? Go peek at DJabberd::SASL::AuthenSASL. iykyk. π
π§ HOW DOES THE DEFAULT SASL INFRASTRUCTURE WORK π§
okay so this is the part where it gets good. when you declare a DJabberd::SASL subclass inside a VHost, that's what enables SASL negotiation for the connection. boom. β¨
And what does that actually mean? It means SASL gets advertised in the stream features. Then, when the client sends a SASL stanza (check RFC 3920 for the deets), those stanzas get handled using the DJabberd::Stanza::SASL class β and that class makes a few assumptions:
- The plugin supports the
GetSASLManagerhook, which returns aDJabberd::SASL::ManagerBasesubclass. π - The interface to this manager β and to the sasl connection object (we'll get to that later) β is a superset of the
Authen::SASLinterface.
From that point on, the whole SASL negotiation is in the hands of the configured SASL Manager. not your problem anymore, bestie. π
One config option is common to all the plugins: it's Optional, and it advertises to the client whether SASL is optional or not. And by default, SASL is β and should be β required. no cap, keep it required. π¨
πΈ SYNOPSIS πΈ
<VHost yann.cyberion.net>
<Plugin DJabberd::SASL::%Subclass%>
Optional yes
%Config%
</Plugin>
</VHost>
π EXTENDING SASL IN DJABBERD π
See the examples. that's the assignment. π
It's actually fairly easy to extend the SASL phase with literally anything you want β as long as the simple DJabberd::SASL::ManagerBase and DJabberd::SASL::Connection (which are based on Authen::SASL) are respected. respect the elders, periodt. π
Alternatively β since this is just a plugin β you can throw the whole thing away and write something from scratch. main character energy, honestly. But heads up: you'll have to provide a new set of handlers for the SASL stanzas (as a replacement for DJabberd::Stanzas::SASL). β
π real talk: going the from-scratch route means you're on stanza-handler duty yourself. no shortcuts, bestie.
π COPYRIGHT π
(c) 2009 Yann Kerherve
This module is part of the DJabberd distribution and is covered by the distribution's overall licence. π
and that's the whole page, bestie! π«Ά this slice of lore was brought to you by perl v5.42.0, dated 2025-12-14, and it's DJabberd::SASL(3) all the way down. mwah π
π¦ where this page comes from
- arch rolling: perl-djabberd 0.85-14 Β· GPL AND PerlArtistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms