@snyk/jwt-cli 0.7.1 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -4
- package/bin/jwt-darwin-arm64 +0 -0
- package/bin/jwt-darwin-x64 +0 -0
- package/bin/jwt-linux-arm64 +0 -0
- package/bin/jwt-linux-x64 +0 -0
- package/bin/jwt.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,6 +23,11 @@ or using docker:
|
|
|
23
23
|
docker pull gcr.io/snyk-main/jwt:latest
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
or using nix:
|
|
27
|
+
```shell
|
|
28
|
+
nix-env -i git+ssh://git@github.com/snyk/jwt-cli
|
|
29
|
+
```
|
|
30
|
+
|
|
26
31
|
## Create a JWT
|
|
27
32
|
To create a token, first you're going to need some keys:
|
|
28
33
|
|
|
@@ -47,13 +52,13 @@ eyJhbGciOiJSUzI1NiIsImtpZCI6Imp3dC1jbGkta2V5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJodHRw
|
|
|
47
52
|
You can launch a proxy server that creates a JWT and adds it as `Authorization` header to an HTTP request on the fly:
|
|
48
53
|
```shell
|
|
49
54
|
$ jwt proxy -r localhost:8081
|
|
50
|
-
Proxying HTTP requests from localhost:
|
|
55
|
+
Proxying HTTP requests from localhost:8080 to localhost:8081
|
|
51
56
|
```
|
|
52
57
|
|
|
53
58
|
You can also serve the public key for your signed token via JWKS with:
|
|
54
59
|
```shell
|
|
55
60
|
$ jwt serve
|
|
56
|
-
Starting JWKS server at port
|
|
61
|
+
Starting JWKS server at port 8080
|
|
57
62
|
```
|
|
58
63
|
|
|
59
64
|
This will make a JWKS server available at [http://localhost/.well-known/jwks.json](http://localhost/.well-known/jwks.json).
|
|
@@ -174,7 +179,7 @@ OPTIONS:
|
|
|
174
179
|
--address value, -a value address to serve from (default: localhost)
|
|
175
180
|
--claims value, -c value relative path to a JSON file containing claims
|
|
176
181
|
--identity_file value, -i value relative path to the identity (PEM private key) file (default: ./jwt_private_key.pem)
|
|
177
|
-
--port value, -p value port to serve from (default:
|
|
182
|
+
--port value, -p value port to serve from (default: 8080)
|
|
178
183
|
--remote value, -r value remote address (host[:port]) (default: localhost:8080)
|
|
179
184
|
```
|
|
180
185
|
|
|
@@ -190,7 +195,7 @@ USAGE:
|
|
|
190
195
|
OPTIONS:
|
|
191
196
|
--address value, -a value address to serve from (default: localhost)
|
|
192
197
|
--identity_file value, -i value relative path to the identity (PEM private key) file (default: ./jwt_private_key.pem)
|
|
193
|
-
--port value, -p value port to serve from (default:
|
|
198
|
+
--port value, -p value port to serve from (default: 8080)
|
|
194
199
|
```
|
|
195
200
|
|
|
196
201
|
## Contributing
|
package/bin/jwt-darwin-arm64
CHANGED
|
Binary file
|
package/bin/jwt-darwin-x64
CHANGED
|
Binary file
|
package/bin/jwt-linux-arm64
CHANGED
|
Binary file
|
package/bin/jwt-linux-x64
CHANGED
|
Binary file
|
package/bin/jwt.exe
CHANGED
|
Binary file
|