add support for per user authentication methods

You can, for example, deny one or more authentication methods to one or
more users.
This commit is contained in:
Nicola Murino
2020-02-19 22:39:30 +01:00
parent 62b20cd884
commit bc11cdd8d5
15 changed files with 264 additions and 87 deletions

View File

@@ -438,7 +438,7 @@ func TestUploadFiles(t *testing.T) {
func TestWithInvalidHome(t *testing.T) {
u := dataprovider.User{}
u.HomeDir = "home_rel_path"
_, err := loginUser(u, "password", "")
_, err := loginUser(u, dataprovider.SSHLoginMethodPassword, "", "")
if err == nil {
t.Errorf("login a user with an invalid home_dir must fail")
}