Documentation
¶
Overview ¶
Package directory turns a successful LDAP/Active-Directory bind into a Miabi user: it just-in-time provisions the account and reconciles directory groups onto platform-admin and per-workspace access. The bind lives behind the enterprise seam, so the enterprise build never touches user/workspace code.
Index ¶
Constants ¶
View Source
const AuthSourceLDAP = models.AuthSourceLDAP
AuthSourceLDAP marks accounts provisioned/managed by a directory.
Variables ¶
View Source
var ( // ErrAccountDisabled is returned when the matched local account is disabled. ErrAccountDisabled = errors.New("account is disabled") // ErrNoEmail is returned when the directory entry has no email (an attr_email // misconfiguration) — surfaced so the admin can fix the mapping. ErrNoEmail = errors.New("directory user has no email address") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(ee enterprise.EE, users *repositories.UserRepository, workspaces *repositories.WorkspaceRepository, ldap *repositories.LDAPRepository) *Service
func (*Service) Login ¶
Login attempts directory auth as a fall-through after local password auth fails. (user, nil) means the credentials bound and the account is provisioned; (nil, nil) means no directory matched, so the caller keeps its local result; (nil, err) means the bind failed or the account is disabled.
Click to show internal directories.
Click to hide internal directories.