diff --git a/src/auth/index.ts b/src/auth/index.ts index 655662c..7f0d072 100644 --- a/src/auth/index.ts +++ b/src/auth/index.ts @@ -61,12 +61,12 @@ export class Auth { revocationKey: registerDetails.keys.revocationCertificate, keys: { ecc: { - privateKey: registerDetails.keys.ecc.privateKeyEncrypted, publicKey: registerDetails.keys.ecc.publicKey, + privateKeyEncrypted: registerDetails.keys.ecc.privateKeyEncrypted, }, kyber: { - privateKey: registerDetails.keys.kyber.privateKeyEncrypted, publicKey: registerDetails.keys.kyber.publicKey, + privateKeyEncrypted: registerDetails.keys.kyber.privateKeyEncrypted, } }, referral: registerDetails.referral, @@ -100,12 +100,12 @@ export class Auth { revocationKey: registerDetails.keys.revocationCertificate, keys: { ecc: { - privateKey: registerDetails.keys.ecc.privateKeyEncrypted, publicKey: registerDetails.keys.ecc.publicKey, + privateKeyEncrypted: registerDetails.keys.ecc.privateKeyEncrypted, }, kyber: { - privateKey: registerDetails.keys.kyber.privateKeyEncrypted, publicKey: registerDetails.keys.kyber.publicKey, + privateKeyEncrypted: registerDetails.keys.kyber.privateKeyEncrypted, }, }, referral: registerDetails.referral, @@ -181,12 +181,12 @@ export class Auth { revocateKey: keys.revocationCertificate, keys: { ecc: { - privateKey: keys.ecc.privateKeyEncrypted, publicKey: keys.ecc.publicKey, + privateKeyEncrypted: keys.ecc.privateKeyEncrypted, }, kyber: { - privateKey: keys.kyber.privateKeyEncrypted, publicKey: keys.kyber.publicKey, + privateKeyEncrypted: keys.kyber.privateKeyEncrypted, } }, }, @@ -216,12 +216,12 @@ export class Auth { privateKey: keys.privateKeyEncrypted, revocationKey: keys.revocationCertificate, ecc: { - privateKey: keys.ecc.privateKeyEncrypted, publicKey: keys.ecc.publicKey, + privateKeyEncrypted: keys.ecc.privateKeyEncrypted, }, kyber: { - privateKey: keys.kyber.privateKeyEncrypted, publicKey: keys.kyber.publicKey, + privateKeyEncrypted: keys.kyber.privateKeyEncrypted, } }, this.headersWithToken(token), diff --git a/src/auth/types.ts b/src/auth/types.ts index 25a42cf..4cb8d4b 100644 --- a/src/auth/types.ts +++ b/src/auth/types.ts @@ -37,8 +37,8 @@ export interface Keys { publicKey: string; revocationCertificate: string; ecc: { - privateKeyEncrypted: string; publicKey: string; + privateKeyEncrypted: string; }; kyber: { publicKey: string | null; diff --git a/src/shared/types/userSettings.ts b/src/shared/types/userSettings.ts index 9a773fb..d2e3b11 100644 --- a/src/shared/types/userSettings.ts +++ b/src/shared/types/userSettings.ts @@ -23,12 +23,12 @@ export interface UserSettings { revocationKey: string; keys: { ecc: { - privateKey: string; publicKey: string; + privateKeyEncrypted: string; } kyber: { - privateKey: string; publicKey: string; + privateKeyEncrypted: string; } } teams?: boolean; diff --git a/test/auth/index.test.ts b/test/auth/index.test.ts index e8b81a2..03634df 100644 --- a/test/auth/index.test.ts +++ b/test/auth/index.test.ts @@ -54,12 +54,12 @@ describe('# auth service tests', () => { revocationKey: registerDetails.keys.revocationCertificate, keys: { ecc: { - privateKey: registerDetails.keys.ecc.privateKeyEncrypted, publicKey: registerDetails.keys.ecc.publicKey, + privateKeyEncrypted: registerDetails.keys.ecc.privateKeyEncrypted, }, kyber: { - privateKey: registerDetails.keys.kyber.privateKeyEncrypted, publicKey: registerDetails.keys.kyber.publicKey, + privateKeyEncrypted: registerDetails.keys.kyber.privateKeyEncrypted, }, }, referral: registerDetails.referral, @@ -128,12 +128,12 @@ describe('# auth service tests', () => { revocationKey: registerDetails.keys.revocationCertificate, keys: { ecc: { - privateKey: registerDetails.keys.ecc.privateKeyEncrypted, publicKey: registerDetails.keys.ecc.publicKey, + privateKeyEncrypted: registerDetails.keys.ecc.privateKeyEncrypted, }, kyber: { - privateKey: registerDetails.keys.kyber.privateKeyEncrypted, publicKey: registerDetails.keys.kyber.publicKey, + privateKeyEncrypted: registerDetails.keys.kyber.privateKeyEncrypted, }, }, referral: registerDetails.referral, @@ -182,8 +182,8 @@ describe('# auth service tests', () => { publicKey: '', revocationCertificate: '', ecc: { - privateKeyEncrypted: '', publicKey: '', + privateKeyEncrypted: '', }, kyber: { publicKey: '', @@ -218,8 +218,8 @@ describe('# auth service tests', () => { publicKey: '', revocationCertificate: '', ecc: { - privateKeyEncrypted: '', publicKey: '', + privateKeyEncrypted: '', }, kyber: { publicKey: '', @@ -261,8 +261,8 @@ describe('# auth service tests', () => { publicKey: 'pub', revocationCertificate: 'rev', ecc: { - privateKeyEncrypted: 'priv', publicKey: 'pub', + privateKeyEncrypted: 'priv', }, kyber: { publicKey: 'pubKyber', @@ -307,12 +307,12 @@ describe('# auth service tests', () => { revocateKey: 'rev', keys: { ecc: { - privateKey: 'priv', publicKey: 'pub', + privateKeyEncrypted: 'priv', }, kyber: { publicKey: 'pubKyber', - privateKey: 'privKyber', + privateKeyEncrypted: 'privKyber', }, }, }, @@ -337,8 +337,8 @@ describe('# auth service tests', () => { publicKey: 'pubk', revocationCertificate: 'crt', ecc: { - privateKeyEncrypted: 'priv', publicKey: 'pub', + privateKeyEncrypted: 'priv', }, kyber: { publicKey: 'pubKyber', @@ -359,11 +359,11 @@ describe('# auth service tests', () => { revocationKey: 'crt', ecc: { publicKey: 'pub', - privateKey: 'priv', + privateKeyEncrypted: 'priv', }, kyber: { publicKey: 'pubKyber', - privateKey: 'privKyber', + privateKeyEncrypted: 'privKyber', }, }, headers,