wai-middleware-hmac-client-0.1.0.2: WAI HMAC Authentication Middleware Client

Copyright(c) 2015 Christopher Reichert
LicenseBSD3
MaintainerChristopher Reichert <creichert07@gmail.com>
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Network.Wai.Middleware.HmacAuth.Client

Contents

Description

Compatible with HTTP Client

Synopsis

Sign a Request with HMAC

applyHmacAuth :: forall m alg. (MonadIO m, HashAlgorithm alg) => HmacAuthSettings alg -> Key -> Secret -> Request -> m Request Source

Add an Hmac auth header, signed with the specified secret, to the given Request. Ignore error handling:

applyHmacAuth defaultHmacSettings "secret" $ fromJust $ parseUrl url

Since 0.1.0

Settings

defaultHmacAuthSettings :: HmacAuthSettings SHA512 Source

default HMAC client settings

data HmacAuthSettings alg Source

Various control settings for HMAC authentication

Constructors

HmacAuthSettings 

Fields

authKeyHeader :: !(CI ByteString)
 
authTimestampHeader :: !(CI ByteString)
 
authAlgorithm :: alg

HMAC signing algorithm

MD5, SHA1, SHA256, and SHA512 supported

authRealm :: !ByteString

Realm provider.

e.g. Authorization: API key:signature

authSpec :: !Strategy

Use Header or QueryParam spec.

Currently, only the Header Strategy is supported