packages feed

hoauth2 0.4.3 → 0.4.4

raw patch · 2 files changed

+9/−5 lines, 2 filesdep ~bytestringdep ~monad-controlPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: bytestring, monad-control

API changes (from Hackage documentation)

+ Network.OAuth.OAuth2.Internal: expiresIn :: AccessToken -> Maybe Int
+ Network.OAuth.OAuth2.Internal: tokenType :: AccessToken -> Maybe ByteString
- Network.OAuth.OAuth2.Internal: AccessToken :: ByteString -> Maybe ByteString -> AccessToken
+ Network.OAuth.OAuth2.Internal: AccessToken :: ByteString -> Maybe ByteString -> Maybe Int -> Maybe ByteString -> AccessToken

Files

hoauth2.cabal view
@@ -1,6 +1,6 @@ Name:                hoauth2 -- (http://www.haskell.org/haskellwiki/Package_versioning_policy)-Version:             0.4.3+Version:             0.4.4  Synopsis:            hoauth2 Description:@@ -60,11 +60,11 @@     aeson             >= 0.7    && < 0.9,     base              >= 4      && < 5,     text              >= 0.11   && < 1.3,-    bytestring        >= 0.9    && < 0.11,+    bytestring        >= 0.10.4 && < 0.10.5,     bytestring-show   >= 0.3.5  && < 0.4,     http-conduit      >= 2.0    && < 2.2,     http-types        >= 0.8    && < 0.9,-    monad-control     >= 0.3    && < 0.4,+    monad-control     >= 1      && < 1.1,     mtl               >= 1      && < 2.3,     transformers      >= 0.2    && < 0.5,     random
src/Network/OAuth/OAuth2/Internal.hs view
@@ -38,14 +38,18 @@ data AccessToken = AccessToken {       accessToken  :: BS.ByteString     , refreshToken :: Maybe BS.ByteString+    , expiresIn    :: Maybe Int+    , tokenType    :: Maybe BS.ByteString     } deriving (Show)  -- | Parse JSON data into {AccessToken} -- instance FromJSON AccessToken where-    parseJSON (Object o) = AccessToken <$> at <*> rt where+    parseJSON (Object o) = AccessToken <$> at <*> rt <*> ei <*> tt where         at = fmap encodeUtf8 $ o .: "access_token"         rt = fmap (fmap encodeUtf8) $ o .:? "refresh_token"+        ei = o .:? "expires_in"+        tt = fmap (fmap encodeUtf8) $ o .:? "token_type"     parseJSON _ = mzero  --------------------------------------------------@@ -138,7 +142,7 @@ --accessTokenToParam :: BS.ByteString -> QueryParams --accessTokenToParam token = [("access_token", token)] accessTokenToParam :: AccessToken -> QueryParams-accessTokenToParam (AccessToken token _) = [("access_token", token)]+accessTokenToParam (AccessToken token _ _ _) = [("access_token", token)]   -- | lift value in the Maybe and abonda Nothing