auth

package module
v0.0.0-...-dd668d6 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 2 Imported by: 1

README

GoDoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, driver Driver)

Types

type Conn

type Conn interface {
	Login(user string, pass string) (*User, error)
	Close() error
}

func Open

func Open(driver string, endpoints []string, options ...DriverOption) (Conn, error)

type Driver

type Driver interface {
	SetTLS(config *tls.Config) error
	SetDomain(domain string) error
	SetBase(base string) error
	SetOU(ou string) error
	SetFilterUser(filter string) error
	SetFilterMemberOf(filter string) error
	Open(endpoints []string) (Conn, error)
}

type DriverOption

type DriverOption func(Driver) error

func WithBase

func WithBase(base string) DriverOption

func WithDomain

func WithDomain(domain string) DriverOption

func WithFilterMemberOf

func WithFilterMemberOf(filter string) DriverOption

func WithFilterUser

func WithFilterUser(filter string) DriverOption

func WithOU

func WithOU(ou string) DriverOption

func WithTLS

func WithTLS(tls *tls.Config) DriverOption

type User

type User struct {
	UUID       string   `json:"uuid,omitempty"`
	Username   string   `json:"username"`
	Name       string   `json:"name"`
	Title      string   `json:"-"` // `json:"title"`
	Descr      string   `json:"-"` // `json:"descr"`
	Mail       string   `json:"mail"`
	Company    string   `json:"-"` // `json:"company"`
	Department string   `json:"-"` // `json:"department"`
	Location   string   `json:"-"` // `json:"location"`
	State      string   `json:"-"` // `json:"state"`
	Country    string   `json:"-"` // `json:"country"`
	Groups     []string `json:"-"` // `json:"groups"`
	DistrLists []string `json:"-"` // `json:"distrLists"`
	Roles      []string `json:"roles,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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