File tree Expand file tree Collapse file tree 3 files changed +31
-3
lines changed Expand file tree Collapse file tree 3 files changed +31
-3
lines changed Original file line number Diff line number Diff line change 33
33
extensions = [
34
34
'sphinx.ext.autodoc' ,
35
35
'sphinx.ext.intersphinx' ,
36
+ 'sphinx.ext.napoleon' ,
36
37
]
37
38
38
39
try :
Original file line number Diff line number Diff line change @@ -209,3 +209,16 @@ search.
209
209
210
210
.. autoclass :: ldap.controls.readentry.PostReadControl
211
211
: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):
62
62
63
63
64
64
class 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
+ """
65
80
controlType = '1.3.6.1.4.1.42.2.27.8.5.1'
66
81
67
82
def __init__ (self ,criticality = False ):
68
83
self .criticality = criticality
69
-
70
- def decodeControlValue (self ,encodedControlValue ):
71
- ppolicyValue ,_ = decoder .decode (encodedControlValue ,asn1Spec = PasswordPolicyResponseValue ())
72
84
self .timeBeforeExpiration = None
73
85
self .graceAuthNsRemaining = None
74
86
self .error = None
75
87
88
+ def decodeControlValue (self ,encodedControlValue ):
89
+ ppolicyValue ,_ = decoder .decode (encodedControlValue ,asn1Spec = PasswordPolicyResponseValue ())
76
90
warning = ppolicyValue .getComponentByName ('warning' )
77
91
if warning .hasValue ():
78
92
if 'timeBeforeExpiration' in warning :
You can’t perform that action at this time.
0 commit comments