aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/api/resource
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-01-15 20:50:44 -0800
committerGitHub <noreply@github.com>2020-01-15 20:50:44 -0800
commit729021a19086d982c1b4ec5661d9140c42f030f8 (patch)
treea31c0870cc6e62b1f002d62f8c602ef124f173ab /src/main/java/org/traccar/api/resource
parent50d8c39d41113a73fdae7a30971b4b39c35c5566 (diff)
parentb62d3ba2a545a2f6b2963a2aa2c36b53abdfd6bc (diff)
downloadtrackermap-server-729021a19086d982c1b4ec5661d9140c42f030f8.tar.gz
trackermap-server-729021a19086d982c1b4ec5661d9140c42f030f8.tar.bz2
trackermap-server-729021a19086d982c1b4ec5661d9140c42f030f8.zip
Merge pull request #4460 from DeveloperKurt/failedLoginLogsIp-developerKurt
Failed Login Attempts logs IP Addresses
Diffstat (limited to 'src/main/java/org/traccar/api/resource')
-rw-r--r--src/main/java/org/traccar/api/resource/SessionResource.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/api/resource/SessionResource.java b/src/main/java/org/traccar/api/resource/SessionResource.java
index fd331c766..e3c5d457f 100644
--- a/src/main/java/org/traccar/api/resource/SessionResource.java
+++ b/src/main/java/org/traccar/api/resource/SessionResource.java
@@ -18,6 +18,7 @@ package org.traccar.api.resource;
import org.traccar.Context;
import org.traccar.api.BaseResource;
import org.traccar.helper.DataConverter;
+import org.traccar.helper.ServletHelper;
import org.traccar.helper.LogAction;
import org.traccar.model.User;
@@ -106,6 +107,7 @@ public class SessionResource extends BaseResource {
LogAction.login(user.getId());
return user;
} else {
+ LogAction.failedLogin(ServletHelper.retrieveRemoteAddress(request));
throw new WebApplicationException(Response.status(Response.Status.UNAUTHORIZED).build());
}
}