Net::LD...:Refresh(3)

🌸 Net::LDAP::Extension::Refresh(3) β€” the LDAPv3 Refresh extension object (RFC 2589)

okay bestie so real talk: this page lives in the User Contributed Perl Documentation section of your man pages (that's the manual name, you're welcome πŸ’…), and it's all about Net::LDAP::Extension::Refresh β€” the LDAPv3 Refresh extension object from RFC 2589. yes, that RFC. iconic behavior. let's get into it ✨


✨ SYNOPSIS ✨

here's the vibe in code form, copy it exactly, no cap:

use Net::LDAP;
use Net::LDAP::Extension::Refresh;

$ldap = Net::LDAP->new('localhost');
$ldap->bind('cn=admin,dc=example,dc=com', password => 'password');

$mesg = $ldap->refresh(entryName => 'cn=dynamic,dc=example,dc=com',
       requestTtl => 100);
die "error :", $mesg->code(), ": ", $mesg->error()  if ($mesg->code());
print "TTL changed to ", $mesg->get_ttl(), "\n";

like, bind, refresh, check the code, print the TTL. that's the whole arc. main character energy fr fr πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

Net::LDAP::Extension::Refresh implements the Refresh extended LDAPv3 operation, exactly as described in RFC 2589.

and here's the lowkey important part: it implements no object by itself, but it extends the Net::LDAP object by another method:


πŸ‘‘ METHODS πŸ‘‘

πŸ’– refresh ( OPTIONS )

sends a refresh operation for an object. that's it, that's the whole job. πŸ’…

OPTIONS is a list of key/value pairs. these are the keys that are recognized:

  • entryName β€” this option contains the object to refresh. it must be a DN (a distinguished name, bestie, don't try to be cute and pass something else πŸ™ˆ).
  • requestTtl β€” this option contains the TTL in seconds requested. heads up though: the server may choose to set another value as stated in RFC 2589. so like, you ask politely, the server decides. it's giving "suggestion, not a command." ✨

🧚 get_ttl ( )

returns the TTL that the server set during the previous refresh call.

and okay, this detail matters so listen up: this method is a method of the Net::LDAP::Message response object returned in reply to refresh() β€” in case the refresh() call succeeded. so if it flopped, don't go calling this and expecting magic, mkay? 😭


🌈 SEE ALSO 🌈

  • Net::LDAP
  • Net::LDAP::Extension

go read those too, they're the supporting cast 🫢


πŸ’œ AUTHOR πŸ’œ

Etienne Bagnoud <etienne.bagnoud@irovision.ch> β€” adapted from Graham Barr's Net::LDAP::Extension::SetPassword. documentation adapted from Peter Marschall's Net::LDAP::Extension::SetPassword. slay, and thank you for your service to the ecosystem πŸ‘‘

please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>. we love feedback, we love a bug report with receipts, drop them in the group chat πŸ“¬


Copyright (c) 2010 Etienne Bagnoud. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

(so yes, same terms as Perl itself β€” classic, iconic, we stan a permissive license πŸ’–)


🌸 and that's the whole page bestie! go refresh some dynamic entries, respect the server's TTL decisions, and remember: entryName is a DN, always. mwah πŸ’‹

and lastly, a lil sign-off so nobody comes for me about citations: this here is from perl v5.42.0, dated 2024-01-02, and the page is Net::LD...:Refresh(3) β€” the truncated-title life chose it, not me 😭✨

πŸ“¦ where this page comes from