| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Servant.Auth.Hmac.Server
Description
Servant server authentication.
Synopsis
- type HmacAuth = AuthProtect "hmac-auth"
- type HmacAuthContextHandlers = '[HmacAuthHandler]
- type HmacAuthContext = Context HmacAuthContextHandlers
- type HmacAuthHandler = AuthHandler Request ()
- hmacAuthServerContext :: (SecretKey -> ByteString -> Signature) -> SecretKey -> HmacAuthContext
- hmacAuthHandler :: (SecretKey -> ByteString -> Signature) -> SecretKey -> HmacAuthHandler
- hmacAuthHandlerMap :: (Request -> Handler Request) -> (SecretKey -> ByteString -> Signature) -> SecretKey -> HmacAuthHandler
Documentation
type HmacAuth = AuthProtect "hmac-auth" Source #
type HmacAuthContextHandlers = '[HmacAuthHandler] Source #
type HmacAuthHandler = AuthHandler Request () Source #
hmacAuthServerContext Source #
Arguments
| :: (SecretKey -> ByteString -> Signature) | Signing function |
| -> SecretKey | Secret key that was used for signing |
| -> HmacAuthContext |
Arguments
| :: (SecretKey -> ByteString -> Signature) | Signing function |
| -> SecretKey | Secret key that was used for signing |
| -> HmacAuthHandler |
Create HmacAuthHandler from signing function and secret key.
Arguments
| :: (Request -> Handler Request) | Request mapper |
| -> (SecretKey -> ByteString -> Signature) | Signing function |
| -> SecretKey | Secret key that was used for signing |
| -> HmacAuthHandler |
Like hmacAuthHandler but allows to specify additional mapping function
for Request. This can be useful if you want to print incoming request (for
logging purposes) or filter some headers (to match signature). Given function is
applied before signature verification.