remove policy specificity and add lax endpoint
This commit is contained in:
parent
8dbc857c8e
commit
7616eff8b7
1 changed files with 3 additions and 1 deletions
|
@ -75,7 +75,7 @@ instance ToSample Cookie Cookie where
|
||||||
instance ToSample SecretData SecretData where
|
instance ToSample SecretData SecretData where
|
||||||
toSample _ = Just (SecretData "shhhhh!")
|
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."
|
toAuthInfo _ = AuthenticationInfo "In this sentence we outline how authentication works."
|
||||||
"The following data is required on each request as a serialized header."
|
"The following data is required on each request as a serialized header."
|
||||||
|
|
||||||
|
@ -109,6 +109,8 @@ type TestApi =
|
||||||
|
|
||||||
-- GET /private
|
-- GET /private
|
||||||
:<|> "private" :> AuthProtect Cookie User 'Strict :> Get '[JSON] SecretData
|
:<|> "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 TestApi
|
||||||
testApi = Proxy
|
testApi = Proxy
|
||||||
|
|
Loading…
Reference in a new issue