Skip to content

Commit e320fb5

Browse files
authored
Merge pull request #25 from auth0-samples/update-readme
Update README.md
2 parents cb3177d + 80d65a7 commit e320fb5

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

00-Starter-Seed/README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# Auth0 + Python + Flask API Seed
2+
23
This is the seed project you need to use if you're going to create a Python + Flask API.
34
If you just want to create a Regular Python WebApp, please
45
check [this project](https://github.com/auth0-samples/auth0-python-web-app/tree/master/01-Login)
56

67
Please check our [Quickstart](https://auth0.com/docs/quickstart/backend/python) to better understand this sample.
78

89
# Running the example
10+
911
In order to run the example you need to have `python` and `pip` installed.
1012

1113
You also need to set your Auth0 Domain and the API's audience as environment variables with the following names
12-
respectively: `AUTH0_DOMAIN` and `API_ID`, which is the audience of your API. You can find an example in the
14+
respectively: `AUTH0_DOMAIN` and `AUTH0_AUDIENCE`, which is the audience of your API. You can find an example in the
1315
`env.example` file.
1416

1517
For that, if you just create a file named `.env` in the directory and set the values like the following,
@@ -18,24 +20,24 @@ the app will just work:
1820
```bash
1921
# .env file
2022
AUTH0_DOMAIN=example.auth0.com
21-
API_ID=YOUR_API_AUDIENCE
23+
AUTH0_AUDIENCE=YOUR_API_AUDIENCE
2224
```
2325

24-
Once you've set those 2 enviroment variables:
26+
Once you've set those 2 environment variables:
2527

2628
1. Install the needed dependencies with `pip install -r requirements.txt`
2729
2. Start the server with `python server.py`
28-
3. Try calling [http://localhost:3010/ping](http://localhost:3010/ping)
30+
3. Try calling [http://localhost:3010/api/public](http://localhost:3010/api/public)
2931

3032
# Testing the API
3133

32-
You can then try to do a GET to [http://localhost:3010/secured/ping](http://localhost:3010/secured/ping) which will
34+
You can then try to do a GET to [http://localhost:3010/api/private](http://localhost:3010/api/private) which will
3335
throw an error if you don't send an access token signed with RS256 with the appropriate issuer and audience in the
3436
Authorization header.
3537

3638
You can also try to do a GET to
37-
[http://localhost:3010/secured/private/ping](http://localhost:3010/secured/private/ping) which will throw an error if
38-
you don't send an access token with the scope `read:agenda` signed with RS256 with the appropriate issuer and audience
39+
[http://localhost:3010/api/private-scoped](http://localhost:3010/api/private-scoped) which will throw an error if
40+
you don't send an access token with the scope `read:messages` signed with RS256 with the appropriate issuer and audience
3941
in the Authorization header.
4042

4143
# Running the example with Docker
@@ -44,4 +46,4 @@ In order to run the sample with [Docker](https://www.docker.com/) you need to ad
4446
to the `.env` filed as explained [previously](#running-the-example) and then
4547

4648
1. Execute in command line `sh exec.sh` to run the Docker in Linux, or `.\exec.ps1` to run the Docker in Windows.
47-
2. Try calling [http://localhost:3010/ping](http://localhost:3010/ping)
49+
2. Try calling [http://localhost:3010/api/public](http://localhost:3010/api/public)

0 commit comments

Comments
 (0)