hsoz-0.0.1.0: Iron, Hawk, Oz: Web auth protocols

Safe HaskellNone
LanguageHaskell2010

Network.Hawk.Middleware

Description

Middlewares which can be used to add Hawk authentication to a Network.Wai Application.

The authentication result is stored in a Vault.

Note that ifRequest can be used to conditionally apply these middlewares.

Synopsis

Documentation

hawkAuth :: AuthReqOpts -> VerifyPayload -> CredentialsFunc IO t -> Middleware Source #

Authenticates requests with Hawk according to the provided options and credentials.

bewitAuth :: AuthReqOpts -> CredentialsFunc IO t -> Middleware Source #

Authenticates GET requests with the Hawk bewit scheme, according to the provided options and credentials.

data VerifyPayload Source #

Whether the middleware should verify the payload hash by reading the entire request body. authenticatePayload can be used to verify the payload at a later stage.

Constructors

DontVerifyPayload

Ignore payload hash.

VerifyPayload

Read request body and check payload hash.