config

package
v1.5.13 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTask

func NewTask(manager *ldap.Manager) (server.Task, error)

Types

type Config

type Config struct {
	Url        *url.URL `env:"LDAP_URL" help:"LDAP connection URL"`                // Connection URL
	User       string   `env:"LDAP_USER" help:"User"`                              // User
	Password   string   `env:"LDAP_PASSWORD" help:"Password"`                      // Password
	BaseDN     string   `env:"LDAP_BASE_DN" help:"Base DN"`                        // Base DN
	SkipVerify bool     `env:"LDAP_SKIPVERIFY" help:"Skip TLS certificate verify"` // Skip verify

	Router server.HTTPRouter `kong:"-"` // HTTP Router

	UserSchema struct {
		RDN           string `default:"cn=users,cn=account" help:"User RDN"`
		Field         string `default:"uid" help:"User field"`
		ObjectClasses string `default:"top,person,inetOrgPerson,posixAccount" help:"User object classes"`
	}

	GroupSchema struct {
		RDN           string `default:"cn=groups,cn=account" help:"Group RDN"`
		Field         string `default:"cn" help:"Group field"`
		ObjectClasses string `default:"top,groupOfNames,nestedGroup,posixGroup" help:"Group object classes"`
	}
}

func (Config) Description

func (c Config) Description() string

func (Config) Name

func (c Config) Name() string

func (Config) New

func (c Config) New(ctx context.Context) (server.Task, error)

Jump to

Keyboard shortcuts

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