认证凭据语义
认证凭据语义
Section titled “认证凭据语义”本文档定义了以下组件使用的规范凭据资格和解析语义:
resolveAuthProfileOrderresolveApiKeyForProfilemodels status --probedoctor-auth
目标是保持选择时和运行时的行为一致。
稳定的原因代码
Section titled “稳定的原因代码”okmissing_credentialinvalid_expiresexpiredunresolved_ref
令牌凭据(type: "token")支持内联 token 和/或 tokenRef。
- 当
token和tokenRef都不存在时,令牌配置不合格。 expires是可选的。- 如果存在
expires,它必须是大于0的有限数字。 - 如果
expires无效(NaN、0、负数、非有限或类型错误),配置以invalid_expires标记为不合格。 - 如果
expires已过期,配置以expired标记为不合格。 tokenRef不会绕过expires验证。
- 解析器对
expires的语义与资格语义一致。 - 对于合格的配置,令牌材料可以从内联值或
tokenRef解析。 - 无法解析的 ref 在
models status --probe输出中产生unresolved_ref。
旧版兼容消息
Section titled “旧版兼容消息”为了脚本兼容性,探测错误保持以下第一行不变:
Auth profile credentials are missing or expired.
人类可读的详细信息和稳定的原因代码可以添加在后续行中。