Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Net::LDAP::Control::PasswordPolicy

Name Net::LDAP::Control::PasswordPolicy
Version 0.04
Located at /usr/local/share/perl5
File /usr/local/share/perl5/Net/LDAP/Control/PasswordPolicy.pm
Is Core No
Search CPAN for this module Net::LDAP::Control::PasswordPolicy
Documentation Net::LDAP::Control::PasswordPolicy
Module Details Net::LDAP::Control::PasswordPolicy

NAME

Net::LDAP::Control::PasswordPolicy - LDAPv3 Password Policy control object


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.


CONSTRUCTOR ARGUMENTS

There are no constructor arguments other than those provided by the Net::LDAP::Control manpage.


METHODS

time_before_expiration
If defined, this is an integer value holding the time left in seconds before the account's password will expire.

grace_authentications_remaining
If defined, this is an integer value holding the number of authentication requests allowed before the account is locked.

pp_error
If defined, this contains a more detailed error code for the account. See the Net::LDAP::Constant manpage 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

the Net::LDAP manpage, the Net::LDAP::Control manpage, the Net::LDAP::Constant manpage, 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

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.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024