aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/api/security
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-07-22 17:33:40 -0700
committerAnton Tananaev <anton@traccar.org>2022-07-22 17:33:40 -0700
commit4a10f75f016af996bd15e90101f0d20e4d61e083 (patch)
treee4c97cccd9b3371cea11679ec0966c8c62977625 /src/main/java/org/traccar/api/security
parent708f04be5d9a25bd9d217127680a61f307cb8ef2 (diff)
downloadtrackermap-server-4a10f75f016af996bd15e90101f0d20e4d61e083.tar.gz
trackermap-server-4a10f75f016af996bd15e90101f0d20e4d61e083.tar.bz2
trackermap-server-4a10f75f016af996bd15e90101f0d20e4d61e083.zip
Add device expiration (fix #3056, fix #3529)
Diffstat (limited to 'src/main/java/org/traccar/api/security')
-rw-r--r--src/main/java/org/traccar/api/security/LoginService.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/api/security/LoginService.java b/src/main/java/org/traccar/api/security/LoginService.java
index 9938cf6dc..104a6fac3 100644
--- a/src/main/java/org/traccar/api/security/LoginService.java
+++ b/src/main/java/org/traccar/api/security/LoginService.java
@@ -83,12 +83,7 @@ public class LoginService {
if (user == null) {
throw new SecurityException("Unknown account");
}
- if (user.getDisabled()) {
- throw new SecurityException("Account is disabled");
- }
- if (user.getExpirationTime() != null && System.currentTimeMillis() > user.getExpirationTime().getTime()) {
- throw new SecurityException("Account has expired");
- }
+ user.checkDisabled();
}
}