{-# LANGUAGE OverloadedStrings #-} -- | -- Module : Chat.Flowdock.REST.Auth -- License : BSD3 -- Maintainer : Oleg Grenrus module Chat.Flowdock.REST.Auth where import Data.ByteString.Char8 as BS8 import Network.HTTP.Client -- | Authentication token. -- -- See for your token. newtype AuthToken = AuthToken { getAuthToken :: String } deriving (Show) -- | Add authorisation information to the request authenticateRequest :: AuthToken -> Request -> Request authenticateRequest (AuthToken token) = applyBasicAuth username "DUMMY" where username = BS8.pack token