json_web_token 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +3 -3
- data/lib/json_web_token/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53e92d6fa2738b3d32a6cb7ab7d1a6ac0b4da985
|
4
|
+
data.tar.gz: 18518b039fe8009cb69d73f7a1bb0a7b1e49e520
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d871623ab5168a3749e59c0c8a249262136517899d3d875cb7401b99a7f80d33134245e5b66b51673327b3e6e90362a8a75d2ae6082d6f2060404363e7408911
|
7
|
+
data.tar.gz: 769622487b7bfc6df0013f4c977e39a17f1f0975328ecb26f7c7c1718e9c96bc66e170321c749beaabebd83c55061bfcdf90b7fa7d927322ffcf8b9032d342e0
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -83,7 +83,7 @@ require 'json_web_token'
|
|
83
83
|
secure_jwt_example = 'eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt.cGxlLmNvbS9pc19yb290Ijp0cnVlfQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk'
|
84
84
|
|
85
85
|
# verify with default algorithm, HMAC SHA256
|
86
|
-
|
86
|
+
{ok: claims} = JsonWebToken.verify(secure_jwt_example, key: 'gZH75aKtMN3Yj0iPS4hcgUuTwjAzZr9C')
|
87
87
|
|
88
88
|
# verify with RSA SHA256 algorithm
|
89
89
|
opts = {
|
@@ -91,12 +91,12 @@ opts = {
|
|
91
91
|
key: < RSA public key >
|
92
92
|
}
|
93
93
|
|
94
|
-
|
94
|
+
{ok: claims} = JsonWebToken.verify(jwt, opts)
|
95
95
|
|
96
96
|
# unsecured token (algorithm is 'none')
|
97
97
|
unsecured_jwt_example = 'eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt.'
|
98
98
|
|
99
|
-
|
99
|
+
{ok: claims} = JsonWebToken.verify(unsecured_jwt_example, alg: 'none')
|
100
100
|
|
101
101
|
```
|
102
102
|
### Supported encryption algorithms
|