From 392d893dbfff0879ebb9d6bc2367729790f54e52 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 23 May 2009 18:33:19 +0200 Subject: [PATCH] Add method to generate a client token. --- src/net/pterodactylus/jsite/core/RequestManager.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/net/pterodactylus/jsite/core/RequestManager.java b/src/net/pterodactylus/jsite/core/RequestManager.java index df7028f..831c9b3 100644 --- a/src/net/pterodactylus/jsite/core/RequestManager.java +++ b/src/net/pterodactylus/jsite/core/RequestManager.java @@ -129,6 +129,19 @@ public class RequestManager implements NodeListener { } /** + * Generates a client token for the given project. + * + * @param project + * The project to generate a client token for + * @return The generated client token + */ + public String generateClientToken(Project project) { + String clientToken = project.getId() + "." + System.currentTimeMillis(); + clientToken += "." + clientToken.hashCode(); + return clientToken; + } + + /** * Wraps the requests of the FCP API into jSite requests. * * @param requests -- 2.7.4