@@ -107,10 +107,17 @@ Auth
107107
108108To authenticate with Neo4j the authentication details are supplied at driver creation.
109109
110- The auth token is an object of the class :class: `neo4j.Auth ` containing the  details.
110+ The auth token is an object of the class :class: `neo4j.Auth ` containing static  details or  :class: ` neo4j.auth_management.AuthManager ` object .
111111
112112.. autoclass :: neo4j.Auth 
113113
114+ .. autoclass :: neo4j.auth_management.AuthManager 
115+     :members: 
116+ 
117+ .. autoclass :: neo4j.auth_management.AuthManagers 
118+     :members: 
119+ 
120+ .. autoclass :: neo4j.auth_management.ExpiringAuth 
114121
115122
116123Example:
@@ -154,7 +161,8 @@ Closing a driver will immediately shut down all connections in the pool.
154161
155162.. autoclass :: neo4j.Driver() 
156163    :members:  session, query_bookmark_manager, encrypted, close,
157-               verify_connectivity, get_server_info
164+               verify_connectivity, get_server_info, verify_authentication,
165+               supports_session_auth, supports_multi_db
158166
159167    .. method :: execute_query(query, parameters_=None,routing_=neo4j.RoutingControl.WRITE, database_=None, impersonated_user_=None, bookmark_manager_=self.query_bookmark_manager, result_transformer_=Result.to_eager_result, **kwargs) 
160168
@@ -174,7 +182,7 @@ Closing a driver will immediately shut down all connections in the pool.
174182
175183            def execute_query( 
176184                query_, parameters_, routing_, database_, impersonated_user_, 
177-                 bookmark_manager_, result_transformer_, **kwargs 
185+                 bookmark_manager_, auth_,  result_transformer_, **kwargs 
178186            ): 
179187                def work(tx): 
180188                    result = tx.run(query_, parameters_, **kwargs) 
@@ -184,6 +192,7 @@ Closing a driver will immediately shut down all connections in the pool.
184192                    database=database_, 
185193                    impersonated_user=impersonated_user_, 
186194                    bookmark_manager=bookmark_manager_, 
195+                     auth=auth_, 
187196                ) as session: 
188197                    if routing_ == RoutingControl.WRITE: 
189198                        return session.execute_write(work) 
@@ -263,6 +272,20 @@ Closing a driver will immediately shut down all connections in the pool.
263272
264273            See also the Session config :ref: `impersonated-user-ref `.
265274        :type impersonated_user_:  typing.Optional[str]
275+         :param auth_: 
276+             Authentication information to use for this query.
277+ 
278+             By default, the driver configuration is used.
279+ 
280+             **This is a preview ** (see :ref: `filter-warnings-ref `).
281+             It might be changed without following the deprecation policy.
282+             See also
283+             https://github.com/neo4j/neo4j-python-driver/wiki/preview-features
284+ 
285+             See also the Session config :ref: `session-auth-ref `.
286+         :type auth_:  typing.Union[
287+             typing.Tuple[typing.Any, typing.Any], neo4j.Auth, None
288+         ]
266289        :param result_transformer_: 
267290            A function that gets passed the :class: `neo4j.Result ` object
268291            resulting from the query and converts it to a different type. The
@@ -273,7 +296,6 @@ Closing a driver will immediately shut down all connections in the pool.
273296                The transformer function must **not ** return the
274297                :class: `neo4j.Result ` itself.
275298
276- 
277299            .. warning ::
278300
279301                N.B. the driver might retry the underlying transaction so the
@@ -334,7 +356,7 @@ Closing a driver will immediately shut down all connections in the pool.
334356
335357            Defaults to the driver's :attr: `.query_bookmark_manager `.
336358
337-             Pass :const : `None ` to disable causal consistency.
359+             Pass :data : `None ` to disable causal consistency.
338360        :type bookmark_manager_: 
339361            typing.Union[neo4j.BookmarkManager, neo4j.BookmarkManager,
340362                         None]
@@ -348,9 +370,18 @@ Closing a driver will immediately shut down all connections in the pool.
348370        :returns:  the result of the ``result_transformer ``
349371        :rtype:  T
350372
373+         **This is experimental ** (see :ref: `filter-warnings-ref `).
374+         It might be changed or removed any time even without prior notice.
375+ 
376+         We are looking for feedback on this feature. Please let us know what
377+         you think about it here:
378+         https://github.com/neo4j/neo4j-python-driver/discussions/896
379+ 
351380        .. versionadded :: 5.5 
352381
353-         .. versionchanged :: 5.8 stabilized from experimental 
382+         .. versionchanged :: 5.8 
383+             * Added the ``auth_ `` parameter.
384+             * Stabilized from experimental.
354385
355386
356387.. _driver-configuration-ref :
@@ -428,7 +459,7 @@ Specify whether TCP keep-alive should be enabled.
428459:Type:  ``bool ``
429460:Default:  ``True ``
430461
431- **This is experimental.  ** (See  :ref: `filter-warnings-ref `)
462+ **This is experimental ** (see  :ref: `filter-warnings-ref `). 
432463It might be changed or removed any time even without prior notice.
433464
434465
@@ -779,6 +810,7 @@ Session
779810    .. automethod :: execute_write 
780811
781812
813+ 
782814Query
783815===== 
784816
@@ -799,6 +831,7 @@ To construct a :class:`neo4j.Session` use the :meth:`neo4j.Driver.session` metho
799831+ :ref: `default-access-mode-ref `
800832+ :ref: `fetch-size-ref `
801833+ :ref: `bookmark-manager-ref `
834+ + :ref: `session-auth-ref `
802835+ :ref: `session-notifications-min-severity-ref `
803836+ :ref: `session-notifications-disabled-categories-ref `
804837
@@ -811,7 +844,7 @@ Optional :class:`neo4j.Bookmarks`. Use this to causally chain sessions.
811844See :meth: `Session.last_bookmarks ` or :meth: `AsyncSession.last_bookmarks ` for
812845more information.
813846
814- :Default:  `` None ` `
847+ :Default:  :data: ` None `
815848
816849.. deprecated :: 5.0 
817850    Alternatively, an iterable of strings can be passed. This usage is
@@ -993,6 +1026,29 @@ See :class:`.BookmarkManager` for more information.
9931026.. versionchanged :: 5.8 stabilized from experimental 
9941027
9951028
1029+ .. _session-auth-ref :
1030+ 
1031+ ``auth ``
1032+ -------- 
1033+ Optional :class: `neo4j.Auth ` or ``(user, password) ``-tuple. Use this overwrite the
1034+ authentication information for the session.
1035+ This requires the server to support re-authentication on the protocol level. You can
1036+ check this by calling :meth: `.Driver.supports_session_auth ` / :meth: `.AsyncDriver.supports_session_auth `.
1037+ 
1038+ It is not possible to overwrite the authentication information for the session with no authentication,
1039+ i.e., downgrade the authentication at session level.
1040+ Instead, you should create a driver with no authentication and upgrade the authentication at session level as needed.
1041+ 
1042+ **This is a preview ** (see :ref: `filter-warnings-ref `).
1043+ It might be changed without following the deprecation policy.
1044+ See also https://github.com/neo4j/neo4j-python-driver/wiki/preview-features
1045+ 
1046+ :Type:  :data: `None `, :class: `.Auth ` or ``(user, password) ``-tuple
1047+ :Default:  :data: `None ` - use the authentication information provided during driver creation.
1048+ 
1049+ .. versionadded :: 5.x 
1050+ 
1051+ 
9961052.. _session-notifications-min-severity-ref :
9971053
9981054``notifications_min_severity ``
@@ -1287,7 +1343,7 @@ Graph
12871343
12881344    .. automethod :: relationship_type 
12891345
1290- **This is experimental.  ** (See  :ref: `filter-warnings-ref `)
1346+ **This is experimental ** (see  :ref: `filter-warnings-ref `). 
12911347It might be changed or removed any time even without prior notice.
12921348
12931349
@@ -1745,6 +1801,8 @@ Server-side errors
17451801
17461802      * :class: `neo4j.exceptions.TokenExpired `
17471803
1804+         * :class: `neo4j.exceptions.TokenExpiredRetryable `
1805+ 
17481806    * :class: `neo4j.exceptions.Forbidden `
17491807
17501808  * :class: `neo4j.exceptions.DatabaseError `
@@ -1780,6 +1838,9 @@ Server-side errors
17801838.. autoexception :: neo4j.exceptions.TokenExpired() 
17811839    :show-inheritance: 
17821840
1841+ .. autoexception :: neo4j.exceptions.TokenExpiredRetryable() 
1842+     :show-inheritance: 
1843+ 
17831844.. autoexception :: neo4j.exceptions.Forbidden() 
17841845    :show-inheritance: 
17851846
0 commit comments