| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Servant.Auth.Hmac.Client
Description
Servant client authentication.
Synopsis
- data HmacSettings = HmacSettings {
- hmacSigner :: SecretKey -> ByteString -> Signature
 - hmacSecretKey :: SecretKey
 - hmacRequestHook :: Maybe (Request -> ClientM ())
 
 - defaultHmacSettings :: SecretKey -> HmacSettings
 - newtype HmacClientM a = HmacClientM {}
 - runHmacClient :: HmacSettings -> ClientEnv -> HmacClientM a -> IO (Either ClientError a)
 - hmacClient :: forall api. HasClient HmacClientM api => Client HmacClientM api
 
HMAC client settings
data HmacSettings Source #
Environment for HmacClientM. Contains all required settings for hmac client.
Constructors
| HmacSettings | |
Fields 
  | |
Instances
| MonadReader HmacSettings HmacClientM Source # | |
Defined in Servant.Auth.Hmac.Client Methods ask :: HmacClientM HmacSettings # local :: (HmacSettings -> HmacSettings) -> HmacClientM a -> HmacClientM a # reader :: (HmacSettings -> a) -> HmacClientM a #  | |
defaultHmacSettings :: SecretKey -> HmacSettings Source #
Default HmacSettings with the following configuration:
- Signing function is 
signSHA256. - Secret key is provided.
 hmacRequestHookisNothing.
HMAC servant client
newtype HmacClientM a Source #
newtype wrapper over ClientM that signs all outgoing requests
automatically.
Constructors
| HmacClientM | |
Fields  | |
Instances
runHmacClient :: HmacSettings -> ClientEnv -> HmacClientM a -> IO (Either ClientError a) Source #
hmacClient :: forall api. HasClient HmacClientM api => Client HmacClientM api Source #
Generates a set of client functions for an API.