File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,36 @@ Docker image is publicly available so you can run it on your own infrastructure:
5858``` bash
5959docker run --rm -p 3000:3000 kyberneees/jwt-keys-generator-api:latest
6060```
61+ Then:
62+ ``` bash
63+ curl -s http://localhost:3000/api/generate/ES512 | jq " ."
64+ ```
65+
66+ ## Keys Generator Script
67+ Alternatively, you can use the following script which also uses Docker:
68+ ``` bash
69+ #! /bin/bash
70+ set -e
71+
72+ ALGO=" ${1:- RS256} "
73+ echo " Algorihtm: $ALGO "
74+
75+ echo " > launching container..."
76+ docker run -d -p 3000:3000 --name jwt-keys kyberneees/jwt-keys-generator-api > /dev/null
77+ sleep 1
78+
79+ echo " > generating keys..."
80+ curl -s http://localhost:3000/api/generate/$ALGO | jq " ."
81+
82+ echo " > terminating container..."
83+ docker rm --force jwt-keys > /dev/null
84+ ```
85+ > NOTE: Please note that only the ` algorithm ` argument is supported in the script!
86+
87+ Usage:
88+ ``` bash
89+ sh gen-keys.sh ES512
90+ ```
6191
6292# LICENSE
6393
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ ALGO=" ${1:- RS256} "
5+ echo " Algorihtm: $ALGO "
6+
7+ echo " > launching container..."
8+ docker run -d -p 3000:3000 --name jwt-keys kyberneees/jwt-keys-generator-api > /dev/null
9+ sleep 1
10+
11+ echo " > generating keys..."
12+ curl -s http://localhost:3000/api/generate/$ALGO | jq " ."
13+
14+ echo " > terminating container..."
15+ docker rm --force jwt-keys > /dev/null
You can’t perform that action at this time.
0 commit comments