Documentation
¶
Index ¶
- func GetToken(role Role) (string, error)
- type Config
- func (a *Config) Advanced(driver loginFn, driverName string)
- func (a *Config) Authenticate(next http.Handler) http.Handler
- func (a *Config) GetIdentification() http.Handler
- func (a *Config) GetUser(t, e string) map[string]string
- func (a *Config) LdapAd(u, p string)
- func (a *Config) LdapIpa(u, p string)
- func (a *Config) None()
- func (a *Config) Simple(u, p string)
- type Role
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Driver loginFn DriverName string }
Config struct contains the authentication configuration
func (*Config) Authenticate ¶
Authenticate calls the proper handler based on whether authentication is enabled or not
func (*Config) GetIdentification ¶
GetIdentification retrieves the user & pass from a POST and authenticates the user against the Identification driver
type User ¶
type User struct { ID int64 `db:"id"` Username string `db:"username"` FullName string `db:"fullName"` Email string `db:"email"` Org string `db:"company"` Password string `db:"-"` PasswordHash string `db:"passwordHash"` PasswordSalt string `db:"passwordSalt"` Role string `db:"role"` Token string `db:"-"` }
User structure
Click to show internal directories.
Click to hide internal directories.