happstack-authenticate 2.6.0 → 2.6.1
raw patch · 4 files changed
+26/−12 lines, 4 filesdep ~aesondep ~jwtdep ~lensPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aeson, jwt, lens, stm, text, time
API changes (from Hackage documentation)
Files
- Happstack/Authenticate/Core.hs +4/−1
- Happstack/Authenticate/OpenId/Core.hs +4/−2
- Happstack/Authenticate/Password/Core.hs +10/−1
- happstack-authenticate.cabal +8/−8
Happstack/Authenticate/Core.hs view
@@ -168,6 +168,7 @@ import Text.Boomerang.TH (makeBoomerangs) import Text.Shakespeare.I18N (RenderMessage(renderMessage), mkMessageFor) import Web.JWT (Algorithm(HS256), JWT, VerifiedJWT, JWTClaimsSet(..), encodeSigned, claims, decode, decodeAndVerifySignature, secondsSinceEpoch, intDate, verify)+import qualified Web.JWT as JWT #if MIN_VERSION_jwt(0,8,0) import Web.JWT (ClaimsMap(..), hmacSecret) #else@@ -734,7 +735,9 @@ Nothing -> return Nothing (Just ssecret) -> -- finally we can verify all the claims-#if MIN_VERSION_jwt(0,8,0)+#if MIN_VERSION_jwt(0,11,0)+ case verify (JWT.toVerify $ hmacSecret (_unSharedSecret ssecret)) unverified of+#elif MIN_VERSION_jwt(0,8,0) case verify (hmacSecret (_unSharedSecret ssecret)) unverified of #else case verify (secret (_unSharedSecret ssecret)) unverified of
Happstack/Authenticate/OpenId/Core.hs view
@@ -82,12 +82,14 @@ , _openIdRealm :: Maybe Text } deriving (Eq, Ord, Read, Show, Data, Typeable, Generic)-deriveSafeCopy 2 'extension ''OpenIdState-makeLenses ''OpenIdState instance Migrate OpenIdState where type MigrateFrom OpenIdState = OpenIdState_1 migrate (OpenIdState_1 ids) = OpenIdState ids Nothing++deriveSafeCopy 2 'extension ''OpenIdState+makeLenses ''OpenIdState+ initialOpenIdState :: OpenIdState initialOpenIdState = OpenIdState
Happstack/Authenticate/Password/Core.hs view
@@ -13,6 +13,9 @@ import qualified Data.Aeson as Aeson import Data.Aeson (Value(..), Object(..), Result(..), decode, encode, fromJSON) import Data.Aeson.Types (ToJSON(..), FromJSON(..), Options(fieldLabelModifier), defaultOptions, genericToJSON, genericParseJSON)+#if MIN_VERSION_aeson(2,0,0)+import qualified Data.Aeson.KeyMap as KM+#endif import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as B import Data.Data (Data, Typeable)@@ -220,7 +223,11 @@ if not valid then unauthorized $ toJSONError InvalidUsernamePassword else do token <- addTokenCookie authenticateState authenticateConfig u+#if MIN_VERSION_aeson(2,0,0)+ resp 201 $ toJSONSuccess (Object $ KM.fromList [("token", toJSON token)]) -- toResponseBS "application/json" $ encode $ Object $ HashMap.fromList [("token", toJSON token)]+#else resp 201 $ toJSONSuccess (Object $ HashMap.fromList [("token", toJSON token)]) -- toResponseBS "application/json" $ encode $ Object $ HashMap.fromList [("token", toJSON token)]+#endif ------------------------------------------------------------------------------ -- account@@ -510,7 +517,9 @@ case mssecret of Nothing -> return Nothing (Just ssecret) ->-#if MIN_VERSION_jwt(0,8,0)+#if MIN_VERSION_jwt(0,11,0)+ case verify (JWT.toVerify $ hmacSecret (_unSharedSecret ssecret)) unverified of+#elif MIN_VERSION_jwt(0,8,0) case verify (hmacSecret (_unSharedSecret ssecret)) unverified of #else case verify (secret (_unSharedSecret ssecret)) unverified of
happstack-authenticate.cabal view
@@ -1,5 +1,5 @@ Name: happstack-authenticate-Version: 2.6.0+Version: 2.6.1 Synopsis: Happstack Authentication Library Description: A themeable authentication library with support for username+password and OpenId. Homepage: http://www.happstack.com/@@ -11,7 +11,7 @@ Category: Web Build-type: Simple Cabal-version: >=1.10-tested-with: GHC==8.0.1, GHC==8.2.2, GHC==8.4.1, GHC==8.6.5, GHC==8.8.3, GHC==8.10.7+tested-with: GHC==8.0.2, GHC==8.2.2, GHC==8.4.4, GHC==8.6.5, GHC==8.8.4, GHC==8.10.7, GHC==9.0.2, GHC==9.2.2 data-files: messages/core/en.msg messages/openid/error/en.msg@@ -44,7 +44,7 @@ Build-depends: base > 4 && < 5, acid-state >= 0.6 && < 0.17,- aeson (>= 0.4 && < 0.10) || (>= 0.11 && < 1.6),+ aeson (>= 0.4 && < 0.10) || (>= 0.11 && < 1.6) || (>= 2.0 && < 2.1), authenticate == 1.3.*, base64-bytestring >= 1.0 && < 1.3, boomerang >= 1.4 && < 1.5,@@ -55,7 +55,7 @@ filepath >= 1.3 && < 1.5, hsx2hs >= 0.13 && < 0.15, jmacro >= 0.6.11 && < 0.7,- jwt >= 0.3 && < 0.11,+ jwt >= 0.3 && < 0.12, ixset-typed >= 0.3 && < 0.6, happstack-jmacro >= 7.0 && < 7.1, happstack-server >= 6.0 && < 7.8,@@ -67,11 +67,11 @@ safecopy >= 0.8 && < 0.11, mime-mail >= 0.4 && < 0.6, mtl >= 2.0 && < 2.3,- lens >= 4.2 && < 4.20,+ lens >= 4.2 && < 5.2, pwstore-purehaskell == 2.1.*,- stm >= 2.5 && < 2.6,- text >= 0.11 && < 1.3,- time >= 1.2 && < 1.12,+ stm >= 2.4 && < 2.6,+ text >= 0.11 && < 2.1,+ time >= 1.2 && < 1.14, userid >= 0.1 && < 0.2, random >= 1.0 && < 1.3, shakespeare >= 2.0 && < 2.1,