tg-me.com/rust_daily_news/5874
Last Update:
crates.io 上的 API token scope现在处于公开 Beta 测试期!
https://crates.io/settings/tokens/new
该功能允许用户选择 token 可以调用哪些 endpoints 以及可以影响哪些crates。此功能用于改善 CI 场景(例如在推送 git 标签后自动发布 crates)。
RFC 中定义的 endpoint scope:
- publish-new: 允许发布新的 crate , 对应 endpoint: PUT /crates/new (new crates) PUT /crates/new
- publish-update: 允许用户更新现有 crate , 对应 endpoint: PUT /crates/new (existing crates) PUT /crates/new
- yank: 允许撤销和取消撤销用户创建的现有版本, 对应 endpoint: DELETE or PUT /crates/:crate_id/:version/unyank
- change-owners: 允许邀请新的所有者或删除现有的所有者, 对应 endpoint: DELETE or PUT /crates/:crate_id/owners
- legacy: 允许访问 crates.io 上的所有endpoint,除了创建新token,例如在实施此 RFC 之前创建的token。 , 对应 endpoint: 除了 PUT /me/tokens
之外的一切
https://blog.rust-lang.org/inside-rust/2023/05/09/api-token-scopes.html
BY Rust 视界

Share with your friend now:
tg-me.com/rust_daily_news/5874