Documentation
¶
Index ¶
- type Manager
- func (manager *Manager) Bind(ctx context.Context, dn, password string) (*schema.Object, error)
- func (manager *Manager) ChangePassword(ctx context.Context, dn, old string, new *string) (*schema.Object, error)
- func (manager *Manager) Connect() error
- func (manager *Manager) Create(ctx context.Context, dn string, attr url.Values) (*schema.Object, error)
- func (manager *Manager) Delete(ctx context.Context, dn string) (*schema.Object, error)
- func (ldap *Manager) Disconnect() error
- func (manager *Manager) Get(ctx context.Context, dn string) (*schema.Object, error)
- func (ldap *Manager) Host() string
- func (manager *Manager) List(ctx context.Context, request schema.ObjectListRequest) (*schema.ObjectList, error)
- func (ldap *Manager) Port() int
- func (manager *Manager) Run(ctx context.Context) error
- func (manager *Manager) Update(ctx context.Context, dn string, attr url.Values) (*schema.Object, error)
- func (ldap *Manager) User() string
- func (manager *Manager) WhoAmI() (string, error)
- type Opt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
LDAP manager
func NewManager ¶
func (*Manager) Bind ¶
Bind a user to check if they are authenticated, returns httpresponse.ErrNotAuthorized if the credentials are invalid
func (*Manager) ChangePassword ¶
func (manager *Manager) ChangePassword(ctx context.Context, dn, old string, new *string) (*schema.Object, error)
Change a password for a user. If the new password is empty, then the password is reset to a new random password and returned. The old password is required for the change if the ldap connection is not bound to the admin user.
func (*Manager) Create ¶
func (manager *Manager) Create(ctx context.Context, dn string, attr url.Values) (*schema.Object, error)
Create an object
func (*Manager) Disconnect ¶
Disconnect from the LDAP server
func (*Manager) List ¶
func (manager *Manager) List(ctx context.Context, request schema.ObjectListRequest) (*schema.ObjectList, error)
Return the objects
type Opt ¶
type Opt func(*opt) error
Opt represents a function that modifies the options
func WithBaseDN ¶
func WithPassword ¶
func WithSkipVerify ¶
Click to show internal directories.
Click to hide internal directories.