carlssonia/snap-core — comment on commit 99e2365935b3e92d27b0881bc94c164ff4dda584
File: src/Snap/Internal/Http/Types.hs line 451
By carlssonia:

Restricting the API to secure connections is a good idea!

Would you be OK with skipping the continuation-passing style and simply have something like

getBasicAuthentication :: MonadSnap m => m (Maybe (ByteString, ByteString))

where the function would return Nothing in case of insecure connection, or missing/invalid header? That would be much easier to use, I think.