snaplet-hdbc-0.6.1: HDBC snaplet for Snap Framework

Snap.Snaplet.Auth.Backends.Hdbc

Description

Authentication backend using HDBC

Synopsis

Documentation

initHdbcAuthManagerSource

Arguments

:: IConnection conn 
=> AuthSettings

Auth settings

-> Lens b (Snaplet SessionManager)

Lens to the session manager

-> IO conn

Raw HDBC connection

-> AuthTable

Authentication table configuration

-> Queries

Queries to be used for authentication

-> SnapletInit b (AuthManager b) 

Initialises this HDBC snaplet. It automatically configures a resource pool with commonly acceptable default settings. Use initHdbcAuthManager' to initialise with a custom resource pool.

initHdbcAuthManager'Source

Arguments

:: IConnection conn 
=> AuthSettings

Auth settings

-> Lens b (Snaplet SessionManager)

Lens to the session manager

-> IO (Pool conn)

A pre-configured resource pool which dispenses HDBC connections

-> AuthTable

Authentication table configuration

-> Queries

Queries to be used for authentication

-> SnapletInit b (AuthManager b) 

Initialises this HDBC snaplet with a custom resource pool.

data HdbcAuthManager Source

Authmanager state containing the resource pool and the table/query configuration.

Constructors

forall conn . IConnection conn => HdbcAuthManager 

Fields

authDBPool :: Pool conn
 
table :: AuthTable
 
qries :: Queries
 

defAuthTable :: AuthTableSource

Default authentication table layout

colLst :: [AuthTable -> String]Source

List of deconstructors so it's easier to extract column names form an AuthTable.