zerobuzz / servant-cookie-session

Other
0 stars 0 forks source link

Why does `sessionCsrfToken` focus on a `Maybe`? #1

Open fisx opened 7 years ago

fisx commented 7 years ago

We have this:

class HasSessionCsrfToken a where
  sessionCsrfToken :: Lens' a (Maybe CsrfToken)

What's the intuition of the Nothing case? Shouldn't that be an error that is thrown inside the middleware, so that the application logic can rely on the token to always be present?