13:56:51 <donri> stepcut: do you think we should have separate config types for client and server?
14:00:17 <donri> single type is more convenient for user in simple cases but arguably a bit odd internally
14:01:08 <donri> i was thinking separate types could be used to prevent you from using a client conf on the server which could be bad if the client conf is just skipping server side auth checking...
14:01:44 <donri> ...but then again we could maybe protect against that with a single type anyway a bit by making the client config factory also do server side authentication with the same secret
14:04:26 <donri> if you're not using any authentication, or just a single shared secret, a single type makes more sense i think. but if you have multiple secrets and multiple clients, it might be more weird (still doable)
14:05:56 <donri> i guess though it's not really much weirder than the existing oddity where you need a hostname but it's ignored for UnixSocket
14:20:45 <donri> meh i'll make it a single type because the only oddity is that you have to provide both a set of secrets for the server and a secret for the client, either of which can just be empty which is not a security hazard
15:42:12 <donri> gah i keep changing my mind on this. i have working code for either option anyway
16:06:11 <McManiaC> acid-state question: i got acid-state "B" inside a "data A" record, which is the main acid state… how can I pass "AcidState B" to a function?
16:06:25 <McManiaC> ie. how do I reduce the "AcidState A" to "AcidState B"
16:07:06 <donri> McManiaC: normally you'd write a Query
16:07:22 <McManiaC> that would just return B, wouldnt it?
16:08:02 <donri> yes, and then pass the B to the function
16:08:11 <McManiaC> or should I store "AcidState B" in my A record
16:08:39 <donri> i doubt you can even do that'
16:08:40 <McManiaC> well the function requires an AcidState, not just B :/
16:08:46 <McManiaC> heh yeaj
16:08:47 <McManiaC> h
16:09:08 <donri> what is the function?
16:09:12 <donri> what are you actually doing?
16:09:13 <McManiaC> from http://hackage.haskell.org/package/happstack-authenticate-0.10.5
16:09:25 <McManiaC> or should i just use different states instead of trying to do all in one
16:09:41 <donri> i think that's the assumption happstack-authenticate makes yes
16:12:03 <McManiaC> k
16:17:16 <McManiaC>     Couldn't match expected type `AuthURL'
16:17:16 <McManiaC>                 with actual type `URL (ServerPartT IO)'
16:17:18 <McManiaC> uhm
16:17:20 <McManiaC> what is that
16:17:50 <McManiaC> arises from the "handleAuth" function
16:18:03 <McManiaC> http://npaste.de/p/IoNB/
16:21:59 <donri> McManiaC: you need to run it in a MonadRoute where the route type is AuthURL, such as RouteT AuthURL
16:26:09 <donri> McManiaC: might want to read http://www.happstack.com/docs/crashcourse/WebRoutes.html#web-routes
16:26:18 <McManiaC> oh thanks
16:31:46 <donri> basically you need a function, route :: AuthURL -> RouteT AuthURL (ServerPartT IO) Response, and then to make it a plain serverpart you can do, implSite (mkSitePI (runRouteT route))
16:32:25 <donri> you can call the function something else, but it needs to return an appropriate response for every case in AuthURL
16:33:16 <donri> uh actually handleAuth is that function
16:33:20 <donri> when partially applied
16:34:37 <donri> McManiaC: something like, simpleHTTP httpConf $ implSite (mkSitePI . runRouteT $ handleAuth ...)
16:37:03 <McManiaC> so complicated
16:37:03 <McManiaC> x_x
16:37:04 <donri> uh except implSite also wants two Text arguments for the approot and path of the auth handler
16:37:43 <McManiaC> what's the second one?
16:37:57 <donri> e.g. "/auth"
16:38:41 <McManiaC> so it'd be "/" "/auth" ?
16:38:48 <McManiaC> or just "/" "auth" ?
16:39:06 <stepcut> did you see the demo, ? http://hub.darcs.net/stepcut/happstack/browse/happstack-authenticate/demo-blaze/Main.hs
16:40:09 <McManiaC> oh thanks
16:40:17 <stepcut> I'm about to leave, but I can answer questions when I get back from the hardware store
16:40:45 <donri> stepcut: ping me when back will ya :)
16:42:03 <stepcut> Also I need to uppload a new version of happstack-authenticate which exports, handleAuthProfileRouteT, which makes it easier to integrate into apps that don't use web-routes (and even ones that do)
16:42:34 <stepcut> this is another reference, http://hub.darcs.net/stepcut/happstack/browse/happstack-foundation/examples/ControlVAuth/Main.hs
16:42:50 <stepcut> which uses said function, and demonstrates how to integrate happstack-authenticate+happstack-foundation
16:43:01 <stepcut> it deals with the issue about having multiple acid states
16:43:34 <stepcut> well, it provides one solution to the problem -- you can do it other ways as well
16:43:45 <stepcut> I was a bit  tempted to use lens.. but it seem a bit like overkill
16:44:24 <McManiaC> ok
16:45:07 <McManiaC> but you basically load 3 acid states there too
16:45:25 <McManiaC> not just one and seperate them later on
16:45:42 <stepcut> yes
16:45:45 <stepcut> that is the solution
16:46:09 <McManiaC> ok
16:49:12 <McManiaC> authProfileHandler "/" "auth"
16:49:23 <McManiaC> where do I find this auth page now? /auth gives me a 404 response
17:10:32 <donri> McManiaC: /auth/a-login  is my guess
18:17:39 <donri> stepcut: you back?
19:11:24 <stepcut> back
20:15:28 <donri> stepcut: so... one or two conf types. tell me what to do!
22:16:21 <donri> bedtime