ldap

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDNFilter

func CheckDNFilter(filter string, dn string) bool

CheckDNFilter checks if dn satisfies filter

func ExtractFilterValue

func ExtractFilterValue(filter string, key string) string

ExtractFilterValue extracts filter value

func GetUsernameFromDN

func GetUsernameFromDN(dn string) string

GetUsernameFromDN returns username from dn

func ParseDN

func ParseDN(dn string) map[string]string

ParseDN parses dn into map

func ParseDNFilter

func ParseDNFilter(filter string) (string, []string)

func ValidateDN

func ValidateDN(baseDN string, dn string) bool

ValidateDN validates if dn is based on baseDN

Types

type IRODSAuth

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

IRODSAuth is a module for iRODS auth

func NewIRODSAuth

func NewIRODSAuth(config *commons.Config) (*IRODSAuth, error)

NewLDAP creates a new LDAP service

func (*IRODSAuth) Auth

func (auth *IRODSAuth) Auth(dn string, password string) (bool, error)

Auth authenticate a user via password

func (*IRODSAuth) GetDNs

func (auth *IRODSAuth) GetDNs() []string

GetDNs returns DNs

type LDAPService

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

LDAPService is a service object

func NewLDAP

func NewLDAP(config *commons.Config) (*LDAPService, error)

NewLDAP creates a new LDAP service

func (*LDAPService) Destroy

func (svc *LDAPService) Destroy()

Destroy destroys the LDAP service

func (*LDAPService) Start

func (svc *LDAPService) Start() error

Jump to

Keyboard shortcuts

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