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 ¶
ErrUserPasswordInvalid represents a "ErrUserPasswordInvalid" kind of error.
func (ErrUserPasswordInvalid) Error ¶
func (err ErrUserPasswordInvalid) Error() string
func (ErrUserPasswordInvalid) Unwrap ¶
func (err ErrUserPasswordInvalid) Unwrap() error
Unwrap unwraps this error as a ErrInvalidArgument error
type ErrUserPasswordNotSet ¶
ErrUserPasswordNotSet represents a "ErrUserPasswordNotSet" kind of error.
func (ErrUserPasswordNotSet) Error ¶
func (err ErrUserPasswordNotSet) Error() string
func (ErrUserPasswordNotSet) Unwrap ¶
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.