Copyright | (c) 2015 Christopher Reichert |
---|---|
License | BSD3 |
Maintainer | Christopher Reichert <creichert07@gmail.com> |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Compatible with HTTP Client
- applyHmacAuth :: forall m alg. (MonadIO m, HashAlgorithm alg) => HmacAuthSettings alg -> Key -> Secret -> Request -> m Request
- defaultHmacAuthSettings :: HmacAuthSettings SHA512
- data HmacAuthSettings alg = HmacAuthSettings {
- authKeyHeader :: !(CI ByteString)
- authTimestampHeader :: !(CI ByteString)
- authAlgorithm :: alg
- authRealm :: !ByteString
- authSpec :: !Strategy
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
HmacAuthSettings | |
|