2019-04-25 04:52:08 +07:00
|
|
|
package authentication
|
|
|
|
|
2021-09-17 16:53:59 +07:00
|
|
|
import (
|
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
)
|
|
|
|
|
2019-04-25 04:52:08 +07:00
|
|
|
// UserProvider is the interface for checking user password and
|
|
|
|
// gathering user details.
|
|
|
|
type UserProvider interface {
|
2021-09-17 16:53:59 +07:00
|
|
|
CheckUserPassword(username string, password string) (valid bool, err error)
|
|
|
|
GetDetails(username string) (details *UserDetails, err error)
|
|
|
|
UpdatePassword(username string, newPassword string) (err error)
|
|
|
|
StartupCheck(logger *logrus.Logger) (err error)
|
2019-04-25 04:52:08 +07:00
|
|
|
}
|