mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-06 08:04:37 +00:00
feat(api-token): store API tokens as SHA-256 hashes (#492)
New tokens are 32 random bytes with a shumai_ prefix and are returned only once at creation. The list endpoint returns a 4-character hint instead of the plaintext. A migration hashes existing tokens in place so they keep authenticating.
This commit is contained in:
@@ -388,6 +388,9 @@
|
||||
"failed_to_revoke_token": "Failed to revoke token",
|
||||
"copied_to_clipboard": "Copied to clipboard",
|
||||
"copied_api_token_to_clipboard": "Copied API token to clipboard",
|
||||
"api_token_created_title": "Save your API token",
|
||||
"api_token_created_description": "Copy this token now and store it somewhere safe. For your security, it won't be shown again.",
|
||||
"api_token_hidden_hint": "Tokens can only be viewed when they are created.",
|
||||
"copy_name_and_download_link": "Copy name and download link",
|
||||
"copied_name_and_download_link_to_clipboard": "Copied name and download link to clipboard",
|
||||
|
||||
|
||||
@@ -388,6 +388,9 @@
|
||||
"failed_to_revoke_token": "撤销令牌失败",
|
||||
"copied_to_clipboard": "已复制到剪贴板",
|
||||
"copied_api_token_to_clipboard": "已将 API 令牌复制到剪贴板",
|
||||
"api_token_created_title": "保存您的 API 令牌",
|
||||
"api_token_created_description": "请立即复制此令牌并妥善保存。出于安全考虑,它将不会再次显示。",
|
||||
"api_token_hidden_hint": "令牌仅在创建时可见。",
|
||||
"copy_name_and_download_link": "复制名称和下载链接",
|
||||
"copied_name_and_download_link_to_clipboard": "已复制名称和下载链接到剪贴板",
|
||||
|
||||
|
||||
Reference in New Issue
Block a user