Skip to content

Commit 8e2b6ee

Browse files
committed
Fix: example SAML SP had an undesired hole.
1 parent 0e346f1 commit 8e2b6ee

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

libs/saml2-web-sso/src/SAML2/WebSSO/API/Example.hs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,13 @@ localLogout = do
201201
cky <- toggleCookie "/" Nothing
202202
pure . addHeader cky . addHeader uri $ "Logged out locally, redirecting to " <> renderURI uri
203203

204-
-- | as in [3/4.4]
205-
singleLogout :: (HasCallStack, SP m) => m (WithCookieAndLocation ST)
206-
singleLogout = error "not implemented."
204+
-- | acts weird (handles /sso/meta path)
205+
singleLogout :: (HasCallStack, SP m, Applicative m) => m (WithCookieAndLocation ST)
206+
singleLogout =
207+
-- if we just say "error" instead of "pure . error" here, the routing algorithm in servant
208+
-- will construct the handler and crash, even if the route for the handler does not match
209+
-- the path in the request.
210+
pure $ error "not implemented: singleLogout"
207211

208212
data LoginStatus
209213
= NotLoggedIn [(ST {- issuer -}, ST {- authreq path -})]

0 commit comments

Comments
 (0)