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_EXPIRED
  • LDAP_PP_ACCOUNT_LOCKED
  • LDAP_PP_CHANGE_AFTER_RESET
  • LDAP_PP_PASSWORD_MOD_NOT_ALLOWED
  • LDAP_PP_MUST_SUPPLY_OLD_PASSWORD
  • LDAP_PP_INSUFFICIENT_PASSWORD_QUALITY
  • LDAP_PP_PASSWORD_TOO_SHORT
  • LDAP_PP_PASSWORD_TOO_YOUNG
  • LDAP_PP_PASSWORD_IN_HISTORY

πŸ‘‘ SEE ALSO πŸ‘‘

  • Net::LDAP
  • Net::LDAP::Control
  • Net::LDAP::Constant
  • draft-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 (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