ad

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

Auth represents an Active Directory authentication mechanism

func New

func New(config *adauth.Config, attrs, groups []string) *Auth

New returns a new *Auth with the given configuration, user attributes, and groups

func (*Auth) Authenticate

func (a *Auth) Authenticate(username, password string) (user session.Session, err error)

Authenticate authenticates the given credentials and returns the User associated with the account if successful, or nil if not. If an error occurs it is returned.

type User

type User struct {
	Entry  *ldap.Entry
	Groups []string
	// contains filtered or unexported fields
}

User represents an Active Directory User

func (*User) DisplayName

func (u *User) DisplayName() string

DisplayName returns the User's display name

func (*User) Username

func (u *User) Username() string

Username returns the User's username

Jump to

Keyboard shortcuts

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