File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 6
6
7
7
This is the expected behaviour. While the integrity of tokens is ensured by the generated/verified hash,
8
8
the contents of the token are only ** encoded and not encrypted** . This means you can be sure the token
9
- has not been modified by an unauthorized party, but you should not store confidential information in it.
9
+ has not been modified by an unauthorized party, but you should not store confidential information in it.
10
10
Anyone with access to the token can read all the claims you put into it. They can however not modify
11
11
them unless they have the (private or symetric) key used to generate the token. If you need to put
12
12
confidential information into it, current industry recommends generating a random id and store the data on your
@@ -37,6 +37,16 @@ auto token = jwt::create()
37
37
The signature includes both the header and payload, according to the RFCs... changing the payload would cause a discrepancy.
38
38
That should result in the token being rejected. For more details checkout [#194](https://github.com/Thalhammer/jwt-cpp/issues/194).
39
39
40
+ ### Why does `jwt::basic_claim` have no `as_object()` method?
41
+
42
+ This was brought up in [#212](https://github.com/Thalhammer/jwt-cpp/issues/212#issuecomment-1054344192) and
43
+ [#101](https://github.com/Thalhammer/jwt-cpp/issues/101) as it's an excellent question.
44
+
45
+ It simply was not required to handle the required keys in JWTs for signing or verification. All the the mandatory keys are numeric,
46
+ string or arrary types which required type definitions and access.
47
+
48
+ The alternative is to use the `to_json()` method and use the libraries own APIs to pick the data type you need.
49
+
40
50
## Build Issues
41
51
42
52
### Missing \_HMAC and \_EVP_sha256 symbols on Mac
You can’t perform that action at this time.
0 commit comments