module Web.Authenticate.OAuth.IO
(
module Web.Authenticate.OAuth,
getAccessToken,
getTemporaryCredential, getTemporaryCredentialWithScope,
getTemporaryCredentialProxy, getTemporaryCredential',
getTokenCredential,
getAccessTokenProxy, getTokenCredentialProxy,
getAccessToken'
) where
import Network.HTTP.Client
import qualified Web.Authenticate.OAuth as OA
import Web.Authenticate.OAuth hiding
(getAccessToken,
getTemporaryCredential, getTemporaryCredentialWithScope,
getTemporaryCredentialProxy, getTemporaryCredential',
getTokenCredential, getTemporaryCredentialWithScope,
getAccessTokenProxy, getTemporaryCredentialProxy,
getTokenCredentialProxy,
getAccessToken', getTemporaryCredential')
import Control.Monad.IO.Class
import qualified Data.ByteString.Char8 as BS
getTemporaryCredential :: MonadIO m
=> OA.OAuth
-> m OA.Credential
getTemporaryCredential = liftIO . withManager defaultManagerSettings . OA.getTemporaryCredential
getTemporaryCredentialWithScope :: MonadIO m
=> BS.ByteString
-> OAuth
-> m Credential
getTemporaryCredentialWithScope bs oa =
liftIO $ withManager defaultManagerSettings $ OA.getTemporaryCredentialWithScope bs oa
getTemporaryCredentialProxy :: MonadIO m
=> Maybe Proxy
-> OAuth
-> m Credential
getTemporaryCredentialProxy p oa = liftIO $ withManager defaultManagerSettings $ OA.getTemporaryCredential' (addMaybeProxy p) oa
getTemporaryCredential' :: MonadIO m
=> (Request -> Request)
-> OAuth
-> m Credential
getTemporaryCredential' hook oa = liftIO $ withManager defaultManagerSettings $ OA.getTemporaryCredential' hook oa
getAccessToken, getTokenCredential
:: MonadIO m
=> OAuth
-> Credential
-> m Credential
getAccessToken oa cr = liftIO $ withManager defaultManagerSettings $ OA.getAccessToken oa cr
getAccessTokenProxy, getTokenCredentialProxy
:: MonadIO m
=> Maybe Proxy
-> OAuth
-> Credential
-> m Credential
getAccessTokenProxy p oa cr = liftIO $ withManager defaultManagerSettings $ OA.getAccessTokenProxy p oa cr
getAccessToken' :: MonadIO m
=> (Request -> Request)
-> OAuth
-> Credential
-> m Credential
getAccessToken' hook oa cr = liftIO $ withManager defaultManagerSettings $ OA.getAccessToken' hook oa cr
getTokenCredential = getAccessToken
getTokenCredentialProxy = getAccessTokenProxy