| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
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.
- hawkAuth :: AuthReqOpts -> VerifyPayload -> CredentialsFunc IO t -> Middleware
- bewitAuth :: AuthReqOpts -> CredentialsFunc IO t -> Middleware
- data VerifyPayload
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. |
Instances