ldap

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithClient

func WithClient(ctx server.Cmd, fn func(*ldap.Client, string) error) error

WithClient returns auth client configured from the global HTTP flags.

Types

type AttrCommands

type AttrCommands struct {
	Attr AttrListCommand `cmd:"" name:"attr" help:"List Attribute Types." group:"LDAP OBJECT SCHEMA"`
}

type AttrListCommand

type AttrListCommand schema.AttributeTypeListRequest

func (*AttrListCommand) Run

func (cmd *AttrListCommand) Run(ctx server.Cmd) error

type BindObjectCommand

type BindObjectCommand struct {
	DN       string `arg:"" name:"dn" help:"Object distinguished name"`
	Password string `arg:"" optional:"" name:"password" help:"Object password. Omit to be prompted"`
}

func (*BindObjectCommand) Run

func (cmd *BindObjectCommand) Run(ctx server.Cmd) error

type ClassCommands

type ClassCommands struct {
	Class ClassListCommand `cmd:"" name:"class" help:"List Object Classes." group:"LDAP OBJECT SCHEMA"`
}

type ClassListCommand

type ClassListCommand schema.ObjectClassListRequest

func (*ClassListCommand) Run

func (cmd *ClassListCommand) Run(ctx server.Cmd) error

type CmdTokenStore

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

func NewCmdTokenStore

func NewCmdTokenStore(ctx server.Cmd) *CmdTokenStore

func (*CmdTokenStore) StoreToken

func (s *CmdTokenStore) StoreToken(endpoint, issuer string, token *oauth2.Token) error

func (*CmdTokenStore) Token

func (s *CmdTokenStore) Token(endpoint string) (*oauth2.Token, string, error)

type CreateObjectCommand

type CreateObjectCommand struct {
	DN    string   `arg:"" name:"dn" help:"Object distinguished name"`
	Attrs []string `arg:"" name:"attrs" help:"Attributes as key=value1,value2"`
}

func (*CreateObjectCommand) Run

func (cmd *CreateObjectCommand) Run(ctx server.Cmd) error

type DeleteObjectCommand

type DeleteObjectCommand struct {
	GetObjectCommand
}

func (*DeleteObjectCommand) Run

func (cmd *DeleteObjectCommand) Run(ctx server.Cmd) error

type GetObjectCommand

type GetObjectCommand struct {
	DN string `arg:"" name:"dn" help:"Object distinguished name"`
}

func (*GetObjectCommand) Run

func (cmd *GetObjectCommand) Run(ctx server.Cmd) error

type GroupAddUsersCommand

type GroupAddUsersCommand struct {
	CN    string   `arg:"" name:"cn" help:"Group common name"`
	Users []string `arg:"" name:"users" help:"User names to add to the group"`
}

func (*GroupAddUsersCommand) Run

func (cmd *GroupAddUsersCommand) Run(ctx server.Cmd) error

type GroupCommands

type GroupCommands struct {
	Group       GroupListCommand        `cmd:"" name:"groups" help:"List groups." group:"LDAP USERS & GROUPS"`
	Get         GroupGetCommand         `cmd:"" name:"group" help:"Get group." group:"LDAP USERS & GROUPS"`
	Delete      GroupDeleteCommand      `cmd:"" name:"group-delete" help:"Delete group." group:"LDAP USERS & GROUPS"`
	Create      GroupCreateCommand      `cmd:"" name:"group-create" help:"Create group." group:"LDAP USERS & GROUPS"`
	Update      GroupUpdateCommand      `cmd:"" name:"group-update" help:"Update group." group:"LDAP USERS & GROUPS"`
	AddUsers    GroupAddUsersCommand    `cmd:"" name:"group-add-users" help:"Add users to group." group:"LDAP USERS & GROUPS"`
	RemoveUsers GroupRemoveUsersCommand `cmd:"" name:"group-remove-users" help:"Remove users from group." group:"LDAP USERS & GROUPS"`
}

type GroupCreateCommand

type GroupCreateCommand struct {
	CN    string   `arg:"" name:"cn" help:"Group common name"`
	Attrs []string `arg:"" optional:"" name:"attrs" help:"Attributes as key=value1,value2"`
}

func (*GroupCreateCommand) Run

func (cmd *GroupCreateCommand) Run(ctx server.Cmd) error

type GroupDeleteCommand

type GroupDeleteCommand struct {
	CN string `arg:"" name:"cn" help:"Group common name"`
}

func (*GroupDeleteCommand) Run

func (cmd *GroupDeleteCommand) Run(ctx server.Cmd) error

type GroupGetCommand

type GroupGetCommand struct {
	CN string `arg:"" name:"cn" help:"Group common name"`
}

func (*GroupGetCommand) Run

func (cmd *GroupGetCommand) Run(ctx server.Cmd) error

type GroupListCommand

type GroupListCommand schema.ObjectListRequest

func (*GroupListCommand) Run

func (cmd *GroupListCommand) Run(ctx server.Cmd) error

type GroupRemoveUsersCommand

type GroupRemoveUsersCommand struct {
	CN    string   `arg:"" name:"cn" help:"Group common name"`
	Users []string `arg:"" name:"users" help:"User names to remove from the group"`
}

func (*GroupRemoveUsersCommand) Run

func (cmd *GroupRemoveUsersCommand) Run(ctx server.Cmd) error

type GroupUpdateCommand

type GroupUpdateCommand struct {
	CN    string   `arg:"" name:"cn" help:"Group common name"`
	Attrs []string `arg:"" name:"attrs" help:"Attributes as key=value1,value2"`
}

func (*GroupUpdateCommand) Run

func (cmd *GroupUpdateCommand) Run(ctx server.Cmd) error

type ListObjectsCommand

type ListObjectsCommand struct {
	schema.ObjectListRequest
}

func (*ListObjectsCommand) Run

func (cmd *ListObjectsCommand) Run(ctx server.Cmd) error

type ObjectCommands

type ObjectCommands struct {
	Objects ListObjectsCommand    `cmd:"" name:"objects" help:"List Objects." group:"LDAP OBJECTS"`
	Object  GetObjectCommand      `cmd:"" name:"object" help:"Get Object." group:"LDAP OBJECTS"`
	Create  CreateObjectCommand   `cmd:"" name:"object-create" help:"Create Object." group:"LDAP OBJECTS"`
	Update  UpdateObjectCommand   `cmd:"" name:"object-update" help:"Update Object." group:"LDAP OBJECTS"`
	Delete  DeleteObjectCommand   `cmd:"" name:"object-delete" help:"Delete Object." group:"LDAP OBJECTS"`
	Bind    BindObjectCommand     `cmd:"" name:"object-bind" help:"Bind Object." group:"LDAP OBJECTS"`
	Passwd  PasswordObjectCommand `cmd:"" name:"object-password" help:"Change Object Password." group:"LDAP OBJECTS"`
}

type PasswordObjectCommand

type PasswordObjectCommand struct {
	DN  string `arg:"" name:"dn" help:"Object distinguished name"`
	Old string `arg:"" optional:"" name:"old" help:"Current password. Leave empty to treat the object as having no password"`
	New string `` /* 132-byte string literal not displayed */
}

func (*PasswordObjectCommand) Run

func (cmd *PasswordObjectCommand) Run(ctx server.Cmd) error

type UpdateObjectCommand

type UpdateObjectCommand struct {
	DN    string   `arg:"" name:"dn" help:"Object distinguished name"`
	Attrs []string `arg:"" name:"attrs" help:"Attributes as key=value1,value2"`
}

func (*UpdateObjectCommand) Run

func (cmd *UpdateObjectCommand) Run(ctx server.Cmd) error

type UserCommands

type UserCommands struct {
	Users  UserListCommand   `cmd:"" name:"users" help:"List users." group:"LDAP USERS & GROUPS"`
	User   UserGetCommand    `cmd:"" name:"user" help:"Get user." group:"LDAP USERS & GROUPS"`
	Delete UserDeleteCommand `cmd:"" name:"user-delete" help:"Delete user." group:"LDAP USERS & GROUPS"`
	Create UserCreateCommand `cmd:"" name:"user-create" help:"Create user." group:"LDAP USERS & GROUPS"`
	Update UserUpdateCommand `cmd:"" name:"user-update" help:"Update user." group:"LDAP USERS & GROUPS"`
}

type UserCreateCommand

type UserCreateCommand struct {
	CN          string   `arg:"" name:"cn" help:"User name"`
	Attrs       []string `arg:"" optional:"" name:"attrs" help:"Attributes as key=value1,value2"`
	AllocateGID bool     `name:"allocate-gid" help:"Set gidNumber to uidNumber when gidNumber is omitted"`
}

func (*UserCreateCommand) Run

func (cmd *UserCreateCommand) Run(ctx server.Cmd) error

type UserDeleteCommand

type UserDeleteCommand struct {
	CN string `arg:"" name:"cn" help:"User name"`
}

func (*UserDeleteCommand) Run

func (cmd *UserDeleteCommand) Run(ctx server.Cmd) error

type UserGetCommand

type UserGetCommand struct {
	CN string `arg:"" name:"cn" help:"User name"`
}

func (*UserGetCommand) Run

func (cmd *UserGetCommand) Run(ctx server.Cmd) error

type UserListCommand

type UserListCommand schema.ObjectListRequest

func (*UserListCommand) Run

func (cmd *UserListCommand) Run(ctx server.Cmd) error

type UserUpdateCommand

type UserUpdateCommand struct {
	CN    string   `arg:"" name:"cn" help:"User name"`
	Attrs []string `arg:"" name:"attrs" help:"Attributes as key=value1,value2"`
}

func (*UserUpdateCommand) Run

func (cmd *UserUpdateCommand) Run(ctx server.Cmd) error

Jump to

Keyboard shortcuts

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