Documentation ¶
Index ¶
- Variables
- type Backend
- func (s *Backend) CanUsersRegister() bool
- func (s *Backend) Close()
- func (s *Backend) CreateUser(user storage.User) error
- func (s *Backend) GenerateSecurePassword(password string) (string, error)
- func (s *Backend) Login(username, password string) (*storage.User, error)
- func (s *Backend) UserCanChangePassword() bool
- type LDAPAuthPlugin
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUserNotFound indicates the user was not found in the authentication backend ErrUserNotFound = errors.New("user not found") // ErrMoreThanOne is returned whenever more than one AD record was returned as we cant properly distinguish which record we should use ErrMoreThanOne = errors.New("more than one record has been found") // ErrInvalidCert is returned whenever the CA cert was given to us for use in the LDAP provider but is invalid ErrInvalidCert = errors.New("invalid root ca cert") // ErrDisabled is returned when a function is called that is not supported by the LDAP provider ErrDisabled = errors.New("disabled in ldap authentication") )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct { *Options // contains filtered or unexported fields }
Backend is an authentication backend that queries an LDAP/Active Directory server for authentication
func Init ¶
func Init(db authentication.AuthStorageBackend, cfg authentication.PluginSettings) (*Backend, error)
Init creates a new LDAP authentication backend
func (*Backend) CanUsersRegister ¶
CanUsersRegister is disabled in the LDAP authentication backend
func (*Backend) Close ¶
func (s *Backend) Close()
Close implements authentication.Close but we have nothing to free here.
func (*Backend) CreateUser ¶
CreateUser is disabled in the LDAP authentication backend
func (*Backend) GenerateSecurePassword ¶
GenerateSecurePassword is disabled in the LDAP authentication backend
func (*Backend) UserCanChangePassword ¶
UserCanChangePassword is disabled in the LDAP authentication backend
type LDAPAuthPlugin ¶
type LDAPAuthPlugin struct{}
LDAPAuthPlugin implements Open which is used to register the LDAP provider with the backend
func (*LDAPAuthPlugin) Open ¶
func (s *LDAPAuthPlugin) Open(db authentication.AuthStorageBackend, cfg authentication.PluginSettings) (authentication.AuthAPI, error)
Open initializes the LDAP Authentication Provider
Click to show internal directories.
Click to hide internal directories.