From e863f1b88c892a1c1657069dbb4927adc23d15ae Mon Sep 17 00:00:00 2001 From: aaron levin Date: Thu, 24 Dec 2015 18:01:40 +0100 Subject: [PATCH] Tests now pass for GADT-based authentication --- servant-server/test/Servant/ServerSpec.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/servant-server/test/Servant/ServerSpec.hs b/servant-server/test/Servant/ServerSpec.hs index a5d8deff..6740b294 100644 --- a/servant-server/test/Servant/ServerSpec.hs +++ b/servant-server/test/Servant/ServerSpec.hs @@ -642,8 +642,8 @@ miscReqCombinatorsSpec = with (return $ serve miscApi miscServ) $ -- | we include two endpoints /foo and /bar and we put the BasicAuth -- portion in two different places type AuthUser = ByteString -type BasicAuthFooRealm = AuthProtect (BasicAuth "foo-realm") AuthUser 'Strict -type BasicAuthBarRealm = AuthProtect (BasicAuth "bar-realm") AuthUser 'Strict +type BasicAuthFooRealm = AuthProtect (BasicAuth "foo-realm") AuthUser 'Strict () 'Strict () +type BasicAuthBarRealm = AuthProtect (BasicAuth "bar-realm") AuthUser 'Strict () 'Strict () type BasicAuthRequiredAPI = BasicAuthFooRealm :> "foo" :> Get '[JSON] Person :<|> "bar" :> BasicAuthBarRealm :> Get '[JSON] Animal @@ -709,7 +709,7 @@ basicAuthRequiredSpec = do (simpleHeaders bar401) `shouldContain` barHeader -type JWTAuthProtect = AuthProtect JWTAuth (JWT VerifiedJWT) 'Strict +type JWTAuthProtect = AuthProtect JWTAuth (JWT VerifiedJWT) 'Strict () 'Strict () type JWTAuthRequiredAPI = JWTAuthProtect :> "foo" :> Get '[JSON] Person