Skip to content

Commit 025f9ec

Browse files
Copilotlpcox
andcommitted
Complete refactoring: All phases verified and passing
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent b53d8ab commit 025f9ec

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

internal/auth/header.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
//
1111
// Usage Guidelines:
1212
//
13-
// - Use ParseAuthHeader() for complete authentication with error handling:
14-
// Returns both API key and agent ID, with errors for missing/invalid headers.
13+
// - Use ParseAuthHeader() for complete authentication with error handling:
14+
// Returns both API key and agent ID, with errors for missing/invalid headers.
1515
//
16-
// - Use ExtractAgentID() when you only need the agent ID and want automatic
17-
// fallback to "default" instead of error handling.
16+
// - Use ExtractAgentID() when you only need the agent ID and want automatic
17+
// fallback to "default" instead of error handling.
1818
//
19-
// - Use ValidateAPIKey() to check if a provided key matches the expected value.
20-
// Automatically handles the case where authentication is disabled (no expected key).
19+
// - Use ValidateAPIKey() to check if a provided key matches the expected value.
20+
// Automatically handles the case where authentication is disabled (no expected key).
2121
//
2222
// Example:
2323
//

internal/logger/sanitize/sanitize.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
//
33
// This package offers two complementary approaches to secret sanitization:
44
//
5-
// 1. Pattern-based detection: SanitizeString() and SanitizeJSON() use regex patterns
6-
// to identify and redact secrets like API keys, tokens, and passwords.
5+
// 1. Pattern-based detection: SanitizeString() and SanitizeJSON() use regex patterns
6+
// to identify and redact secrets like API keys, tokens, and passwords.
77
//
8-
// 2. Prefix truncation: TruncateSecret() and TruncateSecretMap() show only the first
9-
// 4 characters of values, making them safe for logging without exposing full secrets.
8+
// 2. Prefix truncation: TruncateSecret() and TruncateSecretMap() show only the first
9+
// 4 characters of values, making them safe for logging without exposing full secrets.
1010
//
1111
// Usage Guidelines:
1212
//
13-
// - Use TruncateSecret()/TruncateSecretMap() for auth headers and environment variables
14-
// where you want to preserve a hint of the value for debugging.
13+
// - Use TruncateSecret()/TruncateSecretMap() for auth headers and environment variables
14+
// where you want to preserve a hint of the value for debugging.
1515
//
16-
// - Use SanitizeString()/SanitizeJSON() for full payload sanitization where secrets
17-
// may appear in various formats throughout the data.
16+
// - Use SanitizeString()/SanitizeJSON() for full payload sanitization where secrets
17+
// may appear in various formats throughout the data.
1818
//
1919
// Example:
2020
//

0 commit comments

Comments
 (0)