Help us shape the future of Go! Take the 2026 Go Developer Survey

pam

package
v1.17.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source struct {
	auth.ConfigBase `json:"-"`

	ServiceName string // pam service (e.g. system-auth)
	EmailDomain string
}

Source holds configuration for the PAM login source.

func (*Source) Authenticate

func (source *Source) Authenticate(ctx context.Context, user *user_model.User, userName, password string) (*user_model.User, error)

Authenticate queries if login/password is valid against the PAM, and create a local user if success when enabled.

func (*Source) FromDB

func (source *Source) FromDB(bs []byte) error

FromDB fills up a PAMConfig from serialized format.

func (*Source) ToDB

func (source *Source) ToDB() ([]byte, error)

ToDB exports a PAMConfig to a serialized format.

Jump to

Keyboard shortcuts

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