Auth Credential Semantics(驗證憑證語義)
本文定義在以下範圍使用的正式憑證資格與解析語義:resolveAuthProfileOrderresolveApiKeyForProfilemodels status --probedoctor-auth
穩定原因代碼
okmissing_credentialinvalid_expiresexpiredunresolved_ref
Token 憑證
Token 憑證(type: "token")支援內嵌的 token 和/或 tokenRef。
資格規則
- 當
token和tokenRef都缺失時,token profile 不符合資格。 expires是選用的。- 若
expires存在,它必須是大於0的有限數字。 - 若
expires無效(NaN、0、負數、非有限數,或類型錯誤),profile 不符合資格,原因為invalid_expires。 - 若
expires已過期,profile 不符合資格,原因為expired。 tokenRef不會繞過expires驗證。
解析規則
- 解析器語義與
expires的資格語義一致。 - 對於符合資格的 profile,token 材料可從內嵌值或
tokenRef解析。 - 無法解析的 ref 在
models status --probe輸出中產生unresolved_ref。
舊版相容訊息
為了腳本相容性,探測錯誤的第一行保持不變:Auth profile credentials are missing or expired.
人類友善的詳情和穩定原因代碼可在後續行中添加。