federation

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LdapUserFederation

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

LdapUserFederation is a service that is responsible for User Federation using Ldap protocol todo(UMV): this is a preliminary implementation (not tested yet)

func CreateLdapUserFederationService

func CreateLdapUserFederationService(config *data.UserFederationServiceConfig, logger *logging.AppLogger) (*LdapUserFederation, error)

func (*LdapUserFederation) Authenticate

func (s *LdapUserFederation) Authenticate(userName string, password string) (bool, error)

func (*LdapUserFederation) GetUser

func (s *LdapUserFederation) GetUser(userName string, mask string) (data.User, error)

GetUser builds user from data from federation service

func (*LdapUserFederation) GetUsers

func (s *LdapUserFederation) GetUsers(mask string) []data.User

func (*LdapUserFederation) Init

func (s *LdapUserFederation) Init()

type UserFederation

type UserFederation interface {
	// GetUser searches for User in external Provider and return data.User mapped with mask (jsonpath)
	GetUser(userName string, mask string) (data.User, error)
	// GetUsers searches for Users in external Provider and return []data.User mapped with mask (jsonpath)
	GetUsers(mask string) []data.User
	// Authenticate method for Authenticate in external Provider
	Authenticate(userName string, password string) (bool, error)
}

UserFederation is interface to external User Storage systems (AD, LDAP or FreeIPA)

UserFederation instances are classes that have config to connect external providers
* and Authenticate in system using this provider

func CreateUserFederationService

func CreateUserFederationService(config *data.UserFederationServiceConfig, logger *logging.AppLogger) (UserFederation, error)

CreateUserFederationService is a factory method that creates

Jump to

Keyboard shortcuts

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