pkg

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	Authenticate(ctx context.Context, bindDN string, bindPassword []byte) bool
	Authorize(ctx context.Context, req *ldap.SearchRequest) ([]*ldap.SearchResult, error)
}

type BmcLdap

type BmcLdap struct {
	// contains filtered or unexported fields
}

func NewLdapServer

func NewLdapServer(logger *logrus.Logger, config *config.Config) *BmcLdap

returns a ldap.Server

func (*BmcLdap) Add

func (bmcLdap *BmcLdap) Add(ctx ldap.Context, req *ldap.AddRequest) (*ldap.AddResponse, error)

Method added to conform to ldap.Server interface

func (*BmcLdap) Bind

func (bmcLdap *BmcLdap) Bind(ctx ldap.Context, req *ldap.BindRequest) (bindResponse *ldap.BindResponse, err error)

func (*BmcLdap) Connect

func (bmcLdap *BmcLdap) Connect(remoteAddr net.Addr) (ldap.Context, error)

func (*BmcLdap) Delete

func (bmcLdap *BmcLdap) Delete(ctx ldap.Context, req *ldap.DeleteRequest) (*ldap.DeleteResponse, error)

Method added to conform to ldap.Server interface

func (*BmcLdap) Disconnect

func (bmcLdap *BmcLdap) Disconnect(ctx ldap.Context)

func (*BmcLdap) ExtendedRequest

func (bmcLdap *BmcLdap) ExtendedRequest(ctx ldap.Context, req *ldap.ExtendedRequest) (*ldap.ExtendedResponse, error)

Method added to conform to ldap.Server interface

func (*BmcLdap) Ldap

func (bmcLdap *BmcLdap) Ldap(protocol string, address string)

func (*BmcLdap) Ldaps

func (bmcLdap *BmcLdap) Ldaps(protocol string, address string, tlsConfig *tls.Config)

func (*BmcLdap) LoadTlsConfig

func (bmcLdap *BmcLdap) LoadTlsConfig(c *config.Config) *tls.Config

func (*BmcLdap) Modify

func (bmcLdap *BmcLdap) Modify(ctx ldap.Context, req *ldap.ModifyRequest) (*ldap.ModifyResponse, error)

Method added to conform to ldap.Server interface

func (*BmcLdap) ModifyDN

func (bmcLdap *BmcLdap) ModifyDN(ctx ldap.Context, req *ldap.ModifyDNRequest) (*ldap.ModifyDNResponse, error)

Method added to conform to ldap.Server interface

func (*BmcLdap) PasswordModify

func (bmcLdap *BmcLdap) PasswordModify(ctx ldap.Context, req *ldap.PasswordModifyRequest) ([]byte, error)

Method added to conform to ldap.Server interface

func (*BmcLdap) Search

func (bmcLdap *BmcLdap) Search(ctx ldap.Context, req *ldap.SearchRequest) (res *ldap.SearchResponse, err error)

func (*BmcLdap) Whoami

func (bmcLdap *BmcLdap) Whoami(ctx ldap.Context) (string, error)

Directories

Path Synopsis
hp

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL