ldap

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHAEncoder

type SSHAEncoder struct {
}

func (SSHAEncoder) Encode

func (enc SSHAEncoder) Encode(rawPassPhrase []byte) ([]byte, error)

Encode encodes the []byte of raw password

func (SSHAEncoder) Matches

func (enc SSHAEncoder) Matches(encodedPassPhrase, rawPassPhrase []byte) bool

Matches matches the encoded password and the raw password

type Server

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

Server is a struct holding all of the state information about your LDAP server

func NewServer

func NewServer(baseDN, configFile string, port int) *Server

NewServer creates a new server instance which manages a given baseDN and stores user information in the specified configFile.

func (*Server) Bind

func (s *Server) Bind(bindDN, bindSimplePw string, conn net.Conn) (ldap.LDAPResultCode, error)

Bind is a handler for an incoming bind request.

func (*Server) Listen

func (s *Server) Listen() error

Listen starts the server up on the specified port and begins listening for connections.

func (*Server) ReloadConfiguration

func (s *Server) ReloadConfiguration(filename string)

ReloadConfiguration reads the configuration file and applies the changes.

func (*Server) Search

func (s *Server) Search(boundDN string, searchReq ldap.SearchRequest, conn net.Conn) (ldap.ServerSearchResult, error)

Search is a handler for an incoming search request.

func (*Server) WatchForConfigChanges

func (s *Server) WatchForConfigChanges()

WatchForConfigChanges starts watching the configuration file for writes and applies changes automatically.

Jump to

Keyboard shortcuts

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