refactor(gateway): remove unused device auth normalizer · openclaw/openclaw@2509005
vincentkoc
·
2026-06-23
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,21 +7,6 @@ function normalizeTrimmedMetadata(value?: string | null): string {
|
7 | 7 | return trimmed ? trimmed : ""; |
8 | 8 | } |
9 | 9 | |
10 | | -function toLowerAscii(input: string): string { |
11 | | -return input.replace(/[A-Z]/g, (char) => String.fromCharCode(char.charCodeAt(0) + 32)); |
12 | | -} |
13 | | - |
14 | | -/** Normalize device metadata for cross-runtime auth comparisons. */ |
15 | | -export function normalizeDeviceMetadataForAuth(value?: string | null): string { |
16 | | -const trimmed = normalizeTrimmedMetadata(value); |
17 | | -if (!trimmed) { |
18 | | -return ""; |
19 | | -} |
20 | | -// Keep cross-runtime normalization deterministic (TS/Swift/Kotlin) by only |
21 | | -// lowercasing ASCII metadata fields used in auth payloads. |
22 | | -return toLowerAscii(trimmed); |
23 | | -} |
24 | | - |
25 | 10 | /** Normalize device metadata for policy classification. */ |
26 | 11 | export function normalizeDeviceMetadataForPolicy(value?: string | null): string { |
27 | 12 | const trimmed = normalizeTrimmedMetadata(value); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。