Authen...::SCRAM(3pm)
β¨ Authen::SASL::SCRAM β¨
okay bestie, so this is a page from the Perl User Contributed Perl Documentation and it's literally about Authen::SASL::SCRAM, the module that gives you SCRAM support for Authen::SASL. yes we're doing auth stuff today. yes it's gonna be fun. sit down, grab a boba π§, and let's go.
πΈ NAME πΈ
Authen::SASL::SCRAM β SCRAM support for Authen::SASL π
π VERSION π
This is version 0.04, bestie. tiny number, big energy. β¨
π¦ SYNOPSIS π¦
okay so here's the whole vibe, copied exactly so you can just paste it and go:
# with Authen::SASL::SCRAM installed
use Authen::SASL;
my $client = Authen::SASL->new(
username => 'user',
password => 'pass',
mechanism => 'SCRAM-SHA-512 SCRAM-SHA-256 SCRAM-SHA-1 PLAIN'
);
# authenticates using SCRAM SHA hash or PLAIN
my $salt = 'your-precious-salt';
# $server_key and $stored_key need to be looked up from a user store
my $server_key = 'server-key-stored-for-this-user';
my $stored_key = 'key-stored-for-this-user';
my $server => Authen::SASL->new(
mechanism => 'SCRAM-SHA-1', # selected mechanism
callback => {
getsecret => sub {
my $username = shift;
return ($salt, $stored_key, $server_key, $iterations);
},
}
);
so like, first block: you're the client πββοΈ, you hand over username, password and a mechanism list, and it authenticates using SCRAM SHA hash or PLAIN. second block: you're the server</c> side-ish setup, you got your $salt (she's precious, protect her), and your $server_key and $stored_key β those two need to be looked up from a user store, no cap. then the getsecret callback returns ($salt, $stored_key, $server_key, $iterations). that's it. that's the whole recipe. π«Ά
π₯ DESCRIPTION π₯
The Authen::SASL::SCRAM distribution adds Authen::SASL support for SCRAM authentication using the mechanisms listed below, by wrapping Authen::SCRAM. it's giving β¨delegationβ¨, it's giving π§middlewareπ§, it's giving "I don't do the crypto, my friend does".
the mechanisms, bestie, in order:
- SHA-1 (
SCRAM-SHA-1) - SHA-256 (
SCRAM-SHA-256) - SHA-512 (
SCRAM-SHA-512)
okay important thing, don't skip this: the *-PLUS variants are NOT supported at this time. so if you were hoping for the PLUS ones... not today, bestie. π not today.
π BUGS π
found a bug? (rude of it, honestly.) please report bugs via https://github.com/ehuelsmann/authen-sasl-scram/issues. the maintainers will appreciate you fr fr. π«Ά
π SEE ALSO π
go read these too, they're iconic:
Authen::SASLAuthen::SCRAM
π AUTHOR π
Erik Huelsmann <ehuels@gmail.com> β the main character who wrote this. π
π COPYRIGHT π
Copyright (c) 2023 Erik Huelsmann. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
like, same terms as Perl itself, so go forth and remix responsibly. β¨
aaaand that's the whole page bestie!! π this doc was served up by perl v5.36.0 on 2023-08-09, and honestly? iconic date, iconic module, iconic read. now go authenticate something and slay π πΈπ¦
π¦ where this page comes from
- debian trixie: libauthen-sasl-scram-perl 0.04-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libauthen-sasl-scram-perl 0.04-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libauthen-sasl-scram-perl 0.04-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libauthen-sasl-scram-perl 0.04-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms