I’ve got a hackish Damus POC for Nostr HTTP Auth using NIP98. Basically for 401 Unauthorised and 402 Payment Required image requests with a WWW-Authenticate: NOSTR-NIP-98 header, we can optionally retry with a signed event base64 encoded in the Authorisation header.
This is exciting because we get to use the 401 header, have a nice way to retry requests with Nostr auth, and can optionally accept payment or perhaps offer a subscription to gain access.
For the UX, I’d like to have a UI to add a domain to a trusted Nostr HTTP Auth List, which allows ask, or always send auth (for domain).
If you’d like to help progress the swift code for Damus, let me know. I’d appreciate the help.. as it’s a little complex managing cache and retries using kingfisher with custom requests.
#[2] is this something you’re open to accepting into Damus? It should only matter for content that returns 401/2 and has the Nostr auth headers - otherwise it shouldn’t do anything. So it’s an extension in capability.