Skip to content

Commit c128684

Browse files
author
stroeder
committed
more on SASL binds and extended controls
1 parent a5ff993 commit c128684

File tree

1 file changed

+65
-45
lines changed

1 file changed

+65
-45
lines changed

Doc/ldap.rst

Lines changed: 65 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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 $
22
33
********************************************
44
:py:mod:`ldap` LDAP library interface module
@@ -593,6 +593,8 @@ LDAPObject classes
593593
*retry_delay* specifies the time in seconds between reconnect attempts.
594594

595595

596+
.. _ldap-controls:
597+
596598
Arguments for LDAPv3 controls
597599
-----------------------------
598600

@@ -638,7 +640,7 @@ and wait for and return with the server's result, or with
638640
The caller can expect that the result of an abandoned operation will not be
639641
returned from a future call to :py:meth:`result()`.
640642

641-
*serverctrls* and *clientctrls* like described above.
643+
*serverctrls* and *clientctrls* like described in section :ref:`ldap-controls`.
642644

643645

644646
.. py:method:: LDAPObject.add(dn, modlist) -> int
@@ -658,46 +660,13 @@ and wait for and return with the server's result, or with
658660
The asynchronous methods :py:meth:`add()` and :py:meth:`add_ext()`
659661
return the message ID of the initiated request.
660662

661-
*serverctrls* and *clientctrls* like described above.
663+
*serverctrls* and *clientctrls* like described in section :ref:`ldap-controls`.
664+
662665

663666
.. py:method:: LDAPObject.bind(who, cred, method) -> int
664667
665668
.. py:method:: LDAPObject.bind_s(who, cred, method) -> None
666669
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-
701670
.. py:method:: LDAPObject.cancel( cancelid, [, serverctrls=None [, clientctrls=None]]) -> None
702671
703672
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
708677
In opposite to :py:meth:`abandon()` this extended operation gets an result from
709678
the server and thus should be preferred if the server supports it.
710679

711-
*serverctrls* and *clientctrls* like described above.
680+
*serverctrls* and *clientctrls* like described in section :ref:`ldap-controls`.
712681

713682
:rfc:`3909` - Lightweight Directory Access Protocol (LDAP): Cancel Operation
714683

@@ -732,7 +701,7 @@ and wait for and return with the server's result, or with
732701
by raising the exception objects :py:exc:`ldap.COMPARE_TRUE` or
733702
:py:exc:`ldap.COMPARE_FALSE`.
734703

735-
*serverctrls* and *clientctrls* like described above.
704+
*serverctrls* and *clientctrls* like described in section :ref:`ldap-controls`.
736705

737706
.. note::
738707

@@ -752,7 +721,7 @@ and wait for and return with the server's result, or with
752721
returns the message id of the initiated request, and the result can be obtained
753722
from a subsequent call to :py:meth:`result()`.
754723

755-
*serverctrls* and *clientctrls* like described above.
724+
*serverctrls* and *clientctrls* like described in section :ref:`ldap-controls`.
756725

757726

758727
.. 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
766735
The *extreq* is an instance of class :py:class:`ldap.extop.ExtendedRequest`
767736
containing the parameters for the extended operation request.
768737

738+
*serverctrls* and *clientctrls* like described in section :ref:`ldap-controls`.
739+
769740
If argument *extop_resp_class* is set to a sub-class of
770741
:py:class:`ldap.extop.ExtendedResponse` this class is used to return an
771742
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
797768
delete or replace respectively. For the delete operation, *mod_vals*
798769
may be :py:const:`None` indicating that all attributes are to be deleted.
799770

800-
*serverctrls* and *clientctrls* like described above.
771+
*serverctrls* and *clientctrls* like described in section :ref:`ldap-controls`.
801772

802773
The asynchronous methods :py:meth:`modify()` and :py:meth:`modify_ext()`
803774
return the message ID of the initiated request.
@@ -835,7 +806,7 @@ and wait for and return with the server's result, or with
835806
of the specified *user* which is sometimes used when a user changes
836807
his own password.
837808

838-
*serverctrls* and *clientctrls* like described above.
809+
*serverctrls* and *clientctrls* like described in section :ref:`ldap-controls`.
839810

840811
The asynchronous version returns the initiated message id.
841812

@@ -858,7 +829,8 @@ and wait for and return with the server's result, or with
858829
The optional parameter *delold* is used to specify
859830
whether the old RDN should be kept as an attribute of the entry or not.
860831

861-
*serverctrls* and *clientctrls* like described above.
832+
*serverctrls* and *clientctrls* like described in section :ref:`ldap-controls`.
833+
862834

863835
.. py:method:: LDAPObject.result([msgid=RES_ANY [, all=1 [, timeout=None]]]) -> 2-tuple
864836
@@ -960,6 +932,54 @@ and wait for and return with the server's result, or with
960932
If :py:const:`None` the global dictionary :py:data:`ldap.controls.KNOWN_RESPONSE_CONTROLS`
961933
is used instead.
962934

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+
963983
.. py:method:: LDAPObject.search(base, scope [,filterstr='(objectClass=*)' [, attrlist=None [, attrsonly=0]]]) ->int
964984
965985
.. 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
10001020
The retrieved attributes can be limited with the *attrlist* parameter.
10011021
If *attrlist* is :py:const:`None`, all the attributes of each entry are returned.
10021022

1003-
*serverctrls* and *clientctrls* like described above.
1023+
*serverctrls* and *clientctrls* like described in section :ref:`ldap-controls`.
10041024

10051025
The synchronous form with timeout, :py:meth:`search_st()` or :py:meth:`search_ext_s()`,
10061026
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
10381058
LDAP server is closed and the LDAP object is marked invalid.
10391059
Further invocation of methods on the object will yield exceptions.
10401060

1041-
*serverctrls* and *clientctrls* like described above.
1061+
*serverctrls* and *clientctrls* like described in section :ref:`ldap-controls`.
10421062

10431063
These methods are all synchronous in nature.
10441064

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy