userauth

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainResolverConfig

type DomainResolverConfig struct {
	ResolverType  string                    `json:"resolverType"`
	AdConfig      *activedirectory.AdConfig `json:"adConfig,omitempty"`
	LdapConfig    *ldaps.LdapConfig         `json:"ldapConfig,omitempty"`
	MsGraphConfig *msgraph.MsGraphConfig    `json:"msGraphConfig,omitempty"`
}

TODO: add enum for resolverType

func ParseDomainResolverConfigs added in v1.20.0

func ParseDomainResolverConfigs(jsonBytes []byte) ([]DomainResolverConfig, error)

ParseDomainResolverConfigs unmarshals the resolver configuration json into a slice of configs without building any clients. This lets callers decide how to instantiate the resolvers (e.g. synchronously or asynchronously).

type DomainResolverConfigs

type DomainResolverConfigs struct {
	DomainResolvers []DomainResolverConfig `json:"domainResolvers"`
}

type DomainResolverInterface

type DomainResolverInterface interface {
	GetUser(ctx context.Context, userId string) (*identitymodels.User, error)
	clients.CommonHealthChecker
}

type DomainResolvers

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

func NewDomainResolvers added in v1.20.0

func NewDomainResolvers() *DomainResolvers

NewDomainResolvers returns an empty, ready-to-use resolver registry. Resolvers can be added later with SetDomain or AddResolverFromConfig, which makes it safe to construct the registry up front and populate it asynchronously while the rest of the application starts.

func NewDomainResolversFromJson

func NewDomainResolversFromJson(jsonBytes []byte) (*DomainResolvers, error)

func (*DomainResolvers) AddResolverFromConfig added in v1.20.0

func (d *DomainResolvers) AddResolverFromConfig(cfg DomainResolverConfig) error

AddResolverFromConfig builds a single domain resolver from its config, adds it to the registry and registers its health check. The network connection is established here, so this call can block; it is safe to call concurrently and at runtime, allowing additional resolvers to be added after startup.

func (*DomainResolvers) GetUser

func (d *DomainResolvers) GetUser(ctx context.Context, userId string) (*identitymodels.User, error)

func (*DomainResolvers) RegisterHealthChecks added in v0.1.0

func (d *DomainResolvers) RegisterHealthChecks()

func (*DomainResolvers) RemoveDomain

func (d *DomainResolvers) RemoveDomain(domain string)

func (*DomainResolvers) SetDomain

func (d *DomainResolvers) SetDomain(domain string, resolver DomainResolverInterface)

Directories

Path Synopsis
This package contains the msgraph package which is used to interact with the Microsoft Graph API it implements the UserWithGroup struct and the GraphClient struct
This package contains the msgraph package which is used to interact with the Microsoft Graph API it implements the UserWithGroup struct and the GraphClient struct

Jump to

Keyboard shortcuts

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