package sso // Authenticator is used for pluggable authentication backends type Authenticator interface { ListUsers() ([]string, error) // GetUser returns User type from username string. GetUser(user string) (*User, error) // Register registers a new user to our user system. Register(user, pass, email string) (*User, error) // Ban bans a user's account from logging in. Ban(user string) error // Delete delete's a user from our user system. Delete(user string) error // PasswordLogin checks the provided password against the provided account's stored credentials. PasswordLogin(user, pass string) (*User, error) // ChangePassword hashes their new password and replaces their old password hash. ChangePassword(user, newpass string) error // UserExists checks our user system for a user and returns true if they exist, false if not. UserExists(user string) bool // IsGlobalAdmin marks a user as a Global Administrator, granting them all permissions. IsGlobalAdmin(user string) error MakeGlobalAdmin(user string) error IsActive(user string) (bool, error) }