Documentation ¶
Index ¶
- type Source
- func (source *Source) Authenticate(ctx context.Context, user *user_model.User, userName, password string) (*user_model.User, error)
- func (source *Source) FromDB(bs []byte) error
- func (source *Source) IsSkipLocalTwoFA() bool
- func (source *Source) SetAuthSource(authSource *auth.Source)
- func (source *Source) ToDB() ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source struct { ServiceName string // pam service (e.g. system-auth) EmailDomain string SkipLocalTwoFA bool `json:",omitempty"` // Skip Local 2fa for users authenticated with this source // contains filtered or unexported fields }
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) IsSkipLocalTwoFA ¶
IsSkipLocalTwoFA returns if this source should skip local 2fa for password authentication
func (*Source) SetAuthSource ¶
SetAuthSource sets the related AuthSource
Click to show internal directories.
Click to hide internal directories.