diff --git a/java/lib/src/main/java/com/svix/Main.java b/java/lib/src/main/java/com/svix/Main.java deleted file mode 100644 index 47425fc47..000000000 --- a/java/lib/src/main/java/com/svix/Main.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.svix; - -import com.svix.exceptions.ApiException; -import com.svix.models.ApplicationIn; - -public class Main { - public static void main(String[] args) throws ApiException { - - SvixOptions optionsEu = new SvixOptions(); - optionsEu.serverUrl("https://api.eu.staging.svix.com"); - - Svix svixEu = new Svix("testsk_odZbRN2I5Oanxe9eVMYpdACok5gnRuYo.eu", optionsEu); - - SvixOptions optionsUs = new SvixOptions(); - optionsUs.serverUrl("https://api.us.staging.svix.com"); - Svix svixUs = new Svix("testsk_Q13qtzAH1PNDbtmfz1q0x10XyC9RPYKP.us", optionsUs); - - ApplicationIn appEu = new ApplicationIn(); - appEu.setName("Test EU 6969"); - ApplicationIn appUs = new ApplicationIn(); - appUs.setName("Test US 6969"); - - svixEu.getApplication().create(appEu); - svixUs.getApplication().create(appUs); - - } -} \ No newline at end of file diff --git a/server/svix-server/src/worker.rs b/server/svix-server/src/worker.rs index cb7bd0633..67be042b1 100644 --- a/server/svix-server/src/worker.rs +++ b/server/svix-server/src/worker.rs @@ -182,13 +182,7 @@ fn generate_msg_headers( encryption: &Encryption, whitelabel_headers: bool, ) -> Result { - let signatures = sign_msg( - encryption, - Utc::now().timestamp(), - body, - msg_id, - endpoint_signing_keys, - ); + let signatures = sign_msg(encryption, timestamp, body, msg_id, endpoint_signing_keys); let mut headers = HeaderMap::new(); let id = msg_id @@ -887,15 +881,6 @@ mod tests { /// accounted for fn mock_headers() -> (HeaderMap, MessageId) { let id = MessageId::new(None, None); - - let signatures = sign_msg( - &Encryption::new_noop(), - TIMESTAMP, - BODY, - &id, - ENDPOINT_SIGNING_KEYS, - ); - ( generate_msg_headers( TIMESTAMP, @@ -925,14 +910,6 @@ mod tests { let (mut expected, id) = mock_headers(); let _ = expected.insert("test_key", "value".parse().unwrap()); - let signatures = sign_msg( - &Encryption::new_noop(), - TIMESTAMP, - BODY, - &id, - ENDPOINT_SIGNING_KEYS, - ); - let actual = generate_msg_headers( TIMESTAMP, &BODY, @@ -963,14 +940,6 @@ mod tests { let expected_signature_str = "v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE="; - let signatures = sign_msg( - &Encryption::new_noop(), - test_timestamp, - test_body, - &test_message_id, - &[&test_key], - ); - let actual = generate_msg_headers( test_timestamp, &test_body,