claude-connector: an old document is refused at load, the installer authors it again
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
af087128e6
commit
b0ac65edde
3 changed files with 7 additions and 8 deletions
|
|
@ -11,10 +11,9 @@ pub(crate) const PROVIDER: &str = "claude-code";
|
|||
/// connector; the credential itself is the systemd credential
|
||||
/// [`ClaudeCodeConfig::token_credential`] names, and it reaches the child on a
|
||||
/// pipe whichever this is.
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub enum ClaudeAuth {
|
||||
/// The subscription's OAuth token. The plan's usage is metered.
|
||||
#[default]
|
||||
OAuthToken,
|
||||
/// An Anthropic API key. Nothing is metered: a key has no subscription plan.
|
||||
ApiKey,
|
||||
|
|
|
|||
|
|
@ -108,8 +108,9 @@ pub struct ClaudeConnectorConfig {
|
|||
#[cultcache(key = 22)]
|
||||
pub handle_secret_credential: String,
|
||||
/// Which credential `token_credential` holds: the subscription token, or an
|
||||
/// Anthropic API key. A document without this field is the token.
|
||||
#[cultcache(key = 23, default)]
|
||||
/// Anthropic API key. A document written before this field existed is refused at
|
||||
/// load (the canonical-form check): the installer authors the document again.
|
||||
#[cultcache(key = 23)]
|
||||
pub auth: ClaudeAuth,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue