ldap

package
v0.0.0-...-c18a219 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SecurityNone     = SecurityPolicy(0)
	SecurityTLS      = SecurityPolicy(1)
	SecurityStartTLS = SecurityPolicy(2)
)
View Source
const PkgName = "auxo.security.certify.ldap"

Variables

This section is empty.

Functions

func New

func New(addr, baseDN, userDN string, opts ...Option) certify.Realm

Types

type Option

type Option func(*Realm)

func Binding

func Binding(dn, pwd string) Option

Binding enables binding authentication

func EmailAttr

func EmailAttr(attr string) Option

func NameAttr

func NameAttr(attr string) Option

func Security

func Security(security SecurityPolicy) Option

func UserFilter

func UserFilter(filter string) Option

type Realm

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

func (*Realm) Login

func (r *Realm) Login(token certify.Token) (security.User, error)

func (*Realm) Name

func (*Realm) Name() string

type SecurityPolicy

type SecurityPolicy int32

type User

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

func (*User) Anonymous

func (u *User) Anonymous() bool

func (*User) Email

func (u *User) Email() string

func (*User) ID

func (u *User) ID() string

func (*User) Name

func (u *User) Name() string

func (*User) SetEmail

func (u *User) SetEmail(email string)

func (*User) SetID

func (u *User) SetID(id string)

func (*User) SetName

func (u *User) SetName(name string)

Jump to

Keyboard shortcuts

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