Commit Graph

13 Commits

Author SHA1 Message Date
aaron levin
b3af5a8d95 Move general authentication to Experimental module
Removes the UndecidableInstances extension in the module containing the
HasServer instances.
2016-03-09 22:30:34 +01:00
aaron levin
a09733a560 modify auth-combinator example for gen auth 2016-03-09 22:30:34 +01:00
Sönke Hahn
8ef4d4543b renaming: Config -> Context 2016-03-07 23:12:24 +08:00
Julian K. Arni
f137972e5d Add 'serveWithConfig'.
And keep the old signature for 'serve'
2016-02-18 16:36:24 +01:00
Sönke Hahn
df09f8616e config: remove HasConfig and make HasServer take config as a parameter 2016-01-21 17:58:50 +01:00
Sönke Hahn
67315c4487 server: added Config machinery 2016-01-21 17:55:02 +01:00
Andres Loeh
1398d1f5e1 More systematic approach to delayed checks.
This introduces a `Delayed` type in `RoutingApplication.hs` that
contains a handler together with delayed checks. There are several
blocks of delayed checks, so that we can ultimately execute them in the
order we desire.

The process is documented in more detail in `RoutingApplication.hs`.
2015-10-26 16:56:25 +01:00
Julian K. Arni
ccadba81ec Cleanup errorspec description of routing, changelog.
Review fixes
2015-10-26 16:55:13 +01:00
Julian K. Arni
a3b5652ab9 Refactor RouteResult.
Fix rerouting tests
        Fix 405 > 404 issue with Capture.
        Remove ServantErrWithPriority and Monoid instance
        More tests
        Update auth-combinator for routing changes
2015-10-26 16:54:49 +01:00
Julian K. Arni
6eb7add53a stylish haskell changes
And import fix.
2015-08-18 00:07:12 +02:00
Andres Loeh
e83397a1db Fix the auth combinator example.
This change adapt the auth combinator example to the new router code.
In general, the server interpretation of user-written combinators will
be affected by the new routing code.

The change here also introduces a change in functionality: previously,
wrong authentication triggered a "hard failure", whereas we now trigger
a "soft failure", which is recoverable. For the simple example, this
does not make a lot of difference.

In general, I think having a soft failure is the right option to take
here, although we want a more general story about the relative
priorities of different error codes.
2015-06-04 13:12:21 +02:00
Julian K. Arni
92d65aaf49 -Wall fixes 2015-05-03 13:36:51 +02:00
Alp Mestanogullari
4c86c7395c add an auth combinator example 2015-04-24 14:00:57 +02:00