aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/api/signature
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/api/signature')
-rw-r--r--src/main/java/org/traccar/api/signature/CryptoManager.java2
-rw-r--r--src/main/java/org/traccar/api/signature/TokenManager.java2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/api/signature/CryptoManager.java b/src/main/java/org/traccar/api/signature/CryptoManager.java
index 8a3e7704c..249d5bd97 100644
--- a/src/main/java/org/traccar/api/signature/CryptoManager.java
+++ b/src/main/java/org/traccar/api/signature/CryptoManager.java
@@ -21,6 +21,7 @@ import org.traccar.storage.query.Columns;
import org.traccar.storage.query.Request;
import javax.inject.Inject;
+import javax.inject.Singleton;
import java.security.GeneralSecurityException;
import java.security.KeyFactory;
import java.security.KeyPair;
@@ -33,6 +34,7 @@ import java.security.spec.ECGenParameterSpec;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
+@Singleton
public class CryptoManager {
private final Storage storage;
diff --git a/src/main/java/org/traccar/api/signature/TokenManager.java b/src/main/java/org/traccar/api/signature/TokenManager.java
index a352ecc10..6a0d90b40 100644
--- a/src/main/java/org/traccar/api/signature/TokenManager.java
+++ b/src/main/java/org/traccar/api/signature/TokenManager.java
@@ -21,11 +21,13 @@ import org.apache.commons.codec.binary.Base64;
import org.traccar.storage.StorageException;
import javax.inject.Inject;
+import javax.inject.Singleton;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.util.Date;
import java.util.concurrent.TimeUnit;
+@Singleton
public class TokenManager {
private static final int DEFAULT_EXPIRATION_DAYS = 7;