Solve extra merge conflicts
This commit is contained in:
parent
297f5743ec
commit
011f094c4a
5 changed files with 12 additions and 13 deletions
|
@ -125,10 +125,11 @@ instance (KnownSymbol capture, ToText a, HasClient sublayout)
|
||||||
instance (AuthenticateRequest authdata, HasClient sublayout) => HasClient (AuthProtect authdata (usr :: *) policy :> sublayout) where
|
instance (AuthenticateRequest authdata, HasClient sublayout) => HasClient (AuthProtect authdata (usr :: *) policy :> sublayout) where
|
||||||
type Client (AuthProtect authdata usr policy :> sublayout) = authdata -> Client sublayout
|
type Client (AuthProtect authdata usr policy :> sublayout) = authdata -> Client sublayout
|
||||||
|
|
||||||
clientWithRoute Proxy req baseurl val =
|
clientWithRoute Proxy req baseurl manager val =
|
||||||
clientWithRoute (Proxy :: Proxy sublayout)
|
clientWithRoute (Proxy :: Proxy sublayout)
|
||||||
(authReq val req)
|
(authReq val req)
|
||||||
baseurl
|
baseurl
|
||||||
|
manager
|
||||||
|
|
||||||
-- | If you have a 'Delete' endpoint in your API, the client
|
-- | If you have a 'Delete' endpoint in your API, the client
|
||||||
-- side querying function that is created when calling 'client'
|
-- side querying function that is created when calling 'client'
|
||||||
|
|
|
@ -161,7 +161,6 @@ withFailServer action = withWaiDaemon (return failServer) action
|
||||||
|
|
||||||
spec :: IO ()
|
spec :: IO ()
|
||||||
spec = withServer $ \ baseUrl -> do
|
spec = withServer $ \ baseUrl -> do
|
||||||
<<<<<<< HEAD
|
|
||||||
manager <- C.newManager C.defaultManagerSettings
|
manager <- C.newManager C.defaultManagerSettings
|
||||||
let getGet :: ExceptT ServantError IO Person
|
let getGet :: ExceptT ServantError IO Person
|
||||||
getDeleteEmpty :: ExceptT ServantError IO ()
|
getDeleteEmpty :: ExceptT ServantError IO ()
|
||||||
|
@ -269,7 +268,7 @@ spec = withServer $ \ baseUrl -> do
|
||||||
Right val -> getHeaders val `shouldBe` [("X-Example1", "1729"), ("X-Example2", "eg2")]
|
Right val -> getHeaders val `shouldBe` [("X-Example1", "1729"), ("X-Example2", "eg2")]
|
||||||
|
|
||||||
it "Handles Authentication appropriatley" $ withServer $ \ _ -> do
|
it "Handles Authentication appropriatley" $ withServer $ \ _ -> do
|
||||||
(Arrow.left show <$> runExceptT (getPrivatePerson (BasicAuth "servant" "server"))) `shouldReturn` Right alice
|
(Control.Arrow.left show <$> runExceptT (getPrivatePerson (BasicAuth "servant" "server"))) `shouldReturn` Right alice
|
||||||
|
|
||||||
it "returns 401 when not properly authenticated" $ do
|
it "returns 401 when not properly authenticated" $ do
|
||||||
Left res <- runExceptT (getPrivatePerson (BasicAuth "xxx" "yyy"))
|
Left res <- runExceptT (getPrivatePerson (BasicAuth "xxx" "yyy"))
|
||||||
|
|
|
@ -73,14 +73,14 @@ instance ToSample Greet where
|
||||||
instance ToSample Int where
|
instance ToSample Int where
|
||||||
toSamples _ = singleSample 1729
|
toSamples _ = singleSample 1729
|
||||||
|
|
||||||
instance ToSample User User where
|
instance ToSample User where
|
||||||
toSample _ = Just (User "I'm a user!")
|
toSamples _ = singleSample (User "I'm a user!")
|
||||||
|
|
||||||
instance ToSample Cookie Cookie where
|
instance ToSample Cookie where
|
||||||
toSample _ = Just (Cookie "cookie")
|
toSamples _ = singleSample (Cookie "cookie")
|
||||||
|
|
||||||
instance ToSample SecretData SecretData where
|
instance ToSample SecretData where
|
||||||
toSample _ = Just (SecretData "shhhhh!")
|
toSamples _ = singleSample (SecretData "shhhhh!")
|
||||||
|
|
||||||
instance ToAuthInfo (AuthProtect Cookie User policy) where
|
instance ToAuthInfo (AuthProtect Cookie User policy) where
|
||||||
toAuthInfo _ = AuthenticationInfo "In this sentence we outline how authentication works."
|
toAuthInfo _ = AuthenticationInfo "In this sentence we outline how authentication works."
|
||||||
|
|
|
@ -149,13 +149,12 @@ module Servant.Docs
|
||||||
, DocOptions(..) , defaultDocOptions, maxSamples
|
, DocOptions(..) , defaultDocOptions, maxSamples
|
||||||
|
|
||||||
, -- * Classes you need to implement for your types
|
, -- * Classes you need to implement for your types
|
||||||
<<<<<<< HEAD
|
|
||||||
ToSample(..)
|
ToSample(..)
|
||||||
, toSample
|
, toSample
|
||||||
, noSamples
|
, noSamples
|
||||||
, singleSample
|
, singleSample
|
||||||
, samples
|
, samples
|
||||||
ToAuthInfo(..)
|
, ToAuthInfo(..)
|
||||||
, sampleByteString
|
, sampleByteString
|
||||||
, sampleByteStrings
|
, sampleByteStrings
|
||||||
, ToParam(..)
|
, ToParam(..)
|
||||||
|
|
|
@ -754,8 +754,8 @@ instance
|
||||||
{-# OVERLAPPABLE #-}
|
{-# OVERLAPPABLE #-}
|
||||||
#endif
|
#endif
|
||||||
( HasDocs sublayout
|
( HasDocs sublayout
|
||||||
, ToSample auth auth
|
, ToSample auth
|
||||||
, ToSample usr usr
|
, ToSample usr
|
||||||
, ToAuthInfo (AuthProtect auth usr policy)
|
, ToAuthInfo (AuthProtect auth usr policy)
|
||||||
)
|
)
|
||||||
=> HasDocs (AuthProtect auth usr policy :> sublayout) where
|
=> HasDocs (AuthProtect auth usr policy :> sublayout) where
|
||||||
|
|
Loading…
Reference in a new issue