midgard-lib: go.aporeto.io/midgard-lib/ldaputils Index | Files

package ldaputils

import "go.aporeto.io/midgard-lib/ldaputils"

Package ldaputils contains helpers to deal with LDAP.

Index

Package Files

consts.go doc.go ldapinfo.go utils.go

Constants

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.

type LDAPInfo Uses

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 Uses

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

NewLDAPInfo returns a new LDAPInfo, or an error

func (*LDAPInfo) GetUserQueryString Uses

func (i *LDAPInfo) GetUserQueryString() string

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

func (*LDAPInfo) ToMap Uses

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

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

Package ldaputils imports 2 packages (graph) and is imported by 1 packages. Updated 2019-07-06. Refresh now. Tools for package owners.