remove policy specificity and add lax endpoint

This commit is contained in:
aaron levin 2015-09-13 23:41:35 +02:00 committed by Arian van Putten
parent c95120bc22
commit 60c41eec9f

View file

@ -82,7 +82,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."
@ -116,6 +116,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