glauth

package
v0.0.0-...-499b85e Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChainHandler

func NewChainHandler(log log.Logger, bh handler.Handler, fh handler.Handler) handler.Handler

NewChainHandler implements a chain backend with two backends

func NewOCISHandler

func NewOCISHandler(opts ...Option) handler.Handler

NewOCISHandler implements a glauth backend with ocis-accounts as the datasource

Types

type LdapSvc

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

LdapSvc holds the ldap server struct

func Server

func Server(opts ...Option) (*LdapSvc, error)

Server initializes the ldap server. It is a fork github.com/glauth/pkg/server because it would introduce a go-micro dependency upstream.

func (*LdapSvc) ListenAndServe

func (s *LdapSvc) ListenAndServe() error

ListenAndServe listens on the TCP network address s.c.LDAP.Listen

func (*LdapSvc) ListenAndServeTLS

func (s *LdapSvc) ListenAndServeTLS() error

ListenAndServeTLS listens on the TCP network address s.c.LDAPS.Listen

func (*LdapSvc) Shutdown

func (s *LdapSvc) Shutdown()

Shutdown ends listeners by sending true to the ldap serves quit channel

type Option

type Option func(o *Options)

Option defines a single option function.

func AccountsService

func AccountsService(val accounts.AccountsService) Option

AccountsService provides an AccountsService client to set the AccountsService option.

func Backend

func Backend(val *config.Config) Option

Backend provides a function to set the backend option.

func BaseDN

func BaseDN(val string) Option

BaseDN provides a strring to set the BaseDN option.

func Context

func Context(val context.Context) Option

Context provides a function to set the context option.

func Fallback

func Fallback(val *config.Config) Option

Fallback provides a strring to set the fallback option.

func GroupFormat

func GroupFormat(val string) Option

GroupFormat provides a strring to set the GroupFormat option.

func GroupsService

func GroupsService(val accounts.GroupsService) Option

GroupsService provides an GroupsService client to set the GroupsService option.

func LDAP

func LDAP(val *config.LDAP) Option

LDAP provides a function to set the LDAP option.

func LDAPS

func LDAPS(val *config.LDAPS) Option

LDAPS provides a function to set the LDAPS option.

func Logger

func Logger(val log.Logger) Option

Logger provides a function to set the logger option.

func NameFormat

func NameFormat(val string) Option

NameFormat provides a strring to set the NameFormat option.

func RoleBundleUUID

func RoleBundleUUID(val string) Option

RoleBundleUUID provides a role bundle UUID to make internal grpc requests.

type Options

type Options struct {
	Logger          log.Logger
	Context         context.Context
	LDAP            *config.LDAP
	LDAPS           *config.LDAPS
	Backend         *config.Config
	Fallback        *config.Config
	BaseDN          string
	NameFormat      string
	GroupFormat     string
	RoleBundleUUID  string
	AccountsService accounts.AccountsService
	GroupsService   accounts.GroupsService
}

Options defines the available options for this package.

Jump to

Keyboard shortcuts

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