Skip to content

Commit

Permalink
No expiration time if parameter is not defined on traccar.xml.
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelMiquelino committed Nov 5, 2020
1 parent 48605bd commit 75b2016
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/org/traccar/authorization/OidcProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ public User getUser(Claims claims) {
user.setEmail(claims.get("email", String.class));
user.setAdministrator(false);
user.setDeviceLimit(usersDefaultDeviceLimit);
user.setExpirationTime(
new Date(System.currentTimeMillis() + (long) usersDefaultExpirationDays * 24 * 3600 * 1000)
);
if (usersDefaultExpirationDays > 0) {
user.setExpirationTime(
new Date(System.currentTimeMillis() + (long) usersDefaultExpirationDays * 24 * 3600 * 1000)
);
}
return user;
}
}

0 comments on commit 75b2016

Please sign in to comment.