ldaputils

package
v1.72.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Overview

Package ldaputils contains helpers to deal with LDAP.

Index

Constants

View Source
const (
	LDAPAddressKey              = "address"
	LDAPBindDNKey               = "bindDN"
	LDAPBindPasswordKey         = "bindPassword"
	LDAPBindSearchFilterKey     = "bindSearchFilter"
	LDAPSubjectKey              = "subjectKey"
	LDAPIgnoredKeys             = "ignoredKeys"
	LDAPConnSecurityProtocolKey = "connSecurityProtocol"
	LDAPUsernameKey             = "username"
	LDAPPasswordKey             = "password"
	LDAPBaseDNKey               = "baseDN"
)

LDAP Key constant definitions.

Variables

This section is empty.

Functions

This section is empty.

Types

type LDAPInfo

type LDAPInfo struct {
	Address              string                 `msgpack:"address" json:"address"`
	BindDN               string                 `msgpack:"bindDN" json:"bindDN"`
	BindPassword         string                 `msgpack:"bindPassword" json:"bindPassword"`
	BindSearchFilter     string                 `msgpack:"bindSearchFilter" json:"bindSearchFilter"`
	SubjectKey           string                 `msgpack:"subjectKey" json:"subjectKey"`
	IgnoreKeys           map[string]interface{} `msgpack:"ignoredKeys" json:"ignoredKeys"`
	BaseDN               string                 `msgpack:"baseDN" json:"baseDN"`
	ConnSecurityProtocol string                 `msgpack:"connSecurityProtocol" json:"connSecurityProtocol"`
	Username             string                 `msgpack:"username" json:"username"`
	Password             string                 `msgpack:"password" json:"password"`
}

LDAPInfo holds information to authenticate a user using an LDAP Server.

func NewLDAPInfo

func NewLDAPInfo(metadata map[string]interface{}) (*LDAPInfo, error)

NewLDAPInfo returns a new LDAPInfo, or an error

func (*LDAPInfo) GetUserQueryString

func (i *LDAPInfo) GetUserQueryString() string

GetUserQueryString returns the query string based on the filter and username provided.

func (*LDAPInfo) ToMap

func (i *LDAPInfo) ToMap() map[string]interface{}

ToMap convert the LDAPInfo into a map[string]interface{}.

Jump to

Keyboard shortcuts

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