{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Servant.Client.Core.Auth (
AuthClientData,
AuthenticatedRequest (..),
mkAuthenticatedRequest,
) where
import Servant.Client.Core.Request
(Request)
type family AuthClientData a :: *
newtype AuthenticatedRequest a =
AuthenticatedRequest { AuthenticatedRequest a
-> (AuthClientData a, AuthClientData a -> Request -> Request)
unAuthReq :: (AuthClientData a, AuthClientData a -> Request -> Request) }
mkAuthenticatedRequest :: AuthClientData a
-> (AuthClientData a -> Request -> Request)
-> AuthenticatedRequest a
mkAuthenticatedRequest :: AuthClientData a
-> (AuthClientData a -> Request -> Request)
-> AuthenticatedRequest a
mkAuthenticatedRequest AuthClientData a
val AuthClientData a -> Request -> Request
func = (AuthClientData a, AuthClientData a -> Request -> Request)
-> AuthenticatedRequest a
forall a.
(AuthClientData a, AuthClientData a -> Request -> Request)
-> AuthenticatedRequest a
AuthenticatedRequest (AuthClientData a
val, AuthClientData a -> Request -> Request
func)