From: David ‘Bombe’ Roden Date: Sat, 23 May 2009 16:33:19 +0000 (+0200) Subject: Add method to generate a client token. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=392d893dbfff0879ebb9d6bc2367729790f54e52;p=jSite2.git Add method to generate a client token. --- 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