Net::LD...dPolicy(3)
Hey bestie!! π You've landed on Net::LDAP::Control::PasswordPolicy, straight out of the User Contributed Perl Documentation β it's the LDAPv3 Password Policy control object, and it's honestly giving "my password has rules" energy. Let's get into it π«Ά
π NAME π
Net::LDAP::Control::PasswordPolicy β an LDAPv3 Password Policy control object, periodt. β¨
β¨ SYNOPSIS β¨
use Net::LDAP;
use Net::LDAP::Control::PasswordPolicy;
use Net::LDAP::Constant qw( LDAP_CONTROL_PASSWORDPOLICY );
$ldap = Net::LDAP->new( "ldap.example.com" );
$pp = Net::LDAP::Control::PasswordPolicy->new;
$mesg = $ldap->bind( "cn=Bob Smith,dc=example,dc=com",
password => "secret",
control => [ $pp ] );
# Get password policy response
my($resp) = $mesg->control( LDAP_CONTROL_PASSWORDPOLICY );
if (defined($resp)) {
my $v = $resp->pp_error;
print "Password policy error $v\n" if defined $v;
$v = $resp->time_before_expiration;
print "Password expires in $v second(s)\n" if defined $v;
}
πΈ DESCRIPTION πΈ
Net::LDAP::Control::PasswordPolicy provides an interface for the creation and manipulation of objects that represent PasswordPolicyRequests and PasswordPolicyResponses as described by draft-behera-password-policy-09. π¦
This control can be passed to most operations, including the bind. No cap. π
π CONSTRUCTOR ARGUMENTS π
There are no constructor arguments other than those provided by Net::LDAP::Control. That's it, bestie β literally none extra. π
π¦ METHODS π¦
β³ time_before_expiration
If defined, this is an integer value holding the time left in seconds before the account's password will expire. So it's giving "tick tock, bestie" energy. β³
π«Ά grace_authentications_remaining
If defined, this is an integer value holding the number of authentication requests allowed before the account is locked. Use them wisely, queen. π«Ά
π pp_error
If defined, this contains a more detailed error code for the account. See Net::LDAP::Constant for definitions of each. Values can include:
LDAP_PP_PASSWORD_EXPIREDLDAP_PP_ACCOUNT_LOCKEDLDAP_PP_CHANGE_AFTER_RESETLDAP_PP_PASSWORD_MOD_NOT_ALLOWEDLDAP_PP_MUST_SUPPLY_OLD_PASSWORDLDAP_PP_INSUFFICIENT_PASSWORD_QUALITYLDAP_PP_PASSWORD_TOO_SHORTLDAP_PP_PASSWORD_TOO_YOUNGLDAP_PP_PASSWORD_IN_HISTORY
π SEE ALSO π
Net::LDAPNet::LDAP::ControlNet::LDAP::Constantdraft-behera-ldap-password-policy-09.txt
π AUTHOR π
Chris Ridd <chris.ridd@isode.com> π
Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>. π«Ά
π COPYRIGHT π
Copyright (c) 2008 Chris Ridd. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π
That's the whole page, bestie β signed, sealed, and stamped by perl v5.42.0, dated 2024-01-02. Now go make those passwords expire on schedule π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-ldap 0.68-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms