Skip to content

Commit

Permalink
[qa] Remove curl exemple to comply to bump.sh restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
frankrousseau committed Sep 5, 2024
1 parent 0385b5c commit 45bc80d
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions zou/app/swagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,13 @@
<p>Before you can use any of the endpoints outline below,
you will have to get a JWT token to authorize your requests.
</p>
You can get a authorization token using a (form-encoded) POST request to ```/auth/login```.
With curl this would look something like ```curl -X POST <server_address>/auth/login -d "email=<youremail>&password=<yourpassword>```.
<p>
You will find the information to retrieve it in the
<a href="#tag/Authentication">Zou documentation</a>.
</p>
The response is a JSON object, specifically you'll need to provide the ```access_token``` for your future requests.
Here is a complete authentication process as an example (again using curl):
```
$ curl -X POST <server_address>/api/auth/login -d "email=<youremail>&password=<yourpassword>"'
{{"login": true", "access_token": "eyJ0e...", ...}}
$ jwt=eyJ0e... # Store the access token for easier use
$ curl -H "Authorization: Bearer $jwt" <server_address>/api/data/projects
[{{...}},
{{...}}]
```
[OpenAPI definition](/openapi.json)
"""

Expand Down

0 comments on commit 45bc80d

Please sign in to comment.