lio-simple-0.0.0.3: LIO support for the Simple web framework

Safe HaskellTrustworthy

LIO.Web.Simple.Auth

Description

Provides HTTP Basic Authentication.

Synopsis

Documentation

basicAuthSource

Arguments

:: 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.