Versions in this module Expand all Collapse all v0 v0.4.0 Jan 27, 2017 Changes in this version type Driver + func TestLocalAuth(t *testing.T) Driver v0.3.0 Jan 12, 2017 Changes in this version + const LocalClientBasicAuthMode + const LocalClientSessionMode + func CheckPersistentSession(db *sql.DB, store sessionstore.Store, headers http.Header, ...) bool + func GetUsername(store sessionstore.Store, token string) (string, error) + func NewPersistentSession(db *sql.DB, d Driver, u *sdk.User) (sessionstore.SessionKey, error) + func NewSession(d Driver, u *sdk.User) (sessionstore.SessionKey, error) + type Driver interface + Authentify func(username, password string) (bool, error) + AuthentifyUser func(user *sdk.User, password string) (bool, error) + GetCheckAuthHeaderFunc func(options interface{}) func(db *sql.DB, headers http.Header, c *context.Context) error + Open func(options interface{}, store sessionstore.Store) error + Store func() sessionstore.Store + func GetDriver(mode string, options interface{}, storeOptions sessionstore.Options) (Driver, error) + type Entry struct + Attributes map[string]string + DN string + type LDAPClient struct + func (c *LDAPClient) Authentify(username, password string) (bool, error) + func (c *LDAPClient) AuthentifyUser(u *sdk.User, password string) (bool, error) + func (c *LDAPClient) Bind(username, password string) error + func (c *LDAPClient) Close() + func (c *LDAPClient) GetCheckAuthHeaderFunc(options interface{}) func(db *sql.DB, headers http.Header, ctx *context.Context) error + func (c *LDAPClient) Open(options interface{}, store sessionstore.Store) error + func (c *LDAPClient) Search(filter string, attributes ...string) ([]Entry, error) + func (c *LDAPClient) Store() sessionstore.Store + type LDAPConfig struct + Base string + DN string + Host string + Port int + SSL bool + UserFullname string + type LDAPDriver interface + Close func() error + Open func(c LDAPConfig) error + Search func(filter string, attributes ...string) ([]Entry, error) + type LocalClient struct + func (c *LocalClient) Authentify(username, password string) (bool, error) + func (c *LocalClient) AuthentifyUser(u *sdk.User, password string) (bool, error) + func (c *LocalClient) GetCheckAuthHeaderFunc(options interface{}) func(db *sql.DB, headers http.Header, ctx *context.Context) error + func (c *LocalClient) Open(options interface{}, store sessionstore.Store) error + func (c *LocalClient) Store() sessionstore.Store