JWT Claims 该如何翻译

2021-01-23 22:51:41 +08:00
 bigbyto

看 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

3015 次点击
所在节点    程序员
12 条回复
catror
2021-01-23 23:16:52 +08:00
就翻译成字段呗,claims 这个词带点“可信”的意思,相对比较正式。
bigbyto
2021-01-23 23:27:35 +08:00
@catror 我找了一下,Claims 是某个领域的专业术语,详情可以参考维基百科。https://en.wikipedia.org/wiki/Claims-based_identity
u20024804
2021-01-23 23:34:17 +08:00
杰打布棣 克来姆斯
ditel
2021-01-24 01:53:32 +08:00
载荷
好像是这个说法
chihiro2014
2021-01-24 10:08:53 +08:00
@ditel 载荷是 payload
minsheng
2021-01-24 10:11:56 +08:00
声明?
minsheng
2021-01-24 10:13:32 +08:00
这里 claim 就是(中学时学的)英文原意,作为名词还真不知道怎么翻译
whevether
2021-01-24 10:53:20 +08:00
@chihiro2014 就是叫载荷,你 claim 中的信息就在 payload 载荷中。你前端 abot('你的 jwt'.split('.')[1]) 中的 payload 部分你看看里面的信息就是你写入到 claim 中的。
bigbyto
2021-01-24 15:23:20 +08:00
@whevether 是两个概念。可以说 claims 是 JWS 结构的 payload,它本身是有自己的含义的。
bigbyto
2021-01-24 15:30:18 +08:00
@minsheng 可以参考一下我 append 的内容,这个单词跟 handle 和 socket 这些一样,最好就是不要翻译。
billccn
2021-01-25 00:19:49 +08:00
克雷姆斯 参考鲁棒性
wjswxp
2021-01-25 09:50:23 +08:00
宣称?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/747769

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX