Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

merged 2 commits into from Oct 26, 2011


None yet
3 participants

lightquake commented Oct 19, 2011

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.

lightquake added some commits Oct 19, 2011

use withBackend instead of pattern matching in Snap.Snaplet.Auth.Hand…

withBackend is a utility function for doing stuff with an instance of
IAuthBackend without letting the type leak, and without
pattern-matching against the AuthManager constructor.

@ozataman ozataman merged commit 2f03ddc into snapframework:master Oct 26, 2011


ozataman commented Oct 26, 2011

Changes merged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment