@@ -35,7 +35,6 @@ module Network.Google.Auth
35 -- ** Thread-safe Storage
35 -- ** Thread-safe Storage
37 , initStore
37 , initStore
39 , retrieveAuthFromStore
38 , retrieveAuthFromStore
41 , Auth (..)
40 , Auth (..)
@@ -128,27 +127,6 @@ initStore :: (MonadIO m, MonadCatch m, AllowScopes s)
128 -> m (Store s)
127 -> m (Store s)
129initStore c l m = exchange c l m >>= fmap Store . liftIO . newMVar
128initStore c l m = exchange c l m >>= fmap Store . liftIO . newMVar
131−-- | Refresh an 'OAuthToken' if it was expired.
132−-- Otherwise, keep original one.
133−refreshStore :: (MonadIO m, MonadCatch m, AllowScopes s)
138−refreshStore ss@(Store s) l m = do
139− x <- retrieveAuthFromStore ss
143− else liftIO . modifyMVar s $ \y -> do
149− tt <- fmap Store . liftIO . newMVar $ z
152-- | Retrieve auth from storage
130-- | Retrieve auth from storage
153retrieveAuthFromStore :: (MonadIO m, MonadCatch m, AllowScopes s)
131retrieveAuthFromStore :: (MonadIO m, MonadCatch m, AllowScopes s)
154 => Store s
132 => Store s