File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -161,14 +161,29 @@ parameters should be passed as form-encoded data:
161
161
Authentication
162
162
--------------
163
163
164
- Patchwork only supports basic authentication:
164
+ Patchwork supports authentication using your username and password (basic
165
+ authentication) or with a token (token authentication). The latter is
166
+ recommended.
167
+
168
+ To authenticate with token authentication, you must first obtain a token. This
169
+ can be done from your profile, e.g. https://patchwork.example.com/profile.
170
+ Once you have a token, run:
171
+
172
+ .. code-block :: shell
173
+
174
+ $ curl -H " Authorization: Token ${token} " \
175
+ ' https://patchwork.example.com/api/'
176
+
177
+ To authenticate using basic auth, you should use your Patchwork username and
178
+ password. To do this, run:
165
179
166
180
.. code-block :: shell
167
181
168
- $ curl -u username:password ' https://patchwork.example.com/api/'
182
+ $ curl -u ${username} :${password} \
183
+ ' https://patchwork.example.com/api/'
169
184
170
- Not all resources require authentication. Those that do will return ``404 Not
171
- Found `` if authentication is not provided to avoid leaking information.
185
+ Not all resources require authentication. Those that do will return ``404 ( Not
186
+ Found) `` if authentication is not provided to avoid leaking information.
172
187
173
188
Pagination
174
189
----------
You can’t perform that action at this time.
0 commit comments