From 7616eff8b74c4ebdecaa67eaa5367a0a355a642f Mon Sep 17 00:00:00 2001 From: aaron levin Date: Sun, 13 Sep 2015 23:41:35 +0200 Subject: [PATCH] remove policy specificity and add lax endpoint --- servant-docs/example/greet.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servant-docs/example/greet.hs b/servant-docs/example/greet.hs index 0b7f610b..569a5414 100644 --- a/servant-docs/example/greet.hs +++ b/servant-docs/example/greet.hs @@ -75,7 +75,7 @@ instance ToSample Cookie Cookie where instance ToSample SecretData SecretData where toSample _ = Just (SecretData "shhhhh!") -instance ToAuthInfo (AuthProtect Cookie User 'Strict) where +instance ToAuthInfo (AuthProtect Cookie User policy) where toAuthInfo _ = AuthenticationInfo "In this sentence we outline how authentication works." "The following data is required on each request as a serialized header." @@ -109,6 +109,8 @@ type TestApi = -- GET /private :<|> "private" :> AuthProtect Cookie User 'Strict :> Get '[JSON] SecretData + -- GET /private-lax + :<|> "private-lax" :> AuthProtect Cookie User 'Lax :> Get '[JSON] SecretData testApi :: Proxy TestApi testApi = Proxy