Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmailNotAllowed = errors.New("Required email domain not fulfilled") ErrInvalidCredentials = errors.New("Invalid Username or Password") ErrNoEmail = errors.New("Login provider didn't return an email address") ErrProviderDeniedRequest = errors.New("Login provider denied login request") ErrSignUpNotAllowed = errors.New("Signup is not allowed for this adapter") ErrTooManyLoginAttempts = errors.New("Too many consecutive incorrect login attempts for user. Login for user temporarily blocked") ErrPasswordEmpty = errors.New("No password provided.") ErrUsersQuotaReached = errors.New("Users quota reached") ErrGettingUserQuota = errors.New("Error getting user quota") )
View Source
var NewLdapAuthenticator = func(server *LdapServerConf) ILdapAuther { return &ldapAuther{server: server, log: log.New("ldap")} }
Functions ¶
func AuthenticateUser ¶
func AuthenticateUser(query *m.LoginUserQuery) error
func UpsertUser ¶
func UpsertUser(cmd *m.UpsertUserCommand) error
Types ¶
type ILdapAuther ¶
type ILdapAuther interface { Login(query *m.LoginUserQuery) error SyncUser(query *m.LoginUserQuery) error GetGrafanaUserFor(ctx *m.ReqContext, ldapUser *LdapUserInfo) (*m.User, error) }
type LdapAttributeMap ¶
type LdapConfig ¶
type LdapConfig struct {
Servers []*LdapServerConf `toml:"servers"`
}
var LdapCfg LdapConfig
type LdapGroupToOrgRole ¶
type LdapServerConf ¶
type LdapServerConf struct { Host string `toml:"host"` Port int `toml:"port"` UseSSL bool `toml:"use_ssl"` StartTLS bool `toml:"start_tls"` SkipVerifySSL bool `toml:"ssl_skip_verify"` RootCACert string `toml:"root_ca_cert"` ClientCert string `toml:"client_cert"` ClientKey string `toml:"client_key"` BindDN string `toml:"bind_dn"` BindPassword string `toml:"bind_password"` Attr LdapAttributeMap `toml:"attributes"` SearchFilter string `toml:"search_filter"` SearchBaseDNs []string `toml:"search_base_dns"` GroupSearchFilter string `toml:"group_search_filter"` GroupSearchFilterUserAttribute string `toml:"group_search_filter_user_attribute"` GroupSearchBaseDNs []string `toml:"group_search_base_dns"` LdapGroups []*LdapGroupToOrgRole `toml:"group_mappings"` }
Click to show internal directories.
Click to hide internal directories.