1
- .. % $Id: ldap.rst,v 1.40 2017/09/04 15:02:29 stroeder Exp $
1
+ .. % $Id: ldap.rst,v 1.41 2017/09/05 07:23:36 stroeder Exp $
2
2
3
3
********************************************
4
4
:py:mod: `ldap ` LDAP library interface module
@@ -593,6 +593,8 @@ LDAPObject classes
593
593
*retry_delay * specifies the time in seconds between reconnect attempts.
594
594
595
595
596
+ .. _ldap-controls :
597
+
596
598
Arguments for LDAPv3 controls
597
599
-----------------------------
598
600
@@ -638,7 +640,7 @@ and wait for and return with the server's result, or with
638
640
The caller can expect that the result of an abandoned operation will not be
639
641
returned from a future call to :py:meth: `result() `.
640
642
641
- *serverctrls * and *clientctrls * like described above .
643
+ *serverctrls * and *clientctrls * like described in section :ref: ` ldap-controls ` .
642
644
643
645
644
646
.. py :method :: LDAPObject.add(dn, modlist) -> int
@@ -658,46 +660,13 @@ and wait for and return with the server's result, or with
658
660
The asynchronous methods :py:meth: `add() ` and :py:meth: `add_ext() `
659
661
return the message ID of the initiated request.
660
662
661
- *serverctrls * and *clientctrls * like described above.
663
+ *serverctrls * and *clientctrls * like described in section :ref: `ldap-controls `.
664
+
662
665
663
666
.. py :method :: LDAPObject.bind(who, cred, method) -> int
664
667
665
668
.. py :method :: LDAPObject.bind_s(who, cred, method) -> None
666
669
667
- .. py :method :: LDAPObject.simple_bind([who=' ' [, cred=' ' [, serverctrls=None [, clientctrls=None ]]]]) -> int
668
-
669
- .. py :method :: LDAPObject.simple_bind_s([who=' ' [, cred=' ' [, serverctrls=None [, clientctrls=None ]]]]) -> None
670
-
671
- After an LDAP object is created, and before any other operations can be
672
- attempted over the connection, a bind operation must be performed.
673
-
674
- This method attempts to bind with the LDAP server using
675
- either simple authentication, or Kerberos (if available).
676
- The first and most general method, :py:meth: `bind() `,
677
- takes a third parameter, *method * which can currently solely
678
- be :py:const: `AUTH_SIMPLE `.
679
-
680
-
681
- .. py :method :: LDAPObject.sasl_interactive_bind_s(who, auth[, serverctrls=None [, clientctrls=None [, sasl_flags=ldap.SASL_QUIET ]]]) -> None
682
-
683
- This call is used to bind to the directory with a SASL bind request.
684
-
685
-
686
- .. py :method :: LDAPObject.sasl_non_interactive_bind_s(who, auth[, serverctrls=None [, clientctrls=None [, sasl_flags=ldap.SASL_QUIET [, authz_id=' ' ]]]]) -> None
687
-
688
- This call is used to bind to the directory with a SASL bind request.
689
-
690
-
691
- .. py :method :: LDAPObject.sasl_external_bind_s([serverctrls=None [, clientctrls=None [, sasl_flags=ldap.SASL_QUIET [, authz_id=' ' ]]]]) -> None
692
-
693
- This call is used to bind to the directory with a SASL bind request with mechanism EXTERNAL.
694
-
695
-
696
- .. py :method :: LDAPObject.sasl_gssapi_bind_s([serverctrls=None [, clientctrls=None [, sasl_flags=ldap.SASL_QUIET [, authz_id=' ' ]]]]) -> None
697
-
698
- This call is used to bind to the directory with a SASL bind request with mechanism GSSAPI.
699
-
700
-
701
670
.. py :method :: LDAPObject.cancel( cancelid, [, serverctrls=None [, clientctrls=None ]]) -> None
702
671
703
672
Send cancels extended operation for an LDAP operation specified by *cancelid *.
@@ -708,7 +677,7 @@ and wait for and return with the server's result, or with
708
677
In opposite to :py:meth: `abandon() ` this extended operation gets an result from
709
678
the server and thus should be preferred if the server supports it.
710
679
711
- *serverctrls * and *clientctrls * like described above .
680
+ *serverctrls * and *clientctrls * like described in section :ref: ` ldap-controls ` .
712
681
713
682
:rfc: `3909 ` - Lightweight Directory Access Protocol (LDAP): Cancel Operation
714
683
@@ -732,7 +701,7 @@ and wait for and return with the server's result, or with
732
701
by raising the exception objects :py:exc: `ldap.COMPARE_TRUE ` or
733
702
:py:exc: `ldap.COMPARE_FALSE `.
734
703
735
- *serverctrls * and *clientctrls * like described above .
704
+ *serverctrls * and *clientctrls * like described in section :ref: ` ldap-controls ` .
736
705
737
706
.. note ::
738
707
@@ -752,7 +721,7 @@ and wait for and return with the server's result, or with
752
721
returns the message id of the initiated request, and the result can be obtained
753
722
from a subsequent call to :py:meth: `result() `.
754
723
755
- *serverctrls * and *clientctrls * like described above .
724
+ *serverctrls * and *clientctrls * like described in section :ref: ` ldap-controls ` .
756
725
757
726
758
727
.. py :method :: LDAPObject.extop(extreq[,serverctrls=None [,clientctrls=None ]]]) -> int
@@ -766,6 +735,8 @@ and wait for and return with the server's result, or with
766
735
The *extreq * is an instance of class :py:class: `ldap.extop.ExtendedRequest `
767
736
containing the parameters for the extended operation request.
768
737
738
+ *serverctrls * and *clientctrls * like described in section :ref: `ldap-controls `.
739
+
769
740
If argument *extop_resp_class * is set to a sub-class of
770
741
:py:class: `ldap.extop.ExtendedResponse ` this class is used to return an
771
742
object of this class instead of a raw BER value in respvalue.
@@ -797,7 +768,7 @@ and wait for and return with the server's result, or with
797
768
delete or replace respectively. For the delete operation, *mod_vals *
798
769
may be :py:const: `None ` indicating that all attributes are to be deleted.
799
770
800
- *serverctrls * and *clientctrls * like described above .
771
+ *serverctrls * and *clientctrls * like described in section :ref: ` ldap-controls ` .
801
772
802
773
The asynchronous methods :py:meth: `modify() ` and :py:meth: `modify_ext() `
803
774
return the message ID of the initiated request.
@@ -835,7 +806,7 @@ and wait for and return with the server's result, or with
835
806
of the specified *user * which is sometimes used when a user changes
836
807
his own password.
837
808
838
- *serverctrls * and *clientctrls * like described above .
809
+ *serverctrls * and *clientctrls * like described in section :ref: ` ldap-controls ` .
839
810
840
811
The asynchronous version returns the initiated message id.
841
812
@@ -858,7 +829,8 @@ and wait for and return with the server's result, or with
858
829
The optional parameter *delold * is used to specify
859
830
whether the old RDN should be kept as an attribute of the entry or not.
860
831
861
- *serverctrls * and *clientctrls * like described above.
832
+ *serverctrls * and *clientctrls * like described in section :ref: `ldap-controls `.
833
+
862
834
863
835
.. py :method :: LDAPObject.result([msgid=RES_ANY [, all =1 [, timeout=None ]]]) -> 2 - tuple
864
836
@@ -960,6 +932,54 @@ and wait for and return with the server's result, or with
960
932
If :py:const: `None ` the global dictionary :py:data: `ldap.controls.KNOWN_RESPONSE_CONTROLS `
961
933
is used instead.
962
934
935
+ .. py :method :: LDAPObject.sasl_interactive_bind_s(who, auth[, serverctrls=None [, clientctrls=None [, sasl_flags=ldap.SASL_QUIET ]]]) -> None
936
+
937
+ This call is used to bind to the directory with a SASL bind request.
938
+
939
+ *serverctrls * and *clientctrls * like described in section :ref: `ldap-controls `.
940
+
941
+
942
+ .. py :method :: LDAPObject.sasl_non_interactive_bind_s(sasl_mech[, serverctrls=None [, clientctrls=None [, sasl_flags=ldap.SASL_QUIET [, authz_id=' ' ]]]]) -> None
943
+
944
+ This call is used to bind to the directory with a SASL bind request with
945
+ non-interactive SASL mechanism defined with argument *sasl_mech * and
946
+ internally calls :py:meth: `sasl_interactive_bind_s() `.
947
+
948
+ *serverctrls * and *clientctrls * like described in section :ref: `ldap-controls `.
949
+
950
+
951
+ .. py :method :: LDAPObject.sasl_external_bind_s([serverctrls=None [, clientctrls=None [, sasl_flags=ldap.SASL_QUIET [, authz_id=' ' ]]]]) -> None
952
+
953
+ This call is used to bind to the directory with a SASL bind request with
954
+ mechanism EXTERNAL and internally calls :py:meth: `sasl_non_interactive_bind_s() `.
955
+
956
+ *serverctrls * and *clientctrls * like described in section :ref: `ldap-controls `.
957
+
958
+
959
+ .. py :method :: LDAPObject.sasl_gssapi_bind_s([serverctrls=None [, clientctrls=None [, sasl_flags=ldap.SASL_QUIET [, authz_id=' ' ]]]]) -> None
960
+
961
+ This call is used to bind to the directory with a SASL bind request with
962
+ mechanism GSSAPI and internally calls :py:meth: `sasl_non_interactive_bind_s() `.
963
+
964
+ *serverctrls * and *clientctrls * like described in section :ref: `ldap-controls `.
965
+
966
+
967
+ .. py :method :: LDAPObject.simple_bind([who=' ' [, cred=' ' [, serverctrls=None [, clientctrls=None ]]]]) -> int
968
+
969
+ .. py :method :: LDAPObject.simple_bind_s([who=' ' [, cred=' ' [, serverctrls=None [, clientctrls=None ]]]]) -> None
970
+
971
+ After an LDAP object is created, and before any other operations can be
972
+ attempted over the connection, a bind operation must be performed.
973
+
974
+ This method attempts to bind with the LDAP server using
975
+ either simple authentication, or Kerberos (if available).
976
+ The first and most general method, :py:meth: `bind() `,
977
+ takes a third parameter, *method * which can currently solely
978
+ be :py:const: `AUTH_SIMPLE `.
979
+
980
+ *serverctrls * and *clientctrls * like described in section :ref: `ldap-controls `.
981
+
982
+
963
983
.. py :method :: LDAPObject.search(base, scope [,filterstr=' (objectClass=*)' [, attrlist=None [, attrsonly=0 ]]]) -> int
964
984
965
985
.. py :method :: LDAPObject.search_s(base, scope [,filterstr=' (objectClass=*)' [, attrlist=None [, attrsonly=0 ]]]) -> list | None
@@ -1000,7 +1020,7 @@ and wait for and return with the server's result, or with
1000
1020
The retrieved attributes can be limited with the *attrlist * parameter.
1001
1021
If *attrlist * is :py:const: `None `, all the attributes of each entry are returned.
1002
1022
1003
- *serverctrls * and *clientctrls * like described above .
1023
+ *serverctrls * and *clientctrls * like described in section :ref: ` ldap-controls ` .
1004
1024
1005
1025
The synchronous form with timeout, :py:meth: `search_st() ` or :py:meth: `search_ext_s() `,
1006
1026
will block for at most *timeout * seconds (or indefinitely if *timeout *
@@ -1038,7 +1058,7 @@ and wait for and return with the server's result, or with
1038
1058
LDAP server is closed and the LDAP object is marked invalid.
1039
1059
Further invocation of methods on the object will yield exceptions.
1040
1060
1041
- *serverctrls * and *clientctrls * like described above .
1061
+ *serverctrls * and *clientctrls * like described in section :ref: ` ldap-controls ` .
1042
1062
1043
1063
These methods are all synchronous in nature.
1044
1064
0 commit comments