mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 23:28:39 +03:00
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:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user