Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authenticate ¶
func Authenticate(ctx context.Context, user *user_model.User, login, password string) (*user_model.User, error)
Authenticate authenticates the provided user against the DB
Types ¶
type ErrUserPasswordInvalid ¶ added in v1.20.0
ErrUserPasswordInvalid represents a "ErrUserPasswordInvalid" kind of error.
func (ErrUserPasswordInvalid) Error ¶ added in v1.20.0
func (err ErrUserPasswordInvalid) Error() string
func (ErrUserPasswordInvalid) Unwrap ¶ added in v1.20.0
func (err ErrUserPasswordInvalid) Unwrap() error
Unwrap unwraps this error as a ErrInvalidArgument error
type ErrUserPasswordNotSet ¶ added in v1.20.0
ErrUserPasswordNotSet represents a "ErrUserPasswordNotSet" kind of error.
func (ErrUserPasswordNotSet) Error ¶ added in v1.20.0
func (err ErrUserPasswordNotSet) Error() string
func (ErrUserPasswordNotSet) Unwrap ¶ added in v1.20.0
func (err ErrUserPasswordNotSet) Unwrap() error
Unwrap unwraps this error as a ErrInvalidArgument error
type Source ¶
type Source struct{}
Source is a password authentication service
func (*Source) Authenticate ¶
func (source *Source) Authenticate(ctx context.Context, user *user_model.User, login, 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.
Click to show internal directories.
Click to hide internal directories.