看 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 Jan 23, 2021 via Android
就翻译成字段呗,claims 这个词带点“可信”的意思,相对比较正式。
|
2
bigbyto OP @catror 我找了一下,Claims 是某个领域的专业术语,详情可以参考维基百科。https://en.wikipedia.org/wiki/Claims-based_identity
|
3
u20024804 Jan 23, 2021
杰打布棣 克来姆斯
|
4
ditel Jan 24, 2021 via Android
载荷
好像是这个说法 |
5
chihiro2014 Jan 24, 2021
@ditel 载荷是 payload
|
6
minsheng Jan 24, 2021 via iPhone
声明?
|
7
minsheng Jan 24, 2021 via iPhone
这里 claim 就是(中学时学的)英文原意,作为名词还真不知道怎么翻译
|
8
whevether Jan 24, 2021
@chihiro2014 就是叫载荷,你 claim 中的信息就在 payload 载荷中。你前端 abot('你的 jwt'.split('.')[1]) 中的 payload 部分你看看里面的信息就是你写入到 claim 中的。
|
11
billccn Jan 25, 2021
克雷姆斯 参考鲁棒性
|
12
wjswxp Jan 25, 2021 via iPhone
宣称?
|