packages feed

wai-saml2 0.2.1.1 → 0.2.1.2

raw patch · 2 files changed

+2/−110 lines, 2 filesdep −tastydep −tasty-hedgehogdep −tasty-hunitPVP ok

version bump matches the API change (PVP)

Dependencies removed: tasty, tasty-hedgehog, tasty-hunit, wai-saml2, warp

API changes (from Hackage documentation)

Files

− test/Spec.hs
@@ -1,75 +0,0 @@------------------------------------------------------------------------------------ SAML2 Middleware for WAI                                                   -------------------------------------------------------------------------------------- This source code is licensed under the MIT license found in the LICENSE    ----- file in the root directory of this source tree.                            -------------------------------------------------------------------------------------module Main ( main ) where ------------------------------------------------------------------------------------import Control.Concurrent-import Control.Monad.IO.Class--import qualified Data.ByteString as BS-import qualified Data.ByteString.Lazy as LBS-import qualified Data.Vault.Lazy as V-import Data.X509-import Data.X509.File--import Network.HTTP.Types.Status-import Network.Wai-import Network.Wai.Test-import Network.Wai.Handler.Warp-import Network.Wai.SAML2-------------------------------------------------------------------------------------- | 'tests' implements the tests.-tests :: Session ()-tests = do-    samlResponse <- liftIO $ BS.readFile "test-data/sample-response"--    let req = (setPath defaultRequest "/sso/assert"){-        requestMethod = "POST",-        requestHeaders = [("Content-Type","application/x-www-form-urlencoded")]-    }--    res <- srequest $ SRequest req (LBS.fromStrict samlResponse)---    samlResponseWithRs <- liftIO $ BS.readFile "test-data/sample-response-with-rs"--    res <- srequest $ SRequest req (LBS.fromStrict samlResponseWithRs)--    assertStatus 200 res ---- | 'main' is the main entry point for the test suite.-main :: IO ()-main = do-    -- load private and public keys for the SP and IdP respectively-    [privKey] <- liftIO $ readKeyFile "test-data/sp.pem"-    [pubKey] <- liftIO $ readSignedObject "test-data/idp.pem"--    let (PrivKeyRSA privateKey) = privKey-    let (PubKeyRSA publicKey) = certPubKey $ signedObject $ getSigned pubKey--    -- construct a configuration for the SAML2 middleware; we disable-    -- time validation since it would require us to issue new responses-    -- every time we run the tests-    let config = (saml2Config privateKey publicKey){ -        saml2DisableTimeValidation = True -    }--    -- run the middleware with a basic application on top and execute the-    -- tests against it-    runSession tests $ saml2Vault config $ \req respond -> do -        print $ V.lookup relayStateKey (vault req)-        respond $ case V.lookup errorKey (vault req) of -                Just err -> do -                    responseLBS status400 [] "Invalid request"-                Nothing -> -                    responseLBS status200 [] "Hello World"----------------------------------------------------------------------------------
wai-saml2.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: f63d7b16c92954665cf67b0990eb0619c871dcf428ad23f9674aa34050d6ad9d+-- hash: 4a1b318c169b45fea75edde89d81f7e0c7112e165e3e3cc5d65269c91210892f  name:           wai-saml2-version:        0.2.1.1+version:        0.2.1.2 synopsis:       SAML2 assertion validation as WAI middleware description:    A Haskell library which implements SAML2 assertion validation as WAI middleware category:       Security@@ -61,39 +61,6 @@     , vault >=0.3 && <1     , wai >=3.0 && <4     , wai-extra >=3.0 && <4-    , x509 <2-    , x509-store <2-    , xml-conduit <2-  default-language: Haskell2010--test-suite wai-saml2-tests-  type: exitcode-stdio-1.0-  main-is: Spec.hs-  other-modules:-      Paths_wai_saml2-  hs-source-dirs:-      test-  default-extensions: OverloadedStrings MultiWayIf RecordWildCards FlexibleInstances-  ghc-options: -threaded -rtsopts -with-rtsopts=-N-  build-depends:-      base >=4.8 && <5-    , base64-bytestring >=0.1 && <2-    , bytestring >=0.9 && <0.11-    , c14n >=0.1.0.1 && <1-    , cryptonite <1-    , data-default-class <1-    , http-types <1-    , mtl >=2.2.1 && <3-    , tasty-    , tasty-hedgehog-    , tasty-hunit-    , text <2-    , time >=1.9 && <2-    , vault >=0.3 && <1-    , wai >=3.0 && <4-    , wai-extra >=3.0 && <4-    , wai-saml2-    , warp     , x509 <2     , x509-store <2     , xml-conduit <2