mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 07:04:32 +00:00
Gateway: add SecretRef support for gateway.auth.token with auth-mode guardrails (#35094)
This commit is contained in:
@@ -45,13 +45,11 @@ async function launchctlGetenv(name: string): Promise<string | undefined> {
|
||||
}
|
||||
|
||||
function hasConfigGatewayCreds(cfg: OpenClawConfig): boolean {
|
||||
const localToken =
|
||||
typeof cfg.gateway?.auth?.token === "string" ? cfg.gateway.auth.token : undefined;
|
||||
const localPassword = cfg.gateway?.auth?.password;
|
||||
const remoteToken = cfg.gateway?.remote?.token;
|
||||
const remotePassword = cfg.gateway?.remote?.password;
|
||||
return Boolean(
|
||||
hasConfiguredSecretInput(localToken) ||
|
||||
hasConfiguredSecretInput(cfg.gateway?.auth?.token, cfg.secrets?.defaults) ||
|
||||
hasConfiguredSecretInput(localPassword, cfg.secrets?.defaults) ||
|
||||
hasConfiguredSecretInput(remoteToken, cfg.secrets?.defaults) ||
|
||||
hasConfiguredSecretInput(remotePassword, cfg.secrets?.defaults),
|
||||
|
||||
Reference in New Issue
Block a user