DigestMD5(3)
π NAME π
Okay bestie, this is the DigestMD5(3) page from User Contributed Perl Documentation, and itβs all about Authen::DigestMD5 β SASL DIGEST-MD5 authentication (RFC2831). Thatβs the whole main-character energy of this file. π
β¨ SYNOPSIS β¨
use Authen::DigestMD5;
use OnLDAP;
$ld=OnLDAP::Client->new($host);
($rc, $id)=$ld->sasl_bind(undef, 'DIGEST-MD5');
($rc, $msg)=$ld->result($id);
($rc, $req)=$ld->parse_sasl_bind_result($msg);
print "IN: |$req|\n";
my $request=Authen::DigestMD5::Request->new($req);
my $response=Authen::DigestMD5::Response->new;
$response->got_request($request);
$response->set(username => $user,
realm => $realm,
'digest-uri' => "ldap/$host");
$response->add_digest(password=>$passwd);
my $res=$response->output;
print "OUT: |$res|\n";
($rc, $id)=$ld->sasl_bind(undef, 'DIGEST-MD5', $res);
($rc, $msg)=$ld->result($id);
($rc, $req)=$ld->parse_sasl_bind_result($msg);
$request->input($req);
print $request->auth_ok ? "AUTH OK\n" : "AUTH FAILED\n"
π¦ ABSTRACT π¦
This module supports DIGEST-MD5 SASL authentication as defined on RFC-2831. Periodt. π
πΈ DESCRIPTION πΈ
This module implements three classes, bestie:
π§ Authen::DigestMD5::Packet π§
base class implementing common methods to process SASL DIGEST-MD5 strings or objects:
Authen::DigestMD5::Packet->new(%props)/Authen::DigestMD5::Packet->new($input, %props)β creates a new object with the properties in%props. If$inputis passed, it is parsed and the values obtained from it are added to the object.$pkt->input($input)β parses the properties on the string$inputand adds them to the object.$pkt->output()β packs all the properties on the object as a string suitable for sending to a SASL DIGEST-MD5 server or client.$pkg->set($k1=>$v1, $k2=>$v2, ...)/$pkg->set(%props)β sets object properties.($v1, $v2, ...)=$pkg->get($k1, $k2, ...)β gets object properties.$pkg->reset()β clears public object properties. Some internal properties likenccounters are retained.
π Authen::DigestMD5::Request π
class to represent SASL DIGEST-MD5 requests as obtained from a server.
$req->auth_ok()β returns a true value if the request object contains a valid authentication token.
π Authen::DigestMD5::Response π
class to represent and generate SASL DIGEST-MD5 responses suitable for sending to a server.
$res->got_request($req)β adds certain properties to the response$resobject generated from the request$reqones.$res->add_digest(password => $password)β adds the"response"property containing the MD5 digest to the response object.
π SEE ALSO π
Be sure to look at Authen::SASL because it is very likely that it is what you are looking for ("Authen::DigestMD5" is only suitable when you need a finer control over the authentication procedure). Iykyk. β¨
SASL DIGEST-MD5 RFC: http://www.ietf.org/rfc/rfc2831.txt.
π AUTHOR π
Salvador FandiΓ±o, <sfandino@yahoo.com>
π COPYRIGHT AND LICENSE π
Copyright 2003 by Salvador FandiΓ±o.
Portions of this module have been copied from the Authen::SASL package by Graham Barr.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π POD ERRORS π
Hey! The above document had some coding errors, which are explained below:
Around line 317:
Non-ASCII character seen before =encoding in 'FandiΓ±o,'. Assuming UTF-8
π and thatβs the whole DigestMD5(3) page, bestie β source/version perl v5.32.1, dated 2024-05-21. Go authenticate something cute π«Ά
π¦ where this page comes from
- epel 9: perl-Authen-DigestMD5 0.04-48.el9 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms