Skip to content

Commit a5ae43c

Browse files
committed
add tag and update README
1 parent 35765a9 commit a5ae43c

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,22 @@ You will need the following things properly installed on your computer.
1515

1616
The root of this project directory (next to this README) are two files [a Docker compose file](./docker-compose.yml) and an [environment variables configuration file](./.env). Assuming you have Docker installed on your machine, you can stand up FusionAuth up on your machine with:
1717

18-
```
18+
```sh
1919
docker compose up -d
2020
```
2121

2222
The FusionAuth configuration files also make use of a unique feature of FusionAuth, called [Kickstart](https://fusionauth.io/docs/v1/tech/installation-guide/kickstart): when FusionAuth comes up for the first time, it will look at the [Kickstart file](./kickstart/kickstart.json) and mimic API calls to configure FusionAuth for use when it is first run.
2323

24-
> **NOTE**: If you ever want to reset the FusionAuth system, delete the volumes created by docker-compose by executing `docker-compose down -v`.
24+
> **NOTE**: If you ever want to reset the FusionAuth system, delete the volumes created by docker-compose by executing `docker compose down -v`.
2525
2626
FusionAuth will be initially configured with these settings:
2727

28-
* Your client Id is: `e9fdb985-9173-4e01-9d73-ac2d60d1dc8e`
28+
* Your client Id is: `e9fdb985-9173-4e01-9d73-ac2d60d1dc8e`.
2929
* Your client secret is: `super-secret-secret-that-should-be-regenerated-for-production`
30-
* Your example username is `richard@example.com` and your password is `password`.
30+
* Your example teller username is `teller@example.com` and your password is `password`. They have the role `teller`.
31+
* Your example customer username is `customer@example.com` and your password is `password`. They have the role `customer`.
3132
* Your admin username is `admin@example.com` and your password is `password`.
32-
* Your fusionAuthBaseUrl is 'http://localhost:9011/'
33+
* Your fusionAuthBaseUrl is 'http://localhost:9011/'.
3334

3435
You can log into the [FusionAuth admin UI](http://localhost:9011/admin) and look around if you want, but with Docker/Kickstart you don't need to.
3536

@@ -38,7 +39,8 @@ You can log into the [FusionAuth admin UI](http://localhost:9011/admin) and look
3839
The `complete-application` directory contains a minimal app configured to authenticate with locally running FusionAuth.
3940

4041
Install the dependencies and run the app with
41-
```
42+
43+
```sh
4244
cd complete-application
4345
npm install
4446
npm run start
@@ -61,6 +63,12 @@ curl --location 'https://local.fusionauth.io/api/login' \
6163
}'
6264
```
6365

66+
Then make a request to the API using the returned token.
67+
68+
```sh
69+
curl --cookie 'app.at=<your_token>' 'http://localhost:3000/make-change?total=1.02'
70+
```
71+
6472
### Further Information
6573

6674
Visit https://fusionauth.io/docs/quickstarts/quickstart-javascript-express-api for a step-by-step guide on how to build this API from scratch.

complete-application/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ app.use(express.urlencoded({ extended: false }));
1313
app.use(cookieParser());
1414
app.use(express.static(path.join(__dirname, 'public')));
1515

16+
//tag::verifyToken[]
1617
const verifyJWT = require('./services/verifyJWT');
1718
app.use(verifyJWT);
19+
//end::verifyToken[]
1820

1921
app.use('/', indexRouter);
2022

0 commit comments

Comments
 (0)