summaryrefslogtreecommitdiffstats
path: root/internal/auth/README.md
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-02-14 09:58:28 -0800
committerbndw <ben@bdw.to>2026-02-14 09:58:28 -0800
commitd30459513ec44ab298fafd1bfe0edc08d6ab62e4 (patch)
tree1e4442f940c11544cd60b6bf72f2038338da67ce /internal/auth/README.md
parentfe3708eaf495613cc6e2340b821795f25811d6ed (diff)
feat: rename allowed_pubkeys to allowed_npubs with normalization
- Config now accepts npub format only (human-readable) - Automatically converts npubs to hex pubkeys at load time - Updated InterceptorOptions.AllowedPubkeys -> AllowedNpubs - Added validation to reject hex format in config (npub only) - Updated documentation to clarify npub-only config - Added comprehensive tests for npub normalization Config is for humans (npub), internal code uses hex pubkeys.
Diffstat (limited to 'internal/auth/README.md')
-rw-r--r--internal/auth/README.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/auth/README.md b/internal/auth/README.md
index c41b6cb..df0de6a 100644
--- a/internal/auth/README.md
+++ b/internal/auth/README.md
@@ -209,7 +209,9 @@ authOpts := &auth.InterceptorOptions{
209- **`TimestampWindow`**: Maximum age of events in seconds (default: 60) 209- **`TimestampWindow`**: Maximum age of events in seconds (default: 60)
210- **`Required`**: Whether to reject unauthenticated requests (default: false) 210- **`Required`**: Whether to reject unauthenticated requests (default: false)
211- **`ValidatePayload`**: Whether to verify payload hash when present (default: false) 211- **`ValidatePayload`**: Whether to verify payload hash when present (default: false)
212- **`AllowedPubkeys`**: Optional whitelist of allowed pubkeys (nil = allow all) 212- **`AllowedNpubs`**: Optional whitelist of allowed pubkeys (nil = allow all)
213 - Config accepts npub format only (human-readable bech32)
214 - Automatically normalized to hex format (computer-readable) at config load time
213 215
214### NostrCredentials Options 216### NostrCredentials Options
215 217