Skip to content

Commit ad06cf5

Browse files
committed
Update docs on token generation
Signed-off-by: Mihai Criveti <[email protected]>
1 parent 3f4464c commit ad06cf5

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
token.txt
12
*.db
23
*.bak
34
*.backup

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,8 +874,8 @@ You can get started by copying the provided [.env.example](.env.example) to `.en
874874
> * Generate tokens via:
875875
>
876876
> ```bash
877-
> python3 -m mcpgateway.utils.create_jwt_token -u admin -e 10080 > token.txt
878-
> export MCPGATEWAY_BEARER_TOKEN=$(cat token.txt)
877+
> export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token --username admin --exp 0 --secret my-test-key)
878+
> echo $MCPGATEWAY_BEARER_TOKEN
879879
> ```
880880
> * Tokens allow non-interactive API clients to authenticate securely.
881881
>

docs/docs/development/developer-workstation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ This guide helps you to set up your local environment for contributing to the Mo
5151
- Debian/Ubuntu: `sudo apt-get update && sudo apt-get install python3 docker.io docker-buildx-plugin docker-compose-plugin make nodejs npm`.
5252
- Fedora: `sudo dnf install python3 docker docker-buildx docker-compose make nodejs npm`.
5353
- **Permissions**: Add user to `docker` group: `sudo usermod -aG docker $USER`, then reboot.
54-
- **Troubleshooting**: Use `systemctl start docker` if the service isnt running.
54+
- **Troubleshooting**: Use `systemctl start docker` if the service isn't running.
5555

5656
### Windows
5757

@@ -67,7 +67,7 @@ This guide helps you to set up your local environment for contributing to the Mo
6767
- **Windows Terminal**
6868
- Install from Microsoft Store. set WSL2 as default profile.
6969
- **Make Alternatives**
70-
- Use WSL2s `make` or install via Chocolatey (`choco install make`).
70+
- Use WSL2's `make` or install via Chocolatey (`choco install make`).
7171

7272
## Common Gotchas
7373

@@ -140,4 +140,4 @@ To ensure commit integrity and comply with the DCO, sign your commits with a `Si
140140

141141
- **Setup**: Replace Your Name and [email protected] with your details.
142142
- **Signing**: Use git cm "Your message" to create signed commits automatically with the configured alias.
143-
- **Sign-off**: Use git commit -s -m "Your message" for manual signed commits without the alias.
143+
- **Sign-off**: Use git commit -s -m "Your message" for manual signed commits without the alias.

docs/docs/development/index.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,11 @@ make podman-run-ssl # run with self-signed TLS at https://localhost:4444
9292

9393
Admin UI and API are protected by Basic Auth or JWT.
9494

95-
To generate a JWT:
95+
To generate a JWT token:
9696

9797
```bash
98-
python3 -m mcpgateway.utils.create_jwt_token \
99-
-u admin \
100-
-e 10080 | tee token.txt
101-
102-
export MCPGATEWAY_BEARER_TOKEN=$(cat token.txt)
98+
export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token --username admin --exp 0 --secret my-test-key)
99+
echo $MCPGATEWAY_BEARER_TOKEN
103100
```
104101

105102
Then test:

0 commit comments

Comments
 (0)