servant-hmac-auth-0.1.4: Servant authentication with HMAC
Safe HaskellSafe-Inferred
LanguageHaskell2010

Servant.Auth.Hmac.Server

Description

Servant server authentication.

Synopsis

Documentation

type HmacAuth = AuthProtect "hmac-auth" Source #

hmacAuthServerContext Source #

Arguments

:: (SecretKey -> ByteString -> Signature)

Signing function

-> SecretKey

Secret key that was used for signing Request

-> HmacAuthContext 

hmacAuthHandler Source #

Arguments

:: (SecretKey -> ByteString -> Signature)

Signing function

-> SecretKey

Secret key that was used for signing Request

-> HmacAuthHandler 

Create HmacAuthHandler from signing function and secret key.

hmacAuthHandlerMap Source #

Arguments

:: (Request -> Handler Request)

Request mapper

-> (SecretKey -> ByteString -> Signature)

Signing function

-> SecretKey

Secret key that was used for signing Request

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