@@ -50,6 +50,7 @@ import Network.Wreq (Options, auth, basicAuth,
50import Network.Wreq.Types (Postable(..))
50import Network.Wreq.Types (Postable(..))
51import Servant hiding (BasicAuth,
51import Servant hiding (BasicAuth,
52 IsSecure (..), header)
52 IsSecure (..), header)
53+import Servant.API.Generic ((:-))
53import Servant.Auth.Server
54import Servant.Auth.Server
54import Servant.Auth.Server.Internal.Cookie (expireTime)
55import Servant.Auth.Server.Internal.Cookie (expireTime)
55import Servant.Auth.Server.SetCookieOrphan ()
56import Servant.Auth.Server.SetCookieOrphan ()
@@ -405,6 +406,7 @@ type API auths
405 = Auth auths User :>
406 = Auth auths User :>
406 ( Get '[JSON] Int
407 ( Get '[JSON] Int
407 :<|> ReqBody '[JSON] Int :> Post '[JSON] Int
408 :<|> ReqBody '[JSON] Int :> Post '[JSON] Int
409+ :<|> NamedRoutes DummyRoutes
408 :<|> "header" :> Get '[JSON] (Headers '[Header "Blah" Int] Int)
410 :<|> "header" :> Get '[JSON] (Headers '[Header "Blah" Int] Int)
409#if MIN_VERSION_servant_server(0,15,0)
411#if MIN_VERSION_servant_server(0,15,0)
410 :<|> "stream" :> StreamGet NoFraming OctetStream (SourceIO BS.ByteString)
412 :<|> "stream" :> StreamGet NoFraming OctetStream (SourceIO BS.ByteString)
@@ -416,6 +418,10 @@ type API auths
416 :<|> "logout" :> Get '[JSON] (Headers '[ Header "Set-Cookie" SetCookie
418 :<|> "logout" :> Get '[JSON] (Headers '[ Header "Set-Cookie" SetCookie
417 , Header "Set-Cookie" SetCookie ] NoContent)
419 , Header "Set-Cookie" SetCookie ] NoContent)
421+data DummyRoutes mode = DummyRoutes
422+ { dummyInt :: mode :- "dummy" :> Get '[JSON] Int
419jwtOnlyApi :: Proxy (API '[Servant.Auth.Server.JWT])
425jwtOnlyApi :: Proxy (API '[Servant.Auth.Server.JWT])
420jwtOnlyApi = Proxy
426jwtOnlyApi = Proxy
@@ -476,6 +482,7 @@ server ccfg =
476 (\authResult -> case authResult of
482 (\authResult -> case authResult of
477 Authenticated usr -> getInt usr
483 Authenticated usr -> getInt usr
478 :<|> postInt usr
484 :<|> postInt usr
485+ :<|> DummyRoutes { dummyInt = getInt usr }
479 :<|> getHeaderInt
486 :<|> getHeaderInt
480#if MIN_VERSION_servant_server(0,15,0)
487#if MIN_VERSION_servant_server(0,15,0)
481 :<|> return (S.source ["bytestring"])
488 :<|> return (S.source ["bytestring"])