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 ¶
GetUser builds user from data from federation service
- Useful resources:
- 1. https://dev.to/openlab/ldap-authentication-in-golang-with-bind-and-search-47h5
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
Click to show internal directories.
Click to hide internal directories.