ldap

package
v0.4.33 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIdentitySeparator

func GetIdentitySeparator() string

func GetUserIdentity

func GetUserIdentity(identities []client.Identity, userType string) (client.Identity, bool)

GetUserIdentity returns the "user" from the list of identities

Types

type ConstantsConfig

type ConstantsConfig struct {
	UserScope            string
	GroupScope           string
	Scopes               []string
	MemberOfAttribute    string
	ObjectClassAttribute string
	LdapJwt              string
	CAPool               *x509.CertPool
}

type LClient

type LClient struct {
	Config            *model.LdapConfig
	ConstantsConfig   *ConstantsConfig
	SearchConfig      *SearchConfig
	AccessMode        string
	AllowedIdentities string
	Enabled           bool
}

LClient is the ldap client

func (*LClient) GenerateToken

func (l *LClient) GenerateToken(jsonInput map[string]string) (model.Token, int, error)

GenerateToken generates token

func (*LClient) GetGroupIdentity added in v0.4.17

func (l *LClient) GetGroupIdentity(groupDN []string, lConn *ldap.Conn) ([]client.Identity, error)

func (*LClient) GetIdentity

func (l *LClient) GetIdentity(distinguishedName string, scope string) (client.Identity, error)

GetIdentity gets identities

func (*LClient) InitializeSearchConfig

func (l *LClient) InitializeSearchConfig() *SearchConfig

func (*LClient) RefreshToken

func (l *LClient) RefreshToken(json map[string]string) (model.Token, int, error)

func (*LClient) SearchIdentities

func (l *LClient) SearchIdentities(name string, exactMatch bool) ([]client.Identity, error)

SearchIdentities returns the identity by name

func (*LClient) TestLogin

func (l *LClient) TestLogin(testAuthConfig *model.TestAuthConfig, accessToken string, originalLogin string) (int, error)

type SearchConfig

type SearchConfig struct {
	Server               string
	Port                 int64
	BindDN               string
	BindPassword         string
	UserSearchAttributes []string
	GroupSeachAttributes []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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