Documentation
¶
Overview ¶
Package types provides types for the users package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateGroupEntries ¶
func ValidateGroupEntries(groups []GroupEntry) error
ValidateGroupEntries validates a list of group entries, ensuring they respect the GroupEntry.Validate constraints and that the names and the GID are unique.
Types ¶
type GroupEntry ¶
GroupEntry is the group information sent to the NSS service.
func DeepCopyGroupEntries ¶
func DeepCopyGroupEntries(groups []GroupEntry) []GroupEntry
DeepCopyGroupEntries makes a deep copy of group entries.
func GetValidGroupEntries ¶
func GetValidGroupEntries(groups []GroupEntry) (validEntries []GroupEntry)
GetValidGroupEntries returns the first valid group entries according to validates a list of group entries, ensuring they respect the GroupEntry.Validate constraints and that the names and the GID are unique.
func (GroupEntry) DeepCopy ¶
func (g GroupEntry) DeepCopy() GroupEntry
DeepCopy makes a deep copy of the group entry.
func (GroupEntry) Equals ¶
func (g GroupEntry) Equals(other GroupEntry) bool
Equals checks that two groups are equal.
func (GroupEntry) String ¶
func (g GroupEntry) String() string
func (GroupEntry) Validate ¶
func (g GroupEntry) Validate() error
Validate validates the group entry values.
type ShadowEntry ¶
type ShadowEntry struct {
Name string
LastPwdChange int
MaxPwdAge int
PwdWarnPeriod int
PwdInactivity int
MinPwdAge int
ExpirationDate int
}
ShadowEntry is the shadow information sent to the NSS service.
type UserInfo ¶
type UserInfo struct {
Name string
UID uint32
Gecos string
Dir string
Shell string
// BrokerID is the provider scope for ProviderID. It is set by authd from the
// selected broker, not by broker-returned JSON. It is always serialized (no
// omitempty) because it scopes the user's identity.
BrokerID string `json:"-" yaml:"broker_id"`
// ProviderID is the stable OIDC subject identifier (or oid for MS Entra ID).
// It is used as the primary matching key for returning users. Empty for
// v2 brokers or users that have not yet logged in after the migration.
ProviderID string `json:"provider_id,omitempty" yaml:"provider_id"`
Groups []GroupInfo
}
UserInfo is the user information returned by the broker.