You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add jwt authorization to supply chain example
1. The JWT token to be used is printed by the Supply Chain App after
it successfully bootstrapped itself (pulled up the ledgers, API server)
2. The web application uses a native window prompt for getting the token
which might need to be refactored in the future because there are ideas
floating around on the internet that the window prompt/alert APIs should
be discontinued in web browsers altogether.
3. The image built from this source code has been pushed to ghcr.io as:
ghcr.io/hyperledger/cactus-example-supply-chain-app:2022-04-05--feat-1579
closes#1579
Signed-off-by: Elena Izaguirre <[email protected]>
Signed-off-by: Peter Somogyvari <[email protected]>
Copy file name to clipboardExpand all lines: examples/cactus-example-supply-chain-frontend/src/app/bamboo-harvest/bamboo-harvest-list/bamboo-harvest-list.page.ts
+7-1
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,8 @@ import { QUORUM_DEMO_LEDGER_ID } from "../../../constants";
Building the image with a specific npm package version:
42
+
43
+
```sh
44
+
DOCKER_BUILDKIT=1 docker build \
45
+
--build-arg NPM_PKG_VERSION=jwt-supply-chain \
46
+
--file ./examples/supply-chain-app/Dockerfile \
47
+
--tag scaeb \
48
+
./
49
+
```
50
+
41
51
## Running the Example Application Locally
42
52
43
53
> Make sure you have all the dependencies set up as explained in`BUILD.md`
@@ -61,4 +71,6 @@ On the terminal, issue the following commands (steps 1 to 6) and then perform th
61
71
7. Locate the `.vscode/template.launch.json` file
62
72
8. Within that file locate the entry named `"Example: Supply Chain App"`
63
73
9. Copy the VSCode debug definition object from 2) to your `.vscode/launch.json` file
64
-
10. At this point the VSCode `Run and Debug` panel on the left should have an option also titled `"Example: Supply Chain App"` which
74
+
10. At this point the VSCode `Run and Debug` panel on the left should have an option also titled `"Example: Supply Chain App"` which starts the application
75
+
11. When the application finishes loading, token generated is displayed on the terminal
76
+
12. Visit http://localhost:3200 in a web browser with Javascript enabled and insert the token when prompted
0 commit comments