directory

package
v1.10.21 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

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 (*Service) Login

func (s *Service) Login(ctx context.Context, identifier, password string) (*models.User, error)

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.

Jump to

Keyboard shortcuts

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