Snap.Snaplet.Auth.Backends.JsonFile

snap-0.9.2.2: Top-level package for the Snap Web Framework

Safe Haskell | None

Snap.Snaplet.Auth.Backends.JsonFile

Synopsis

- initJsonFileAuthManager :: AuthSettings -> Lens b (Snaplet SessionManager) -> FilePath -> SnapletInit b (AuthManager b)
- mkJsonAuthMgr :: FilePath -> IO JsonFileAuthManager

# Documentation

initJsonFileAuthManager

Arguments

:: AuthSettings | Authentication settings for your app
-> Lens b (Snaplet SessionManager) | Lens into a `SessionManager` auth snaplet will use
-> FilePath | Where to store user data as JSON
-> SnapletInit b (AuthManager b) |

Initialize a JSON file backed `AuthManager`

mkJsonAuthMgr :: FilePath -> IO JsonFileAuthManager

Load/create a datafile into memory cache and return the manager.

This data type can be used by itself for batch/non-handler processing.