1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-23 01:20:11 +00:00

auth: provide error message if account is disabled

This commit is contained in:
Harvey Tindall 2023-06-17 13:57:48 +01:00
parent d3c5feaf1b
commit 3e034c85d6
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2

View File

@ -158,6 +158,11 @@ func (app *appContext) validateJellyfinCredentials(username, password string, gc
respond(401, "Unauthorized", gc) respond(401, "Unauthorized", gc)
return return
} }
if status == 403 {
app.info.Println("Auth denied: Jellyfin account disabled")
respond(403, "yourAccountWasDisabled", gc)
return
}
app.err.Printf("Auth failed: Couldn't authenticate with Jellyfin (%d/%s)", status, err) app.err.Printf("Auth failed: Couldn't authenticate with Jellyfin (%d/%s)", status, err)
respond(500, "Jellyfin error", gc) respond(500, "Jellyfin error", gc)
return return