diff --git a/.env b/.env index f4ff4edf..a8077865 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ DBB_URL="http://dbb:3003/" VOTER_AUTHORIZER_URL="http://voter-authorizer:3002/" CONFERENCE_HOST_URL="http://localhost:3016/" -OTP_PROVIDER_URL="http://otp-provider:3001/" +OTP_PROVIDER_URL="http://otp:3001/" MAILCATCHER_URL="http://mailcatcher:1080/" diff --git a/lib/av_client.ts b/lib/av_client.ts index 501ad5d3..82942ef9 100644 --- a/lib/av_client.ts +++ b/lib/av_client.ts @@ -49,6 +49,8 @@ import { encryptCommitmentOpening, validateCommmitmentOpening } from './av_clien import { submitBallotCryptograms } from './av_client/actions/submit_ballot_cryptograms'; import {AxiosResponse} from "axios"; import { ProofOfElectionCodes } from "./av_client/crypto/proof_of_election_codes"; +import { dhEncrypt } from "./av_client/crypto/aes"; +import { btoa } from "buffer"; /** @internal */ export const sjcl = sjclLib; @@ -343,7 +345,6 @@ export class AVClient implements IAVClient { this.privateKey(), this.getDbbPublicKey() ); - this.boardCommitment = boardCommitment; this.serverEnvelopes = serverEnvelopes; @@ -382,7 +383,7 @@ export class AVClient implements IAVClient { * ``` * @throws {@link NetworkError | NetworkError } if any request failed to get a response */ - public async castBallot(_affidavit?: Affidavit): Promise { + public async castBallot(affidavit?: Affidavit): Promise { if(!(this.voterSession)) { throw new InvalidStateError('Cannot create cast request cryptograms. Ballot cryptograms not present') } @@ -393,11 +394,26 @@ export class AVClient implements IAVClient { content: {} }; + let encryptedAffidavit; + + if (affidavit && this.electionConfig && this.electionConfig.castRequestItemAttachmentEncryptionKey) { + try { + encryptedAffidavit = dhEncrypt(this.electionConfig.castRequestItemAttachmentEncryptionKey, affidavit).toString() + + castRequestItem.content['attachment'] = sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(encryptedAffidavit)) + } catch (err) { + console.error(err) + } + } + const signedPayload = signPayload(castRequestItem, this.privateKey()); + if (encryptedAffidavit) { + signedPayload['attachment'] = `data:text/plain;base64,${btoa(encryptedAffidavit)}` + } + const response = (await this.bulletinBoard.submitCastRequest(signedPayload)); const { castRequest, receipt } = response.data; - validatePayload(castRequest, castRequestItem); validateReceipt([castRequest], receipt, this.getDbbPublicKey()); diff --git a/lib/av_client/types.ts b/lib/av_client/types.ts index d1bc9261..e7029388 100644 --- a/lib/av_client/types.ts +++ b/lib/av_client/types.ts @@ -271,6 +271,9 @@ export interface ElectionConfig { // appended data: affidavit: AffidavitConfig; + // NOTE: It's fake until js-client will start using config/latest_config endpoint + castRequestItemAttachmentEncryptionKey: string; + services: { 'voterAuthorizer': VAService, 'otpProvider': Service diff --git a/package.json b/package.json index 1d9122e1..6fc2038f 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "homepage": "https://aion-dk.github.io/js-client/", "scripts": { "test": "mocha --require ts-node/register/transpile-only --require source-map-support/register --recursive --extension ts ./test/*.test.ts ./test/**/*.test.ts", + "test:walkthrough": "mocha --require ts-node/register/transpile-only --require source-map-support/register --recursive --extension ts ./test/walkthrough.test.ts", "coverage": "tsc && nyc --reporter=json-summary --reporter=text yarn test", "tdd": "mocha --require ts-node/register/transpile-only --require source-map-support/register --extension ts ./test/**/*.test.ts --watch --watch-files test/**/*.ts,lib/**/*.ts", "docs": "typedoc --plugin none --out docs --includes test/", diff --git a/test/replies/benaloh_flow/http_dbb_3003/get__us_configuration.json b/test/replies/benaloh_flow/http_dbb_3003/get__us_configuration.json index 8397b13d..c01da8b7 100644 --- a/test/replies/benaloh_flow/http_dbb_3003/get__us_configuration.json +++ b/test/replies/benaloh_flow/http_dbb_3003/get__us_configuration.json @@ -24,7 +24,7 @@ "otpProvider": { "electionContextUuid": "468d1fbb-a53e-42f8-9d43-37be9e72ea7f", "publicKey": "02c31776fd23004646a5e6554c7fc3087f1f1f23bcfab791e01256655cfc8b78a5", - "url": "http://otp-provider:3001/" + "url": "http://otp:3001/" } }, "ballotConfigs": { @@ -135,4 +135,4 @@ "bcTimeout": 10 }, "receipt": "44d417eae17effe4fb2a7573a839acfe95f430498a01cd8e44978d2542364907,726716ae59eb16d9f74af7a0e62022faa2b0d6731f2b5022782f3ce67dd6e880" -} \ No newline at end of file +} diff --git a/test/replies/benaloh_flow/http_otp-provider_3001/post__authorize.json b/test/replies/benaloh_flow/http_otp_3001/post__authorize.json similarity index 100% rename from test/replies/benaloh_flow/http_otp-provider_3001/post__authorize.json rename to test/replies/benaloh_flow/http_otp_3001/post__authorize.json diff --git a/test/replies/otp_flow/get_2904b00f_5abcbf894df3_58_configuration.json b/test/replies/otp_flow/get_2904b00f_5abcbf894df3_58_configuration.json deleted file mode 100644 index f0293eaf..00000000 --- a/test/replies/otp_flow/get_2904b00f_5abcbf894df3_58_configuration.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "electionConfig": { - "dbbPublicKey": "033c3412d16dfe523282aac649fa67c29f1b3bb2f078ca0f97587cac12596fdb5a", - "encryptionKey": "032b446afed0c0e43b1084ab31ddbd51f97a816a3cd36f345e2b2464f0c3b53c2c", - "thresholdConfig": { - "encryptionKey": "032b446afed0c0e43b1084ab31ddbd51f97a816a3cd36f345e2b2464f0c3b53c2c", - "threshold": 1, - "trustees": [ - { - "publicKey": "032b446afed0c0e43b1084ab31ddbd51f97a816a3cd36f345e2b2464f0c3b53c2c", - "id": 140, - "polynomialCoefficients": [] - } - ] - }, - "curveName": "secp256r1", - "services": { - "voterAuthorizer": { - "electionContextUuid": "e6eac755-13e1-474f-be69-7015802c326b", - "publicKey": "0282c375316ecca7fa6df85b75a3a0e98464b2626a7ed163db1a98a6e53d446aef", - "url": "http://localhost:3016/voting/2904b00f", - "authorizationMode": "proof-of-election-codes" - }, - "otpProvider": { - "electionContextUuid": "e6eac755-13e1-474f-be69-7015802c326b", - "publicKey": "0282c375316ecca7fa6df85b75a3a0e98464b2626a7ed163db1a98a6e53d446aef", - "url": "http://localhost:3016/voting/2904b00f" - } - }, - "ballotConfigs": { - "58": { - "reference": "58", - "voterGroup": "58", - "contestReferences": [ - "58" - ] - } - }, - "contestConfigs": { - "58": { - "reference": "58", - "markingType": { - "blankSubmission": "active_choice", - "minMarks": 1, - "maxMarks": 1, - "encoding": { - "codeSize": 1, - "maxSize": 1, - "cryptogramCount": 1 - } - }, - "options": [ - { - "reference": "2697429ccf5383ca", - "code": 1, - "title": { - "en": "It tolls for the fallen", - "da": "Den ringer for de faldne", - "de": "Es läutet für die Gefallenen" - } - }, - { - "reference": "cc492280129c70e5", - "code": 2, - "title": { - "en": "It tolls for abandoned", - "da": "Den ringer for de efterladte", - "de": "Es läutet für die Verlassenen" - } - }, - { - "reference": "fa8062a40b66312a", - "code": 3, - "title": { - "en": "It tolls for thee", - "da": "Den ringer for dig", - "de": "Es läutet für dich" - } - } - ], - "title": { - "en": "Example ballot", - "da": "Eksempel valgseddel", - "de": "Beispielwahlzettel" - }, - "resultType": { - "name": "regular" - } - } - }, - "genesisConfig": { - "publicKey": "033c3412d16dfe523282aac649fa67c29f1b3bb2f078ca0f97587cac12596fdb5a", - "authorizationMode": null, - "curveName": "secp256r1" - }, - "latestConfigAddress": "a44fe55d12f09385dd8428a38fc7064d48db7bbe05c65562ede293e465f0111f", - "status": "open", - "sessionTimeout": 5400, - "bcTimeout": 600 - }, - "receipt": "3f96c3fc53836b4607e786f0dd4dc88c79e6db0b5656f223b0a4d6a931ab77c8,6810e439904e9456262a4a042cbc4a838639070238390fafd042c77e679b932f" -} \ No newline at end of file diff --git a/test/replies/otp_flow/get_us_configuration.json b/test/replies/otp_flow/get_us_configuration.json index 8397b13d..7d3225a7 100644 --- a/test/replies/otp_flow/get_us_configuration.json +++ b/test/replies/otp_flow/get_us_configuration.json @@ -1,14 +1,17 @@ { "electionConfig": { - "dbbPublicKey": "035b71d909318bc8c7f9e3ffc8e39942b721e18ecfa972de644afd178ae006b68e", - "encryptionKey": "02df80789b2713ae89c33cb877ce2c2e09b81e33c22d6cfdebc9b352598005661c", + "electionTitle": { + "en": "Some US Election" + }, + "dbbPublicKey": "03e00c01f8f7601f3ab41e32b11072a1e06d4fb743a382b2de1515f3c11d9ac103", + "encryptionKey": "039b810cdd75129ad08422c588b07c2e3458ff6081a93295aecb5708907daa5b3e", "thresholdConfig": { - "encryptionKey": "02df80789b2713ae89c33cb877ce2c2e09b81e33c22d6cfdebc9b352598005661c", + "encryptionKey": "039b810cdd75129ad08422c588b07c2e3458ff6081a93295aecb5708907daa5b3e", "threshold": 1, "trustees": [ { - "publicKey": "02df80789b2713ae89c33cb877ce2c2e09b81e33c22d6cfdebc9b352598005661c", - "id": 4, + "publicKey": "039b810cdd75129ad08422c588b07c2e3458ff6081a93295aecb5708907daa5b3e", + "id": 1, "polynomialCoefficients": [] } ] @@ -16,29 +19,29 @@ "curveName": "secp256k1", "services": { "voterAuthorizer": { - "electionContextUuid": "189d0f1d-5d2a-4a66-aaae-187b6f1afc73", - "publicKey": "02579060d0612d762f21736a30e6f38ba0352377d6d8cce09f95d535c22336381b", + "electionContextUuid": "aece3bc0-aeb8-48c5-9d6e-76d1def60207", + "publicKey": "0310365b9f30e9b393e606efdd85f98af8e398dedb8909ef19c14117c7759ccf29", "url": "http://voter-authorizer:3002/", "authorizationMode": "proof-of-identity" }, "otpProvider": { - "electionContextUuid": "468d1fbb-a53e-42f8-9d43-37be9e72ea7f", - "publicKey": "02c31776fd23004646a5e6554c7fc3087f1f1f23bcfab791e01256655cfc8b78a5", - "url": "http://otp-provider:3001/" + "electionContextUuid": "7f5a5d64-882c-4562-826b-6f9091615c5b", + "publicKey": "02a5c0f01ec0fbb692647484685a1f2b8482c0a62ad93d1d1a972e4f2546ba17c4", + "url": "http://otp:3001/" } }, "ballotConfigs": { - "precinct_4_bedrock": { - "reference": "precinct_4_bedrock", - "voterGroup": "precinct_4_bedrock", + "precinct_3_spaceport": { + "reference": "precinct_3_spaceport", + "voterGroup": "precinct_3_spaceport", "contestReferences": [ "contest ref 1", "contest ref 2" ] }, - "precinct_3_spaceport": { - "reference": "precinct_3_spaceport", - "voterGroup": "precinct_3_spaceport", + "precinct_4_bedrock": { + "reference": "precinct_4_bedrock", + "voterGroup": "precinct_4_bedrock", "contestReferences": [ "contest ref 1", "contest ref 2" @@ -46,8 +49,8 @@ } }, "contestConfigs": { - "contest ref 2": { - "reference": "contest ref 2", + "contest ref 1": { + "reference": "contest ref 1", "markingType": { "blankSubmission": "disabled", "minMarks": 1, @@ -60,36 +63,29 @@ }, "options": [ { - "reference": "option ref 3", + "reference": "option ref 1", "code": 1, "title": { - "en": "Option 3" + "en": "Option 1" } }, { - "reference": "option ref 4", + "reference": "option ref 2", "code": 2, "title": { - "en": "Option 4" - } - }, - { - "reference": "option ref 5", - "code": 3, - "title": { - "en": "Option 5" + "en": "Option 2" } } ], "title": { - "en": "Second ballot" + "en": "First ballot" }, "resultType": { "name": "resultType name not matter right now" } }, - "contest ref 1": { - "reference": "contest ref 1", + "contest ref 2": { + "reference": "contest ref 2", "markingType": { "blankSubmission": "disabled", "minMarks": 1, @@ -102,22 +98,29 @@ }, "options": [ { - "reference": "option ref 1", + "reference": "option ref 3", "code": 1, "title": { - "en": "Option 1" + "en": "Option 3" } }, { - "reference": "option ref 2", + "reference": "option ref 4", "code": 2, "title": { - "en": "Option 2" + "en": "Option 4" + } + }, + { + "reference": "option ref 5", + "code": 3, + "title": { + "en": "Option 5" } } ], "title": { - "en": "First ballot" + "en": "Second ballot" }, "resultType": { "name": "resultType name not matter right now" @@ -125,14 +128,15 @@ } }, "genesisConfig": { - "publicKey": "035b71d909318bc8c7f9e3ffc8e39942b721e18ecfa972de644afd178ae006b68e", + "publicKey": "03e00c01f8f7601f3ab41e32b11072a1e06d4fb743a382b2de1515f3c11d9ac103", "authorizationMode": null, "curveName": "secp256k1" }, - "latestConfigAddress": "4222f8d5e6f5f915cf40734d5ca8f24d32d4b2bb7a63013f7edbc67e5c5d0771", - "status": "open", + "latestConfigAddress": "80cc3dd61a7be05f9f71210e2faf56481f52ba05152a9057ead41450a8fabebb", + "status": "scheduled", "sessionTimeout": 30, - "bcTimeout": 10 + "bcTimeout": 10, + "castRequestItemAttachmentEncryptionKey": "0362fb2a49a54f457e328a35c0dc89be8324435f1c2bdb3ca4438f459040753e5a" }, - "receipt": "44d417eae17effe4fb2a7573a839acfe95f430498a01cd8e44978d2542364907,726716ae59eb16d9f74af7a0e62022faa2b0d6731f2b5022782f3ce67dd6e880" + "receipt": "7c17de09762943b2aa99bbfa9c519a7d69ea5cd7375989382584f929fb919d76,7d96b828d21d12ca85f6091eab22b0f0eb2123fabf857b9f623e827a3c5d48dd" } \ No newline at end of file diff --git a/test/replies/otp_flow/post_2904b00f_5abcbf894df3_58_voting_cast.json b/test/replies/otp_flow/post_2904b00f_5abcbf894df3_58_voting_cast.json deleted file mode 100644 index d09ac0b2..00000000 --- a/test/replies/otp_flow/post_2904b00f_5abcbf894df3_58_voting_cast.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "castRequest": { - "address": "fe71e1685dae6cd23e0dc28222a3330824519b9ecc96ba0c5d9e81dd2fe7799c", - "author": "voter-voter1", - "parentAddress": "e6d3b83eb4ed1bc25a877e679ee9635e672a0fbd1f2b365cf1c0e87a49c70d3a", - "previousAddress": "e6d3b83eb4ed1bc25a877e679ee9635e672a0fbd1f2b365cf1c0e87a49c70d3a", - "content": {}, - "registeredAt": "2022-09-28T09:13:50.826Z", - "signature": "efcad36436a64a1893f5bbd8a63dc108114599337820ab8635e552505f9cac8c,8c5fe17c761d9e4ffe01bf5cc74f436cdcb5dd01349aa858b19bd93eee25c94d", - "type": "CastRequestItem" - }, - "receipt": "b9a95aaa3d7f7987b69215ef294cd6ad266996f6f05a53d9c168d6f69ecfd54f,1b59d21f4bd26020f5e7fcf3a3012026749c26f144f197952542d57921be4927" -} \ No newline at end of file diff --git a/test/replies/otp_flow/post_2904b00f_5abcbf894df3_58_voting_commitments.json b/test/replies/otp_flow/post_2904b00f_5abcbf894df3_58_voting_commitments.json deleted file mode 100644 index 0e0288dd..00000000 --- a/test/replies/otp_flow/post_2904b00f_5abcbf894df3_58_voting_commitments.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "voterCommitment": { - "address": "cb690ab667a4ff31878676d1e4eeb0955980222c215836ce9695a3196a5ee55f", - "author": "voter-voter1", - "parentAddress": "d0dc6df8b1362b0ac488da74da0fe78749777aaa181066eb3dcf0561e13cab34", - "previousAddress": "d0dc6df8b1362b0ac488da74da0fe78749777aaa181066eb3dcf0561e13cab34", - "content": { - "commitment": "037f6f517ce249e345ecbf750cd39d65971baf3186178854bec5779ac339922241" - }, - "registeredAt": "2022-09-28T09:13:50.492Z", - "signature": "6a71dadecb24f8d7aa17d0d45978ffdee7511519604a9579db2ec8a4d10231b8,abdd4cfb83bede9017b97be12261d03149859407d4e267a5906be5d1f58e690d", - "type": "VoterEncryptionCommitmentItem" - }, - "boardCommitment": { - "address": "a70c574a30ebcaf9a30635e18489ba077f233822ca86611ec2d7b86fb37237a3", - "author": "Digital Ballot Box", - "parentAddress": "cb690ab667a4ff31878676d1e4eeb0955980222c215836ce9695a3196a5ee55f", - "previousAddress": "cb690ab667a4ff31878676d1e4eeb0955980222c215836ce9695a3196a5ee55f", - "content": { - "commitment": "03a6514e3f571e848309cfe5372296b599b6235d91a579a03c429662f83a5503e3" - }, - "registeredAt": "2022-09-28T09:13:50.519Z", - "signature": "989a9bd0f167d6ce393503d7eeb5c5fc5a63ec0b872876c7bf88cbe853c3e5b9,ba530c03429d0abf5981695ebf49a0b3050f54a5239a00dc9f41753517bc1566", - "type": "BoardEncryptionCommitmentItem" - }, - "envelopes": { - "58": [ - "020da366bd89a39c0d39aacb802e963c4605d46b43d50ef12ffbee8cec2715ef3c,03e4a6c63be485b8d7a154da1381389342680ec6d7f86ef551a0d29d4dab4edeee" - ] - }, - "receipt": "88fa2bec1b0c1ac1d7c317c581e819528a7ba8987f52b5c0b5283fe6df902d0b,fc6e4195eb27cedcd04be67f49a5d2e613954318afea0e36cc4d15d7c59951e9" -} \ No newline at end of file diff --git a/test/replies/otp_flow/post_2904b00f_5abcbf894df3_58_voting_registrations.json b/test/replies/otp_flow/post_2904b00f_5abcbf894df3_58_voting_registrations.json deleted file mode 100644 index 0cbb2294..00000000 --- a/test/replies/otp_flow/post_2904b00f_5abcbf894df3_58_voting_registrations.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "voterSession": { - "address": "d0dc6df8b1362b0ac488da74da0fe78749777aaa181066eb3dcf0561e13cab34", - "author": "Digital Ballot Box", - "parentAddress": "a44fe55d12f09385dd8428a38fc7064d48db7bbe05c65562ede293e465f0111f", - "previousAddress": "c2982e30add8a244ce2b0ae7ca54c0aa86fe7df768c5c69209c3804f7eb0ad1f", - "content": { - "authToken": "eyJhbGciOiJFUzI1NiJ9.eyJpZGVudGlmaWVyIjoidm90ZXIxIiwicHVibGljX2tleSI6IjAyOTBkNDEwYTdkMjU0MTFiZGQzZDgyYWNlNWY3MDdkMDJjMDU0YjYwZTdkYzg4ODNjMWYwN2JlNDI2NTcwNGRkNiIsInZvdGVyX2dyb3VwX2tleSI6IjU4Iiwid2VpZ2h0IjoxLCJmaW5nZXJwcmludCI6IjkxMDI3NTM2NDdhNWZmMTRhMDIyNWM4MmFiMjY4ZTMxNGI2ZmM5MzRhY2M0YzViZjFlZDlkOTk5NWUxZjQ4ZTAiLCJpYXQiOjE2NjQzNTY0MzAsImV4cCI6MTY2NDM1ODIzMH0.jW8kH0c68P-qqyH-V3VFUrzcrKK9Cih6UFtwyryNwR4WOSJsaKimpEzGfTMq8a0KNY2fVxE8hQIpwLuKSrFyAQ", - "identifier": "voter1", - "voterGroup": "58", - "weight": 1, - "publicKey": "0290d410a7d25411bdd3d82ace5f707d02c054b60e7dc8883c1f07be4265704dd6" - }, - "registeredAt": "2022-09-28T09:13:50.333Z", - "signature": "2a58829e25d7b930bed6e53707b61e3aeb92fb044fa2531885827f8ae3b82c82,12d28b6d55f5c644b138e8d893d1d71e0f5a384823d123f014bfd5018e50862e", - "type": "VoterSessionItem" - }, - "receipt": "5949b59c5078f39cdc9a0e661ee7d7b1ea2ad14474215d400e2806b801211389,5d3f610c05d7074fa3f7c9889f575c44b0d0a99b82ade21109f9ba20a38941f7" -} \ No newline at end of file diff --git a/test/replies/otp_flow/post_2904b00f_5abcbf894df3_58_voting_votes.json b/test/replies/otp_flow/post_2904b00f_5abcbf894df3_58_voting_votes.json deleted file mode 100644 index 33b2b5f6..00000000 --- a/test/replies/otp_flow/post_2904b00f_5abcbf894df3_58_voting_votes.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "vote": { - "address": "e6d3b83eb4ed1bc25a877e679ee9635e672a0fbd1f2b365cf1c0e87a49c70d3a", - "author": "voter-voter1", - "parentAddress": "a70c574a30ebcaf9a30635e18489ba077f233822ca86611ec2d7b86fb37237a3", - "previousAddress": "a70c574a30ebcaf9a30635e18489ba077f233822ca86611ec2d7b86fb37237a3", - "content": { - "cryptograms": { - "58": [ - "02c17f10f66bb15d0558b21b2a774ce7dce9a98305fffd9e1e519f451585c6ad61,034f3764f8883332e6cabbb95441c54dc0929d378e1a6531aa24846d9412b3852d" - ] - } - }, - "registeredAt": "2022-09-28T09:13:50.661Z", - "signature": "ea113292ba1c588f396dc26e885ccc9e9bfe73b2aa9f3bb06f4ae5ef3a48b148,ec39963c60dcc19518206053ed00257a3d21a1d4e8d1f5a043028617e5139b41", - "type": "BallotCryptogramsItem" - }, - "verification": { - "author": "033c3412d16dfe523282aac649fa67c29f1b3bb2f078ca0f97587cac12596fdb5a", - "address": "68844a50973238088ff503270ec659c970c54b6780126da8a236c7bf74608d2b", - "shortAddress": "68844a5097", - "parentAddress": "e6d3b83eb4ed1bc25a877e679ee9635e672a0fbd1f2b365cf1c0e87a49c70d3a", - "type": "VerificationStartItem", - "content": {}, - "signature": "17d0168d6a934b0519ee8a22490793282ceb2c23f12adf086841d2a5ad5396a2,90af941f555d6eb8253ff5d76f788680b7ad4bca45968aeeb8d2e05fb210c050", - "registeredAt": "2022-09-28T09:13:50.684Z" - }, - "receipt": "fbd93a679c1bbccdf7d749abd7df256309972f533fe5333984d42bf6673b34c9,cbf4cd3f479b1a521408f1b96f16da349a32cf648e6bd9eb7ea6390dbc7cb9a1" -} \ No newline at end of file diff --git a/test/replies/otp_flow/post_authorize.json b/test/replies/otp_flow/post_authorize.json index b2b85faa..6d3aeb63 100644 --- a/test/replies/otp_flow/post_authorize.json +++ b/test/replies/otp_flow/post_authorize.json @@ -1,3 +1,3 @@ { - "emailConfirmationToken": "eyJhbGciOiJFUzI1NiJ9.eyJlbWFpbCI6Im1hcmtpdG1hcmNodGVzdEBvc2V0aW5zdGl0dXRlLm9yZyIsImF1ZCI6InZhOjE4OWQwZjFkLTVkMmEtNGE2Ni1hYWFlLTE4N2I2ZjFhZmM3MyIsImlhdCI6MTY2NDM1MTQ3NCwiZXhwIjoxNjY0MzUzMjc0fQ.tQEDkSZ-15qkGnr8pcVzAkoStHqX9k5GcjDN3aAtJW02tphG791Iy0IGXfVQB70V_l2jFtQJhGf0mUwXtNzmYQ" + "emailConfirmationToken": "eyJhbGciOiJFUzI1NiJ9.eyJlbWFpbCI6Im1hZGNAYXNzZW1ibHl2b3RpbmcuY29tIiwiYXVkIjoidmE6YWVjZTNiYzAtYWViOC00OGM1LTlkNmUtNzZkMWRlZjYwMjA3IiwiaWF0IjoxNjY5ODE1NDcyLCJleHAiOjE2Njk4MTcyNzJ9.l-OriPDNMJMoWUfW5-jaW-TNTZR3Qq2V2_n9FTn6GRPN12ENEV36qKEO9Bfijf0Oo32TppCl0bSWzPJicCPudA" } \ No newline at end of file diff --git a/test/replies/otp_flow/post_create_session.json b/test/replies/otp_flow/post_create_session.json index a7a9ccfa..439636d6 100644 --- a/test/replies/otp_flow/post_create_session.json +++ b/test/replies/otp_flow/post_create_session.json @@ -1,3 +1,3 @@ { - "sessionId": "66424d96-94be-4ef7-ad1f-64e1385bb0f1" + "sessionId": "0d2e6e17-0edf-482c-a74b-d48e95da6cc8" } \ No newline at end of file diff --git a/test/replies/otp_flow/post_request_authorization.json b/test/replies/otp_flow/post_request_authorization.json index 53dd1c0a..7015f465 100644 --- a/test/replies/otp_flow/post_request_authorization.json +++ b/test/replies/otp_flow/post_request_authorization.json @@ -1,3 +1,3 @@ { - "authToken": "eyJhbGciOiJFUzI1NiJ9.eyJpZGVudGlmaWVyIjoiZTQwZWMxODVmY2MyZThhODNlMjViYzllODJlZTkzMjYyYzAxNTk5ZSIsInB1YmxpY19rZXkiOiIwM2I4N2Q3ZmU3OTNhNjIxZGYyN2Y0NGMyMGY0NjBmZjcxMWQ1NTU0NWM1ODcyOWYyMGIzZmI2ZTg3MWM1M2M0OWMiLCJ2b3Rlcl9ncm91cF9rZXkiOiJwcmVjaW5jdF80X2JlZHJvY2siLCJzZWdtZW50MSI6InByZWNpbmN0XzRfYmVkcm9jayIsImVjX3Rva2VuX2ZpbmdlcnByaW50IjoiNTU4NzBlNGVjMDVlNDA0NzIxMzQyZWVkYTEzOWM4YjE1NTUwNGU3ZSIsImF1ZCI6ImF2eDpiYzFiMWVkMC05NDNlLTQ2NDctYmZjMS0wNjMzYmEwOGMwNWUiLCJpYXQiOjE2NjQzNTE0NzQsImV4cCI6MTY2NDM1MzI3NH0.HsAkaLkUWe_n7ZRRuNAbBPn1bq8BLQLJLEZTwBAyDnUrmHXPuvH6ibKif3Tc_nr3KncSgGamxnpL_ZmUMlfrKw" + "authToken": "eyJhbGciOiJFUzI1NiJ9.eyJpZGVudGlmaWVyIjoiMWViYWQ2NzkyZGZjNmNiOGM1MDAwZmFjZTk4MWQ4MmYxYzViY2IyMyIsInB1YmxpY19rZXkiOiIwM2I4N2Q3ZmU3OTNhNjIxZGYyN2Y0NGMyMGY0NjBmZjcxMWQ1NTU0NWM1ODcyOWYyMGIzZmI2ZTg3MWM1M2M0OWMiLCJ2b3Rlcl9ncm91cF9rZXkiOiJwcmVjaW5jdF80X2JlZHJvY2siLCJzZWdtZW50MSI6InByZWNpbmN0XzRfYmVkcm9jayIsImVjX3Rva2VuX2ZpbmdlcnByaW50IjoiNjQzOTA1ZWQyM2EwNzRhMjFjMmVkNjIwNGE1N2UzMjMxNWEwY2U0OCIsImF1ZCI6ImF2eDpiYzFiMWVkMC05NDNlLTQ2NDctYmZjMS0wNjMzYmEwOGMwNWUiLCJpYXQiOjE2Njk4MTU0NzIsImV4cCI6MTY2OTgxNzI3Mn0.s5Mr6l7Zlg9djsCz6B2vIKBVdEr2R2sTLeunCb8wsudKLfmPrb3eIl1ivQq0iNESTQ9IPiAAkPHDTz72CVPY_w" } \ No newline at end of file diff --git a/test/replies/otp_flow/post_us_voting_cast.json b/test/replies/otp_flow/post_us_voting_cast.json index 84180668..758ffcdf 100644 --- a/test/replies/otp_flow/post_us_voting_cast.json +++ b/test/replies/otp_flow/post_us_voting_cast.json @@ -1,13 +1,15 @@ { "castRequest": { - "address": "981bc744bfbbd5c04fb2384e751b09e4580994a076cf7b8465bb8dd30b409c05", - "author": "voter-e40ec185fcc2e8a83e25bc9e82ee93262c01599e", - "parentAddress": "0093512e06c19010cdc41366c1d4b6c9934446161604293d7ceee7338e8bc6e6", - "previousAddress": "0093512e06c19010cdc41366c1d4b6c9934446161604293d7ceee7338e8bc6e6", - "content": {}, - "registeredAt": "2022-09-28T07:51:15.306Z", - "signature": "61885774389d29ed68ff62cbd073c96895decfde15ed77cae32e4ea7d8237b11,588cbd9257bb66bb991b8367e30b9c4bf6a93f2bfdb1582ea41b611d8dff7cc5", + "address": "2bf4952ac8a12b62fa442ef7dbb48029784f96f828009ba6b79718b8d56fc393", + "author": "voter-1ebad6792dfc6cb8c5000face981d82f1c5bcb23", + "parentAddress": "8b8f177c7e2c20af3451825654aac43d87e28de8886f716eee1bce9288a22ba0", + "previousAddress": "8b8f177c7e2c20af3451825654aac43d87e28de8886f716eee1bce9288a22ba0", + "content": { + "attachment": "6f750ad56fff25379605f2d2fa5536f71d5bbf8c3b12f180189c4d83e9e5c29a" + }, + "registeredAt": "2022-11-30T13:37:52.878Z", + "signature": "7eb41e7f6a67b3c9ea38fd677379c0c7ed1632bc54f58ff07ca8850725726183,52e463a7185b25308259304a1bc2c9a412090dbd5fd0145b730d88eefcfdd98c", "type": "CastRequestItem" }, - "receipt": "5a03c439a9451a539a6e5f89e90d2bf045db5d1d5a24877bfed2ea120a2b1334,d9a0423a17eefaace71ba25d2c4c2dfd9fa12084b6d9a9834bf4e4b7ac4d94cd" + "receipt": "89bb9c09d66a72d22b37a9280d833957aea1aa479be3ec134d33ab1300f5362e,37428cd1b523aaea92bf0c63e2d23f635735ab3f4153689ea8f4ec5a9abb8cb8" } \ No newline at end of file diff --git a/test/replies/otp_flow/post_us_voting_commitments.json b/test/replies/otp_flow/post_us_voting_commitments.json index c21314ba..b1603599 100644 --- a/test/replies/otp_flow/post_us_voting_commitments.json +++ b/test/replies/otp_flow/post_us_voting_commitments.json @@ -1,35 +1,35 @@ { "voterCommitment": { - "address": "5984ce9bb7bd522026c7cbcb14f4a069b077c49bf775dfa8962ffe096d754d02", - "author": "voter-e40ec185fcc2e8a83e25bc9e82ee93262c01599e", - "parentAddress": "06cc5a5a2faafac26cf68d3088a853b52e980eb138d161b223f403b5f1d36868", - "previousAddress": "06cc5a5a2faafac26cf68d3088a853b52e980eb138d161b223f403b5f1d36868", + "address": "4510fd22775190f32dc626c1f1ba54558edb2a8db439d58f8f0da38fd61d79e9", + "author": "voter-1ebad6792dfc6cb8c5000face981d82f1c5bcb23", + "parentAddress": "f8029a41bc9d928cf32ab12f1624d57cda3be950cad70d08f7aeee4bea0d1ca8", + "previousAddress": "f8029a41bc9d928cf32ab12f1624d57cda3be950cad70d08f7aeee4bea0d1ca8", "content": { "commitment": "0332f1125dd7f4315649b9341829fd4ad5ae6f3dc563b0b1615a918cf9fa54a1ec" }, - "registeredAt": "2022-09-28T07:51:14.892Z", - "signature": "e1d7c5ed96e4349b5bf9a30b1154d2c9758c21f135a32fda19e5b032625c22,c1c2b4ddceafc37c5af95877206d9de829a5a91955bdfec069960406a27592a6", + "registeredAt": "2022-11-30T13:37:52.409Z", + "signature": "0b9f81734e4419b2a37a76ae727921b5673f2a4baffd3f3ed0719e434a92b056,0f4b86224e5973201ddbaa78d0d744bbea4e949fee2bbb06c6f665316b5031b6", "type": "VoterEncryptionCommitmentItem" }, "boardCommitment": { - "address": "7d46db9258128efa0bc664f3ccc6a224d70995f558525323ad005d3cdcfc9404", + "address": "cc9a2c322f8441c25317481342e3fe4d02f1679e17c5be99862710ea03dbf70c", "author": "Digital Ballot Box", - "parentAddress": "5984ce9bb7bd522026c7cbcb14f4a069b077c49bf775dfa8962ffe096d754d02", - "previousAddress": "5984ce9bb7bd522026c7cbcb14f4a069b077c49bf775dfa8962ffe096d754d02", + "parentAddress": "4510fd22775190f32dc626c1f1ba54558edb2a8db439d58f8f0da38fd61d79e9", + "previousAddress": "4510fd22775190f32dc626c1f1ba54558edb2a8db439d58f8f0da38fd61d79e9", "content": { - "commitment": "02d741e7ea3ca45bca4f3a8b7aad151e2bd96672d6d521c1a9740828606f8784e0" + "commitment": "032403eb019f5ec2649c942f17fdc008850ce17055fe805a442e6c171640a301fc" }, - "registeredAt": "2022-09-28T07:51:14.933Z", - "signature": "4dda03439a21083af377bca32c16bf112e5e9c096cdecf892ccd523bf2210f70,c8bb6b1d6a5a6169f70482d4754d80c084c7c4d38e40c258614d805e97f679e4", + "registeredAt": "2022-11-30T13:37:52.461Z", + "signature": "4bad0f65ea0f3c653b57df4a8811655d8dad747e1ffd06edb734cd847cdf8bf9,963a0164331725f2bccdbb0e40a7a52ddc0640510034c127b80c7e135c4f15c7", "type": "BoardEncryptionCommitmentItem" }, "envelopes": { "contest ref 1": [ - "0270434da5e40834ec77d4b36e04edacfea2dcc78c459422ec4e1a67f21940c3f2,02284a3b9fcf58132922b0ea455bc8b7e0aa5ab44158e4138b0e238acb4010410c" + "02691ccabe8c31a86a8448855bdb6b0b089852b1a52d1d111603e4f15daa46c7c7,0345e78f95e940b64e150a09c94a6abdc20b614a4ad698410ecd91b16bad0b5703" ], "contest ref 2": [ - "02a2835a0dd76900dc7cfe54d855d4916956419304a539a2a3d375f5b14a6327c5,02ea5009f66b5b379474f159a61f2b4054f1b5f03c85b0a3f316eb7e80be7f9ef7" + "033045066d3184d3251dbe436024441b15d5fe8a8124c7f8a17da00c7ac5402448,027f0c1fdf346ad331c8a08d3901c8e4a82415b53a5e8a6d0336a72313a18fc8ea" ] }, - "receipt": "5b0ef1e2177f658ee2776789cac87520f7b519b395eb77932ab1f0d09ddb75b9,0d5df517c2045fdc5e7f03372785ca86fe831be543f1604d1e2a93a8860f38e3" + "receipt": "607ce38a0d989fa28882babe348dedf47eb736adffa68719688582f27178f6bb,152174083172833a7e0b4ae2cdac692df110f2c073e85ec2d3035ea06d94830a" } \ No newline at end of file diff --git a/test/replies/otp_flow/post_us_voting_registrations.json b/test/replies/otp_flow/post_us_voting_registrations.json index a955c981..ba1a8cd5 100644 --- a/test/replies/otp_flow/post_us_voting_registrations.json +++ b/test/replies/otp_flow/post_us_voting_registrations.json @@ -1,19 +1,19 @@ { "voterSession": { - "address": "06cc5a5a2faafac26cf68d3088a853b52e980eb138d161b223f403b5f1d36868", + "address": "f8029a41bc9d928cf32ab12f1624d57cda3be950cad70d08f7aeee4bea0d1ca8", "author": "Digital Ballot Box", - "parentAddress": "4222f8d5e6f5f915cf40734d5ca8f24d32d4b2bb7a63013f7edbc67e5c5d0771", - "previousAddress": "2317fcfe1abe5f1564ff5e3e599a96228039aa867bd851298fe74856d39dd400", + "parentAddress": "80cc3dd61a7be05f9f71210e2faf56481f52ba05152a9057ead41450a8fabebb", + "previousAddress": "77fe4818f58c28360bafa1eabc757537faa32066add04960e00ebfd045cc024e", "content": { - "authToken": "eyJhbGciOiJFUzI1NiJ9.eyJpZGVudGlmaWVyIjoiZTQwZWMxODVmY2MyZThhODNlMjViYzllODJlZTkzMjYyYzAxNTk5ZSIsInB1YmxpY19rZXkiOiIwM2I4N2Q3ZmU3OTNhNjIxZGYyN2Y0NGMyMGY0NjBmZjcxMWQ1NTU0NWM1ODcyOWYyMGIzZmI2ZTg3MWM1M2M0OWMiLCJ2b3Rlcl9ncm91cF9rZXkiOiJwcmVjaW5jdF80X2JlZHJvY2siLCJzZWdtZW50MSI6InByZWNpbmN0XzRfYmVkcm9jayIsImVjX3Rva2VuX2ZpbmdlcnByaW50IjoiNTU4NzBlNGVjMDVlNDA0NzIxMzQyZWVkYTEzOWM4YjE1NTUwNGU3ZSIsImF1ZCI6ImF2eDpiYzFiMWVkMC05NDNlLTQ2NDctYmZjMS0wNjMzYmEwOGMwNWUiLCJpYXQiOjE2NjQzNTE0NzQsImV4cCI6MTY2NDM1MzI3NH0.HsAkaLkUWe_n7ZRRuNAbBPn1bq8BLQLJLEZTwBAyDnUrmHXPuvH6ibKif3Tc_nr3KncSgGamxnpL_ZmUMlfrKw", - "identifier": "e40ec185fcc2e8a83e25bc9e82ee93262c01599e", + "authToken": "eyJhbGciOiJFUzI1NiJ9.eyJpZGVudGlmaWVyIjoiMWViYWQ2NzkyZGZjNmNiOGM1MDAwZmFjZTk4MWQ4MmYxYzViY2IyMyIsInB1YmxpY19rZXkiOiIwM2I4N2Q3ZmU3OTNhNjIxZGYyN2Y0NGMyMGY0NjBmZjcxMWQ1NTU0NWM1ODcyOWYyMGIzZmI2ZTg3MWM1M2M0OWMiLCJ2b3Rlcl9ncm91cF9rZXkiOiJwcmVjaW5jdF80X2JlZHJvY2siLCJzZWdtZW50MSI6InByZWNpbmN0XzRfYmVkcm9jayIsImVjX3Rva2VuX2ZpbmdlcnByaW50IjoiNjQzOTA1ZWQyM2EwNzRhMjFjMmVkNjIwNGE1N2UzMjMxNWEwY2U0OCIsImF1ZCI6ImF2eDpiYzFiMWVkMC05NDNlLTQ2NDctYmZjMS0wNjMzYmEwOGMwNWUiLCJpYXQiOjE2Njk4MTU0NzIsImV4cCI6MTY2OTgxNzI3Mn0.s5Mr6l7Zlg9djsCz6B2vIKBVdEr2R2sTLeunCb8wsudKLfmPrb3eIl1ivQq0iNESTQ9IPiAAkPHDTz72CVPY_w", + "identifier": "1ebad6792dfc6cb8c5000face981d82f1c5bcb23", "voterGroup": "precinct_4_bedrock", "weight": 1, "publicKey": "03b87d7fe793a621df27f44c20f460ff711d55545c58729f20b3fb6e871c53c49c" }, - "registeredAt": "2022-09-28T07:51:14.654Z", - "signature": "4b011631a60dce92c750e12033f7fb05470737cc5621d242ec7cc86e63e5b7fd,18f81cd4cb036a3f1bb09748832bb749449ff888986700e916166513220ff982", + "registeredAt": "2022-11-30T13:37:52.099Z", + "signature": "346358acece90d1ec334297df395689a523fac747ef46321dbeac648803bd7a8,30f9ff0bf89e91e49b7bd44c658e5da20ec35a88a0c84414f73991bbcdd1b894", "type": "VoterSessionItem" }, - "receipt": "2a3d7431079eca1163c817dfc56ee5ee3aa0232cfa3f944343d487b3392ea64a,ede21da18a11af6d92b8ea50add777d5e9f42aa65f5f85bed266781249227dbb" + "receipt": "3802998522cc1b5c6f2955731c4b84226223c34c714f2cb09b7bf07755a5a6f4,bf06f5afe91e9f393c886fea0beafac65891f1ead23e645b4ce7cd33abfe1223" } \ No newline at end of file diff --git a/test/replies/otp_flow/post_us_voting_votes.json b/test/replies/otp_flow/post_us_voting_votes.json index 2c2ce682..877678af 100644 --- a/test/replies/otp_flow/post_us_voting_votes.json +++ b/test/replies/otp_flow/post_us_voting_votes.json @@ -1,32 +1,32 @@ { "vote": { - "address": "0093512e06c19010cdc41366c1d4b6c9934446161604293d7ceee7338e8bc6e6", - "author": "voter-e40ec185fcc2e8a83e25bc9e82ee93262c01599e", - "parentAddress": "7d46db9258128efa0bc664f3ccc6a224d70995f558525323ad005d3cdcfc9404", - "previousAddress": "7d46db9258128efa0bc664f3ccc6a224d70995f558525323ad005d3cdcfc9404", + "address": "8b8f177c7e2c20af3451825654aac43d87e28de8886f716eee1bce9288a22ba0", + "author": "voter-1ebad6792dfc6cb8c5000face981d82f1c5bcb23", + "parentAddress": "cc9a2c322f8441c25317481342e3fe4d02f1679e17c5be99862710ea03dbf70c", + "previousAddress": "cc9a2c322f8441c25317481342e3fe4d02f1679e17c5be99862710ea03dbf70c", "content": { "cryptograms": { "contest ref 1": [ - "03395630b5f131856a9d98d46083a83102fbc7943b344a1bbca251e22eee25abe1,02842c89d9f7bc46ea73cf14b486b6696f5ea534c7be1f9d9f272466f259ed26bd" + "025f9e9aede4a5cb6bf6753556c0e61ddb495aa004123e6e4e67b1673579e66258,03efcd4645fedfe1f8a71738bfb83e1a844c5a294235243e8e2b8ddee6b55aa677" ], "contest ref 2": [ - "039f40d6bab637f004c9befb99bf108254b5e6c0888f677831cc4ba0659c17b4f0,02506fe6bc01869a36313c5a3a0399e2120d7d27f13e4b4f281bf8d0b79db46172" + "033ce7016307774cda9c67297ed5926ee5ca54e4aae99783f030238074ca0e4a0c,039eeed8bd004bd1a3aea19bf4fff34c9bb1a3f8221cfd7a60d8dd42f8ee6a68d6" ] } }, - "registeredAt": "2022-09-28T07:51:15.174Z", - "signature": "92e8f04f5c92d60c1aec35edf13f765bbbe678ff3cd584f8276a2c2f31905bac,d200ad9e3fc90d272d49f0e10352b9c85e2337bd8c223737bcebbbaab682667b", + "registeredAt": "2022-11-30T13:37:52.703Z", + "signature": "a6a43a9c879b78c127f2c8a73c3e4a97469a7eb5c49bf6680cf95741f46bf3ad,e8cc856c259db5fb1e13521e723dbff7f19e42932d247084beacc5f738976c7f", "type": "BallotCryptogramsItem" }, "verification": { - "author": "035b71d909318bc8c7f9e3ffc8e39942b721e18ecfa972de644afd178ae006b68e", - "address": "42544391c0ec561c38e40ca4fddb2f6034aa1c660bce344f5ac25e78172ba288", - "shortAddress": "42544391c0", - "parentAddress": "0093512e06c19010cdc41366c1d4b6c9934446161604293d7ceee7338e8bc6e6", + "author": "03e00c01f8f7601f3ab41e32b11072a1e06d4fb743a382b2de1515f3c11d9ac103", + "address": "e8721218f35341fa5cbe435acab9099553003a008d69e9afe1077beca8629f2c", + "shortAddress": "e8721218f3", + "parentAddress": "8b8f177c7e2c20af3451825654aac43d87e28de8886f716eee1bce9288a22ba0", "type": "VerificationStartItem", "content": {}, - "signature": "280f0e73f6934af94c22b5e512ae088e63f051f695e5f7ba466225192fd0fb37,01e2c2cf4d0a395ac64fee62d866d13b0ce2e236d3d6b0cedc20bead6fd9cfc6", - "registeredAt": "2022-09-28T07:51:15.205Z" + "signature": "e77db1ed22ece960b0d643d1de327b0460f5ab9bcf6a4a52e7f8cce9feb5d2aa,f328ae638154199e966e857277e19b2978d33ec156a1a6bbd5f93da56b311a86", + "registeredAt": "2022-11-30T13:37:52.731Z" }, - "receipt": "8ea1b344dfa0bd028accdd669153d6c97557576b4ecb9bb4cc3723b4f240062a,174ac7583c120d4c576874a57ccd9643627ea16520a129a62a1cc50704604926" + "receipt": "ca1e71b4ea9ea74803bfe34bc2d6474e848b9d36f8535e33dad3916a654f3db6,ca7c8808935c6ba21eb6f21f38bee60f9fa64ce01df1201e668346e2f905707b" } \ No newline at end of file diff --git a/test/replies/otp_flow/post_voting_2904b00f_authorize_proof.json b/test/replies/otp_flow/post_voting_2904b00f_authorize_proof.json deleted file mode 100644 index 71404f93..00000000 --- a/test/replies/otp_flow/post_voting_2904b00f_authorize_proof.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "authToken": "eyJhbGciOiJFUzI1NiJ9.eyJpZGVudGlmaWVyIjoidm90ZXIxIiwicHVibGljX2tleSI6IjAyOTBkNDEwYTdkMjU0MTFiZGQzZDgyYWNlNWY3MDdkMDJjMDU0YjYwZTdkYzg4ODNjMWYwN2JlNDI2NTcwNGRkNiIsInZvdGVyX2dyb3VwX2tleSI6IjU4Iiwid2VpZ2h0IjoxLCJmaW5nZXJwcmludCI6IjkxMDI3NTM2NDdhNWZmMTRhMDIyNWM4MmFiMjY4ZTMxNGI2ZmM5MzRhY2M0YzViZjFlZDlkOTk5NWUxZjQ4ZTAiLCJpYXQiOjE2NjQzNTY0MzAsImV4cCI6MTY2NDM1ODIzMH0.jW8kH0c68P-qqyH-V3VFUrzcrKK9Cih6UFtwyryNwR4WOSJsaKimpEzGfTMq8a0KNY2fVxE8hQIpwLuKSrFyAQ" -} \ No newline at end of file diff --git a/test/walkthrough.test.ts b/test/walkthrough.test.ts index 448bccbe..40753817 100644 --- a/test/walkthrough.test.ts +++ b/test/walkthrough.test.ts @@ -54,7 +54,7 @@ describe('entire voter flow using OTP authorization', () => { }); const voterId = 'B00000000001' - const voterEmail = 'markitmarchtest@osetinstitute.org' + const voterEmail = 'madc@assemblyvoting.com' await client.requestAccessCode(voterId, voterEmail).catch((e) => { console.error(e); expect.fail('AVClient#requestAccessCode failed.'); @@ -62,7 +62,7 @@ describe('entire voter flow using OTP authorization', () => { let oneTimePassword: string; if (USE_MOCK) { - oneTimePassword = '12345'; + oneTimePassword = '89656'; } else { oneTimePassword = await extractOTPFromEmail(); } @@ -130,7 +130,8 @@ describe('entire voter flow using OTP authorization', () => { } }); -describe('entire voter flow using PoEC authorization', () => { +// TODO: Regenerate replies when js-client will be switched to /:election_slug/configuration/latest_config endpoint +xdescribe('entire voter flow using PoEC authorization', () => { let sandbox; let expectedNetworkRequests : nock.Scope[] = []; @@ -160,8 +161,8 @@ describe('entire voter flow using PoEC authorization', () => { const performTest = async () => { const client = new AVClient(bulletinBoardHost + '2904b00f_5abcbf894df3_58'); await client.initialize(undefined, { - privateKey: 'a259f4b44e30abc0cd53379381bdc86f44723911a5bc03bf4ff21d1b49b53efd', - publicKey: '0290d410a7d25411bdd3d82ace5f707d02c054b60e7dc8883c1f07be4265704dd6' + privateKey: 'bcafc67ca4af6b462f60d494adb675d8b1cf57b16dfd8d110bbc2453709999b0', + publicKey: '03b87d7fe793a621df27f44c20f460ff711d55545c58729f20b3fb6e871c53c49c' });