Show info about public key during login

This will show the key fingerprint and the associated comment, or
"password" when password was used, during login.

Eg.:

```
message":"User id: 1, logged in with: \"public_key:SHA256:FV3+wlAKGzYy7+J02786fh8N8c06+jga/mdiSOSPT7g:jo@desktop\",
```

or

```
message":"User id: 1, logged in with: \"password\",
...`

Signed-off-by: Jo Vandeginste <Jo.Vandeginste@kuleuven.be>
This commit is contained in:
Jo Vandeginste
2019-09-05 21:35:53 +02:00
committed by drakkan
parent bb589c6fc8
commit 25260297aa
8 changed files with 29 additions and 24 deletions

View File

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