You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
**Features:**
8
8
9
9
- JWT::Token and JWT::EncodedToken for signing and verifying tokens [#621](https://github.com/jwt/ruby-jwt/pull/621) ([@anakinj](https://github.com/anakinj))
10
+
- Detached payload support for JWT::Token and JWT::EncodedToken [#630](https://github.com/jwt/ruby-jwt/pull/630) ([@anakinj](https://github.com/anakinj))
# Set password to nil and validation to false otherwise this won't work
340
-
decoded_token =JWT.decode(token, nil, false)
361
+
JSON Web Token defines some reserved claim names and defines how they should be
362
+
used. JWT supports these reserved claim names:
341
363
342
-
# Array
343
-
# [
344
-
# {"data"=>"test"}, # payload
345
-
# {"typ"=>"JWT", "alg"=>"none"} # header
346
-
# ]
347
-
puts decoded_token
348
-
```
364
+
- 'exp' (Expiration Time) Claim
365
+
- 'nbf' (Not Before Time) Claim
366
+
- 'iss' (Issuer) Claim
367
+
- 'aud' (Audience) Claim
368
+
- 'jti' (JWT ID) Claim
369
+
- 'iat' (Issued At) Claim
370
+
- 'sub' (Subject) Claim
349
371
350
372
### Expiration Time Claim
351
373
@@ -648,7 +670,7 @@ rescue JWT::DecodeError
648
670
end
649
671
```
650
672
651
-
###JSON Web Key (JWK)
673
+
## JSON Web Key (JWK)
652
674
653
675
JWK is a JSON structure representing a cryptographic key. This gem currently supports RSA, EC, OKP and HMAC keys. OKP support requires [RbNaCl](https://github.com/RubyCrypto/rbnacl) and currently only supports the Ed25519 curve.
0 commit comments