File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333extensions = [
3434 'sphinx.ext.autodoc' ,
3535 'sphinx.ext.intersphinx' ,
36+ 'sphinx.ext.napoleon' ,
3637]
3738
3839try :
Original file line number Diff line number Diff line change @@ -209,3 +209,16 @@ search.
209209
210210.. autoclass :: ldap.controls.readentry.PostReadControl
211211 :members:
212+
213+
214+ :py:mod: `ldap.controls.ppolicy ` Password Policy Control
215+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
216+
217+ .. seealso ::
218+ `draft-behera-ldap-password-policy <https://tools.ietf.org/html/draft-behera-ldap-password-policy >`_
219+
220+ .. py :module :: ldap.controls.ppolicy
221+ :synopsis: passworld policies
222+
223+ .. autoclass :: ldap.controls.ppolicy.PasswordPolicyControl
224+ :members:
Original file line number Diff line number Diff line change @@ -62,17 +62,31 @@ class PasswordPolicyResponseValue(univ.Sequence):
6262
6363
6464class PasswordPolicyControl (ValueLessRequestControl ,ResponseControl ):
65+ """
66+ Indicates the errors and warnings about the password policy.
67+
68+ Attributes
69+ ----------
70+
71+ timeBeforeExpiration : int
72+ The time before the password expires.
73+
74+ graceAuthNsRemaining : int
75+ The number of grace authentications remaining.
76+
77+ error: int
78+ The password and authentication errors.
79+ """
6580 controlType = '1.3.6.1.4.1.42.2.27.8.5.1'
6681
6782 def __init__ (self ,criticality = False ):
6883 self .criticality = criticality
69-
70- def decodeControlValue (self ,encodedControlValue ):
71- ppolicyValue ,_ = decoder .decode (encodedControlValue ,asn1Spec = PasswordPolicyResponseValue ())
7284 self .timeBeforeExpiration = None
7385 self .graceAuthNsRemaining = None
7486 self .error = None
7587
88+ def decodeControlValue (self ,encodedControlValue ):
89+ ppolicyValue ,_ = decoder .decode (encodedControlValue ,asn1Spec = PasswordPolicyResponseValue ())
7690 warning = ppolicyValue .getComponentByName ('warning' )
7791 if warning .hasValue ():
7892 if 'timeBeforeExpiration' in warning :
You can’t perform that action at this time.
0 commit comments