[bisq-network/bisq] Security framework for the API (#2461)
Bernard Labno
notifications at github.com
Mon Feb 25 10:18:24 UTC 2019
blabno commented on this pull request.
> +package bisq.api.http.service.auth;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+public class TokenRegistry {
+
+ public static final long TTL = 30 * 60 * 1000;
+
+ private final TimeProvider timeProvider;
+ private final RandomStringGenerator randomStringGenerator;
+ private Map<String, Long> tokens = new HashMap<>();
+
+ public TokenRegistry() {
+ this(() -> UUID.randomUUID().toString(), System::currentTimeMillis);
`UUID.randomUUID` uses `SecureRandom` by default.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/2461#discussion_r259757402
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190225/130fe852/attachment.html>
More information about the bisq-github
mailing list