@snyk/jwt-cli 0.4.0 → 0.6.2

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 CHANGED
@@ -18,11 +18,16 @@ or the Go toolchain:
18
18
  go install github.com/snyk/jwt-cli/cmd/jwt@v0.3.1
19
19
  ```
20
20
 
21
+ or using docker:
22
+ ```
23
+ docker pull gcr.io/snyk-main/jwt:latest
24
+ ```
25
+
21
26
  ## Create a JWT
22
27
  To create a token, first you're going to need some keys:
23
28
 
24
29
  ```shell
25
- $ $ jwt keys
30
+ $ jwt keys
26
31
  writing jwt_private_key.pem ...
27
32
  writing jwt_public_key.pem ...
28
33
  writing jwt_jwks.json ...
@@ -47,6 +52,21 @@ Starting JWKS server at port 80
47
52
 
48
53
  This will make a JWKS server available at [http://localhost/.well-known/jwks.json](http://localhost/.well-known/jwks.json).
49
54
 
55
+ ### Using docker
56
+
57
+ When using the provided docker image, you will need to mount a volume to interact with the keys.
58
+
59
+ ```shell
60
+ # creating keys under ./keys
61
+ docker run -v $(pwd)/keys:/keys gcr.io/snyk-main/jwt:latest keys -o /keys
62
+
63
+ # creating jwt from keys under ./keys
64
+ docker run -v $(pwd)/keys:/keys gcr.io/snyk-main/jwt:latest create -i /keys/jwt_private_key.pem
65
+
66
+ # serving jwks from keys under ./keys
67
+ docker run -v $(pwd)/keys:/keys gcr.io/snyk-main/jwt:latest serve -i /keys/jwt_private_key.pem -p 8080
68
+ ```
69
+
50
70
  ## Validate your JWT
51
71
 
52
72
  You can quickly print a tokens claims using `jq`:
Binary file
Binary file
Binary file
package/bin/jwt-linux-x64 CHANGED
Binary file
package/bin/jwt.exe CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snyk/jwt-cli",
3
- "version": "v0.4.0",
3
+ "version": "v0.6.2",
4
4
  "description": "jwt-cli is a little command line tool to create jwts locally",
5
5
  "bin": {
6
6
  "jwt": "bin/jwt"