File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -111,23 +111,26 @@ The auth token is an object of the class :class:`neo4j.Auth` containing static d
111
111
112
112
.. autoclass :: neo4j.Auth
113
113
114
+ Example:
115
+
116
+ .. code-block :: python
117
+
118
+ import neo4j
119
+
120
+
121
+ auth = neo4j.Auth(" basic" , " neo4j" , " password" )
122
+
123
+
114
124
.. autoclass :: neo4j.auth_management.AuthManager
115
125
:members:
116
126
117
127
.. autoclass :: neo4j.auth_management.AuthManagers
118
128
:members:
119
129
120
130
.. autoclass :: neo4j.auth_management.ExpiringAuth
131
+ :members:
121
132
122
133
123
- Example:
124
-
125
- .. code-block :: python
126
-
127
- import neo4j
128
-
129
-
130
- auth = neo4j.Auth(" basic" , " neo4j" , " password" )
131
134
132
135
133
136
Auth Token Helper Functions
Original file line number Diff line number Diff line change @@ -58,12 +58,18 @@ class ExpiringAuth:
58
58
:meth:`.AsyncAuthManagers.expiration_based`
59
59
60
60
.. versionadded:: 5.8
61
+
62
+ .. versionchanged:: 5.9
63
+ Removed parameter and attribute ``expires_in`` (relative expiration
64
+ time). Replaced with ``expires_at`` (absolute expiration time).
65
+ :meth:`.expires_in` can be used to create an :class:`.ExpiringAuth`
66
+ with a relative expiration time.
61
67
"""
62
68
auth : "_TAuth"
63
69
expires_at : t .Optional [float ] = None
64
70
65
71
def expires_in (self , seconds : float ) -> "ExpiringAuth" :
66
- """Return a copy of this object with a new expiration time.
72
+ """Return a (flat) copy of this object with a new expiration time.
67
73
68
74
This is a convenience method for creating an :class:`.ExpiringAuth`
69
75
for a relative expiration time ("expires in" instead of "expires at").
@@ -79,6 +85,8 @@ def expires_in(self, seconds: float) -> "ExpiringAuth":
79
85
:param seconds:
80
86
The number of seconds from now until the authentication information
81
87
expires.
88
+
89
+ .. versionadded:: 5.9
82
90
"""
83
91
with warnings .catch_warnings ():
84
92
warnings .filterwarnings ("ignore" ,
You can’t perform that action at this time.
0 commit comments