snapframework / snap

Top-level package for the official Snap Framework libraries, includes the snaplets API as well as infrastructure for sessions, auth, and templates.
http://snapframework.com/
BSD 3-Clause "New" or "Revised" License
455 stars 68 forks source link

Use existential types to run AuthManager handlers with the auth backend #17

Closed lightquake closed 12 years ago

lightquake commented 13 years ago

Instead of pattern-matching against the AuthManager ctor, we can use a withBackend :: (forall r. (IAuthBackend r) => r -> Handler b (AuthManager v) a) -> Handler b (AuthManager v) a. The handlers in Snap.Snaplet.Auth.Handlers have been rewritten to use this.

This also adds a usernameExists function.

ozataman commented 12 years ago

Changes merged in.