packages feed

jose-jwt 0.6 → 0.6.1

raw patch · 3 files changed

+11/−7 lines, 3 filesdep ~timePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: time

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,8 @@+0.6.1+-----++* Minor internal changes to fix build on GHC 7.10.+ 0.6 --- 
Jose/Types.hs view
@@ -32,13 +32,11 @@ import Data.Int (Int64) import Data.Time.Clock (UTCTime) import Data.Time.Clock.POSIX-import Data.Time.Format import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Encoding as TE import Data.Vector (singleton) import GHC.Generics-import System.Locale (defaultTimeLocale)  import Jose.Jwa (JweAlg(..), JwsAlg (..), Enc(..)) @@ -84,10 +82,11 @@  instance FromJSON KeyId   where-    parseJSON = withText "KeyId" $ \t ->-        case parseTime defaultTimeLocale "%FT%T%QZ" (T.unpack t) of-            Just d -> pure (UTCKeyId d)-            _      -> pure (KeyId t)+    parseJSON = withText "KeyId" $ \t -> do+        let asTime = fromJSON (String t) :: Result UTCTime+        case asTime of+            Success d -> pure (UTCKeyId d)+            _         -> pure (KeyId t)  -- | Header content for a JWS. data JwsHeader = JwsHeader {
jose-jwt.cabal view
@@ -1,5 +1,5 @@ Name:               jose-jwt-Version:            0.6+Version:            0.6.1 Synopsis:           JSON Object Signing and Encryption Library Homepage:           http://github.com/tekul/jose-jwt Bug-Reports:        http://github.com/tekul/jose-jwt/issues