Reduce expiration
This commit is contained in:
1 parent
c13f01a012
commit
a46fcfa3b1
1 file changed
+1
-1
+1
-1
@@ -73,7 +73,7 @@ authenticate c = do
|
||||
r <- liftIO $ post metrics SafeTransient "https://app.wallabag.it/oauth/v2/token" form
|
||||
now <- liftIO getCurrentTime
|
||||
let expiresIn = r ^? responseBody . key "expires_in" . _Integer . to fromIntegral . to secondsToNominalDiffTime
|
||||
expireTime = fmap (`addUTCTime` now) expiresIn
|
||||
expireTime = fmap (\x -> (x - 5) `addUTCTime` now) expiresIn
|
||||
pure $ Auth <$> r ^? responseBody . key "access_token" . _String <*> expireTime
|
||||
|
||||
data WallabagException7g = MissingTokenException deriving (Show)
|
||||
|
||||
Reference in new issue
Block a user