fix(macos): support password auth mode for gateway connections
GatewayChannel now sends both 'token' and 'password' fields in the auth
payload to support both authentication modes. Gateway checks the field
matching its auth.mode configuration ('token' or 'password').
Also adds config file password fallback for remote mode, allowing
gateway password to be configured in ~/.clawdis/clawdis.json without
requiring environment variables.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -213,7 +213,13 @@ actor GatewayChannelActor {
|
||||
"userAgent": ProtoAnyCodable(ProcessInfo.processInfo.operatingSystemVersionString),
|
||||
]
|
||||
if let token = self.token {
|
||||
params["auth"] = ProtoAnyCodable(["token": ProtoAnyCodable(token)])
|
||||
// Send both 'token' and 'password' to support both auth modes.
|
||||
// Gateway checks the field matching its auth.mode configuration.
|
||||
let authDict: [String: ProtoAnyCodable] = [
|
||||
"token": ProtoAnyCodable(token),
|
||||
"password": ProtoAnyCodable(token),
|
||||
]
|
||||
params["auth"] = ProtoAnyCodable(authDict)
|
||||
}
|
||||
|
||||
let frame = RequestFrame(
|
||||
|
||||
Reference in New Issue
Block a user