Module

Hyper.Node.BasicAuth

Package
purescript-hyper
Repository
owickstrom/hyper

#Realm Source

type Realm = String

#decodeBase64 Source

decodeBase64 :: forall c m. MonadEffect m => String -> Middleware m c c String

#withAuthentication Source

withAuthentication :: forall t c res req m. MonadEffect m => Request req m => (Tuple String String -> m (Maybe t)) -> Middleware m (Conn req res { authentication :: Unit | c }) (Conn req res { authentication :: Maybe t | c }) Unit

#authenticated Source

authenticated :: forall t b c res req m. Monad m => ResponseWritable b m String => Response res m b => Realm -> Middleware m (Conn req (res StatusLineOpen) { authentication :: t | c }) (Conn req (res ResponseEnded) { authentication :: t | c }) Unit -> Middleware m (Conn req (res StatusLineOpen) { authentication :: Maybe t | c }) (Conn req (res ResponseEnded) { authentication :: Maybe t | c }) Unit