private String buildSignature(ClientRequest request, String timestamp) { String method = getMethod(request); String path = getPath(request); byte[] content = getContent(request); return signatureGenerator.generate(secretKey, method, timestamp, path, content); }
private String buildSignature(ClientRequest request, String timestamp) { String method = getMethod(request); String path = getPath(request); byte[] content = getContent(request); return signatureGenerator.generate(secretKey, method, timestamp, path, content); }
private String buildSignature(ClientRequest request, String timestamp) { String method = getMethod(request); String path = getPath(request); byte[] content = request.hasEntity() ? getContent(request) : null; return signatureGenerator.generate(secretKey, method, timestamp, path, content); }
/** * Create a signature given the set of request credentials and a secret key. * * @param credentials the credentials specified on the request * @param secretKey the secret key that will be used to generate the signature * @return the signature */ private String createSignature(Credentials credentials, String secretKey) { return new SignatureGenerator().generate( secretKey, credentials.getMethod(), credentials.getTimestamp(), credentials.getPath(), credentials.getContent()); }
/** * Create a signature given the set of request credentials and a secret key. * * @param credentials the credentials specified on the request * @param secretKey the secret key that will be used to generate the signature * @return the signature */ private String createSignature(Credentials credentials, String secretKey) { return new SignatureGenerator().generate( secretKey, credentials.getMethod(), credentials.getTimestamp(), credentials.getPath(), credentials.getContent()); }