Safe Haskell | Trustworthy |
---|
Provides HTTP Basic Authentication.
- basicAuth :: Monad m => String -> (ByteString -> ByteString -> m Bool) -> SimpleMiddleware m
Documentation
:: Monad m | |
=> String | Realm |
-> (ByteString -> ByteString -> m Bool) | |
-> SimpleMiddleware m |
A Route
that uses HTTP basic authentication to authenticate a
request for a realm with the given username ans password. The
request is rewritten with an 'X-User' header containing the
authenticated username before being passed to the next Route
.