ldapwrap

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscapeFilter

func EscapeFilter(f string) string

func GenerateToken

func GenerateToken(nickname string) (tokenString string, err error)

func New

func New(cf LdapConnFactory) (l core.LdapDialer, err error)

func ValidateToken

func ValidateToken(tokenString string, nickname string) (ok bool, err error)

Types

type LdapConnFactory

type LdapConnFactory func() (conn core.LdapConn, err error)

func NewLdapConnFactory

func NewLdapConnFactory(
	host string, port int, username, password string,
) (
	ldapConnFactory LdapConnFactory,
)

type LdapDialer

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

func (*LdapDialer) Dial

func (ld *LdapDialer) Dial(ctx context.Context) (core.LdapWrap, error)

type LdapWrap

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

func (*LdapWrap) MemberExists

func (l *LdapWrap) MemberExists(uid string) (exists bool, err error)

func (*LdapWrap) NextUidNumber

func (l *LdapWrap) NextUidNumber() (nextUidNumber int, err error)

func (*LdapWrap) PasswordReset

func (l *LdapWrap) PasswordReset(nickname string) (token, email string, err error)

func (*LdapWrap) RegisterMember

func (l *LdapWrap) RegisterMember(user, email, mlEmail string) (token string, err error)

func (*LdapWrap) SearchActive

func (l *LdapWrap) SearchActive(filter string, attrs []string) (sr *ldap.SearchResult, err error)

func (*LdapWrap) SearchActiveAndInactive

func (l *LdapWrap) SearchActiveAndInactive(filter string, attrs []string) (sr *ldap.SearchResult, err error)

func (*LdapWrap) SearchInactive

func (l *LdapWrap) SearchInactive(filter string, attrs []string) (sr *ldap.SearchResult, err error)

func (*LdapWrap) SetPassword

func (l *LdapWrap) SetPassword(token, password, doorpass string) (err error)

type Token

type Token struct {
	ValidUntil time.Time
	Nickname   string
	Random     []byte
}

Jump to

Keyboard shortcuts

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