看 RFC 中对它的描述似乎是等价于 JSON 中的"字段",那该怎么翻译 JWT Claims 比较好呢?或者说为什么要取名为 Claims,希望大佬不吝赐教。
The JWT Claims Set represents a JSON object whose members are the claims conveyed by the JWT. The Claim Names within a JWT Claims Set MUST be unique; JWT parsers MUST either reject JWTs with duplicate Claim Names or use a JSON parser that returns only the lexically last duplicate member name, as specified in Section 15.12 ("The JSON Object") of ECMAScript 5.1 [ECMAScript].
The claims in a JWT are encoded as a JSON object that is used as the payload of a JSON Web Signature (JWS) structure
![]() | 1 catror 2021-01-23 23:16:52 +08:00 via Android 就翻译成字段呗,claims 这个词带点“可信”的意思,相对比较正式。 |
![]() | 2 bigbyto OP @catror 我找了一下,Claims 是某个领域的专业术语,详情可以参考维基百科。https://en.wikipedia.org/wiki/Claims-based_identity |
3 u20024804 2021-01-23 23:34:17 +08:00 杰打布棣 克来姆斯 |
![]() | 4 ditel 2021-01-24 01:53:32 +08:00 via Android 载荷 好像是这个说法 |
5 chihiro2014 2021-01-24 10:08:53 +08:00 @ditel 载荷是 payload |
![]() | 6 minsheng 2021-01-24 10:11:56 +08:00 via iPhone 声明? |
![]() | 7 minsheng 2021-01-24 10:13:32 +08:00 via iPhone 这里 claim 就是(中学时学的)英文原意,作为名词还真不知道怎么翻译 |
8 whevether 2021-01-24 10:53:20 +08:00 @chihiro2014 就是叫载荷,你 claim 中的信息就在 payload 载荷中。你前端 abot('你的 jwt'.split('.')[1]) 中的 payload 部分你看看里面的信息就是你写入到 claim 中的。 |
![]() | 10 bigbyto OP @minsheng 可以参考一下我 append 的内容,这个单词跟 handle 和 socket 这些一样,最好就是不要翻译。 |
11 billccn 2021-01-25 00:19:49 +08:00 克雷姆斯 参考鲁棒性 |
![]() | 12 wjswxp 2021-01-25 09:50:23 +08:00 via iPhone 宣称? |