@wireapp/core 43.7.0 → 43.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Account.d.ts +12 -3
- package/lib/Account.d.ts.map +1 -1
- package/lib/Account.js +3 -3
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.d.ts +72 -104
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.js +14 -33
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.types.d.ts +2 -3
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.types.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIService.types.d.ts +2 -5
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIService.types.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.d.ts +8 -7
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.js +57 -119
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Authorization.d.ts +2 -2
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Authorization.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Authorization.js +3 -3
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.d.ts +6 -10
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.types.d.ts +2 -2
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.types.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/OidcChallenge.d.ts +13 -17
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/OidcChallenge.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Order.d.ts +4 -4
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Order.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Order.js +9 -10
- package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.js +2 -2
- package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.d.ts +5 -0
- package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.js +1 -0
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts +11 -2
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/MLSService/MLSService.js +36 -40
- package/package.json +4 -4
package/lib/Account.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { SubconversationService } from './conversation/SubconversationService/Su
|
|
|
13
13
|
import { GiphyService } from './giphy/';
|
|
14
14
|
import { LinkPreviewService } from './linkPreview';
|
|
15
15
|
import { MLSService } from './messagingProtocols/mls';
|
|
16
|
-
import { E2EIServiceExternal
|
|
16
|
+
import { E2EIServiceExternal } from './messagingProtocols/mls/E2EIdentityService';
|
|
17
17
|
import { CoreCallbacks, CoreCryptoConfig, SecretCrypto } from './messagingProtocols/mls/types';
|
|
18
18
|
import { NewClient, ProteusService } from './messagingProtocols/proteus';
|
|
19
19
|
import { HandledEventPayload, NotificationService, NotificationSource } from './notification/';
|
|
@@ -118,12 +118,21 @@ export declare class Account extends TypedEventEmitter<Events> {
|
|
|
118
118
|
useAPIVersion(min: number, max: number, allowDev?: boolean): Promise<BackendFeatures>;
|
|
119
119
|
private persistCookie;
|
|
120
120
|
private getE2EIStatus;
|
|
121
|
-
enrollE2EI({ displayName, handle, discoveryUrl, oAuthIdToken, }: {
|
|
121
|
+
enrollE2EI({ displayName, handle, teamId, discoveryUrl, oAuthIdToken, }: {
|
|
122
122
|
displayName: string;
|
|
123
123
|
handle: string;
|
|
124
|
+
teamId: string;
|
|
124
125
|
discoveryUrl: string;
|
|
125
126
|
oAuthIdToken?: string;
|
|
126
|
-
}): Promise<
|
|
127
|
+
}): Promise<{
|
|
128
|
+
status: "authentication";
|
|
129
|
+
authenticationChallenge: {
|
|
130
|
+
keyAuth: string;
|
|
131
|
+
challenge: import("./messagingProtocols/mls").AcmeChallenge;
|
|
132
|
+
};
|
|
133
|
+
} | {
|
|
134
|
+
status: "successful";
|
|
135
|
+
}>;
|
|
127
136
|
get clientId(): string;
|
|
128
137
|
get userId(): string;
|
|
129
138
|
/**
|
package/lib/Account.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Account.d.ts","sourceRoot":"","sources":["../src/Account.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,YAAY,EAGZ,OAAO,EACP,MAAM,EAEN,SAAS,EAEV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAuB,UAAU,EAAE,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAEnG,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AASxD,OAAO,EAAC,SAAS,EAAE,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAC,UAAU,EAAe,MAAM,uBAAuB,CAAC;AAE/D,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,WAAW,CAAC;AACpD,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAChD,OAAO,EAA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AE,OAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAU9D;;OAEG;YACW,IAAI;IAQlB;;;;;;OAMG;IACI,MAAM,CAAC,EACZ,OAAkB,EAClB,wBAAmC,EACnC,4BAAuC,EACvC,qBAAgC,EAChC,MAAc,GACf,GAAE;QACD;;;;WAIG;QACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;QAE7E;;WAEG;QACH,4BAA4B,CAAC,EAAE,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,EAAE;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,KAAK,IAAI,CAAC;QAEtF;;WAEG;QACH,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;QAE5D;;;;;;WAMG;QACH,qBAAqB,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;QAEzD;;WAEG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;KACb,GAAG,MAAM,IAAI;IA2FnB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,uBAAuB;YAIjB,UAAU;IAuBxB,OAAO,CAAC,yBAAyB,CAS/B;CACH"}
|
package/lib/Account.js
CHANGED
|
@@ -187,7 +187,7 @@ class Account extends commons_1.TypedEventEmitter {
|
|
|
187
187
|
isFeatureEnabled: clientCanUseE2EI && teamCanUseE2EI,
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
async enrollE2EI({ displayName, handle, discoveryUrl, oAuthIdToken, }) {
|
|
190
|
+
async enrollE2EI({ displayName, handle, teamId, discoveryUrl, oAuthIdToken, }) {
|
|
191
191
|
var _a, _b, _c;
|
|
192
192
|
const context = this.apiClient.context;
|
|
193
193
|
const domain = (_a = context === null || context === void 0 ? void 0 : context.domain) !== null && _a !== void 0 ? _a : '';
|
|
@@ -195,13 +195,13 @@ class Account extends commons_1.TypedEventEmitter {
|
|
|
195
195
|
throw new Error('Client has not been initialized - please login first');
|
|
196
196
|
}
|
|
197
197
|
if (!((_b = this.service) === null || _b === void 0 ? void 0 : _b.mls) || !((_c = this.service) === null || _c === void 0 ? void 0 : _c.e2eIdentity)) {
|
|
198
|
-
|
|
199
|
-
return false;
|
|
198
|
+
throw new Error('MLS not initialized, unable to enroll E2EI');
|
|
200
199
|
}
|
|
201
200
|
const user = {
|
|
202
201
|
displayName,
|
|
203
202
|
handle,
|
|
204
203
|
domain,
|
|
204
|
+
teamId,
|
|
205
205
|
id: this.userId,
|
|
206
206
|
};
|
|
207
207
|
return this.service.mls.enrollE2EI(discoveryUrl, this.service.e2eIdentity, user, this.currentClient, this.options.nbPrekeys, oAuthIdToken);
|
package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetDirectoryReturnValue, GetInitialNonceReturnValue } from './AcmeService.types';
|
|
1
|
+
import { GetDirectoryReturnValue, GetInitialNonceReturnValue, PostJoseRequestReturnValue } from './AcmeService.types';
|
|
2
2
|
import { AcmeChallenge, AcmeDirectory } from '../../E2EIService.types';
|
|
3
3
|
export declare class AcmeService {
|
|
4
4
|
private discoveryUrl;
|
|
@@ -13,115 +13,83 @@ export declare class AcmeService {
|
|
|
13
13
|
getDirectory(): GetDirectoryReturnValue;
|
|
14
14
|
getLocalCertificateRoot(): Promise<string>;
|
|
15
15
|
getInitialNonce(url: AcmeDirectory['newNonce']): GetInitialNonceReturnValue;
|
|
16
|
-
createNewAccount(url: AcmeDirectory['newAccount'], payload: Uint8Array): Promise<{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
status: string;
|
|
28
|
-
expires: string;
|
|
29
|
-
notBefore: string;
|
|
30
|
-
notAfter: string;
|
|
31
|
-
identifiers: {
|
|
32
|
-
type: string;
|
|
33
|
-
value: string;
|
|
34
|
-
}[];
|
|
35
|
-
authorizations: string[];
|
|
36
|
-
finalize: string;
|
|
37
|
-
};
|
|
38
|
-
nonce: string;
|
|
39
|
-
location?: string | undefined;
|
|
40
|
-
} | undefined>;
|
|
41
|
-
getAuthorization(url: string, payload: Uint8Array): Promise<{
|
|
42
|
-
data: {
|
|
43
|
-
status: string;
|
|
44
|
-
expires: string;
|
|
45
|
-
identifier: {
|
|
46
|
-
type: string;
|
|
47
|
-
value: string;
|
|
48
|
-
};
|
|
49
|
-
challenges: {
|
|
50
|
-
type: string;
|
|
51
|
-
url: string;
|
|
52
|
-
target: string;
|
|
53
|
-
status: string;
|
|
54
|
-
token: string;
|
|
55
|
-
}[];
|
|
56
|
-
};
|
|
57
|
-
nonce: string;
|
|
58
|
-
location?: string | undefined;
|
|
59
|
-
} | undefined>;
|
|
60
|
-
validateDpopChallenge(url: AcmeChallenge['url'], payload: Uint8Array): Promise<{
|
|
61
|
-
data: {
|
|
16
|
+
createNewAccount(url: AcmeDirectory['newAccount'], payload: Uint8Array): Promise<PostJoseRequestReturnValue<{
|
|
17
|
+
status: string;
|
|
18
|
+
orders: string;
|
|
19
|
+
contact: string[];
|
|
20
|
+
}>>;
|
|
21
|
+
createNewOrder(url: AcmeDirectory['newOrder'], payload: Uint8Array): Promise<PostJoseRequestReturnValue<{
|
|
22
|
+
status: string;
|
|
23
|
+
expires: string;
|
|
24
|
+
notBefore: string;
|
|
25
|
+
notAfter: string;
|
|
26
|
+
identifiers: {
|
|
62
27
|
type: string;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
28
|
+
value: string;
|
|
29
|
+
}[];
|
|
30
|
+
authorizations: string[];
|
|
31
|
+
finalize: string;
|
|
32
|
+
}>>;
|
|
33
|
+
getAuthorization(url: string, payload: Uint8Array): Promise<PostJoseRequestReturnValue<{
|
|
34
|
+
status: string;
|
|
35
|
+
expires: string;
|
|
36
|
+
identifier: {
|
|
37
|
+
type: string;
|
|
38
|
+
value: string;
|
|
66
39
|
};
|
|
67
|
-
|
|
68
|
-
location?: string | undefined;
|
|
69
|
-
} | undefined>;
|
|
70
|
-
validateOidcChallenge(url: AcmeChallenge['url'], payload: Uint8Array): Promise<{
|
|
71
|
-
data: {
|
|
40
|
+
challenges: {
|
|
72
41
|
type: string;
|
|
73
42
|
url: string;
|
|
74
43
|
target: string;
|
|
75
44
|
status: string;
|
|
76
45
|
token: string;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
} | undefined>;
|
|
46
|
+
}[];
|
|
47
|
+
}>>;
|
|
48
|
+
validateDpopChallenge(url: AcmeChallenge['url'], payload: Uint8Array): Promise<PostJoseRequestReturnValue<{
|
|
49
|
+
type: string;
|
|
50
|
+
url: string;
|
|
51
|
+
status: string;
|
|
52
|
+
token: string;
|
|
53
|
+
}>>;
|
|
54
|
+
validateOidcChallenge(url: AcmeChallenge['url'], payload: Uint8Array): Promise<PostJoseRequestReturnValue<{
|
|
55
|
+
type: string;
|
|
56
|
+
url: string;
|
|
57
|
+
target: string;
|
|
58
|
+
status: string;
|
|
59
|
+
token: string;
|
|
60
|
+
validated?: string | undefined;
|
|
61
|
+
error?: {
|
|
62
|
+
type: string;
|
|
63
|
+
detail: string;
|
|
64
|
+
} | undefined;
|
|
65
|
+
}>>;
|
|
66
|
+
checkStatusOfOrder(url: string, payload: Uint8Array): Promise<PostJoseRequestReturnValue<{
|
|
67
|
+
id: string;
|
|
68
|
+
status: string;
|
|
69
|
+
expires: string;
|
|
70
|
+
notBefore: string;
|
|
71
|
+
notAfter: string;
|
|
72
|
+
identifiers: {
|
|
73
|
+
type: string;
|
|
74
|
+
value: string;
|
|
75
|
+
}[];
|
|
76
|
+
authorizations: string[];
|
|
77
|
+
finalize: string;
|
|
78
|
+
}>>;
|
|
79
|
+
finalizeOrder(url: string, payload: Uint8Array): Promise<PostJoseRequestReturnValue<{
|
|
80
|
+
id: string;
|
|
81
|
+
certificate: string;
|
|
82
|
+
status: string;
|
|
83
|
+
expires: string;
|
|
84
|
+
notBefore: string;
|
|
85
|
+
notAfter: string;
|
|
86
|
+
identifiers: {
|
|
87
|
+
type: string;
|
|
88
|
+
value: string;
|
|
89
|
+
}[];
|
|
90
|
+
authorizations: string[];
|
|
91
|
+
finalize: string;
|
|
92
|
+
}>>;
|
|
93
|
+
getCertificate(url: string, payload: Uint8Array): Promise<PostJoseRequestReturnValue<string>>;
|
|
126
94
|
}
|
|
127
95
|
//# sourceMappingURL=AcmeService.d.ts.map
|
package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcmeService.d.ts","sourceRoot":"","sources":["../../../../../../src/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.ts"],"names":[],"mappings":"AAsBA,OAAO,EACL,uBAAuB,EACvB,0BAA0B,
|
|
1
|
+
{"version":3,"file":"AcmeService.d.ts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,EAAE,UAAU;;;;;;;;;;;;;;IAQ9C,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU;CAO7D"}
|
|
@@ -31,7 +31,6 @@ class AcmeService {
|
|
|
31
31
|
this.logger = (0, logdown_1.default)('@wireapp/core/AcmeService');
|
|
32
32
|
this.axiosInstance = axios_1.default.create();
|
|
33
33
|
this.url = {
|
|
34
|
-
DIRECTORY: '/directory',
|
|
35
34
|
ROOTS: '/roots.pem',
|
|
36
35
|
};
|
|
37
36
|
}
|
|
@@ -46,34 +45,24 @@ class AcmeService {
|
|
|
46
45
|
extractLocation(headers) {
|
|
47
46
|
return schema_1.ResponseHeaderLocationSchema.parse(headers).location;
|
|
48
47
|
}
|
|
49
|
-
async postJoseRequest({ payload, schema, url,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return {
|
|
63
|
-
data: accountData,
|
|
64
|
-
nonce,
|
|
65
|
-
location,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
catch (e) {
|
|
69
|
-
this.logger.error(errorMessage, e);
|
|
70
|
-
return undefined;
|
|
71
|
-
}
|
|
48
|
+
async postJoseRequest({ payload, schema, url, shouldGetLocation = false, }) {
|
|
49
|
+
const { data, headers } = await this.axiosInstance.post(url, payload, {
|
|
50
|
+
headers: {
|
|
51
|
+
'Content-Type': 'application/jose+json',
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
const nonce = this.extractNonce(headers);
|
|
55
|
+
const accountData = schema.parse(data);
|
|
56
|
+
return {
|
|
57
|
+
data: accountData,
|
|
58
|
+
nonce,
|
|
59
|
+
location: shouldGetLocation ? this.extractLocation(headers) : undefined,
|
|
60
|
+
};
|
|
72
61
|
}
|
|
73
62
|
// ############ Public Functions ############
|
|
74
63
|
async getDirectory() {
|
|
75
64
|
try {
|
|
76
|
-
const { data } = await this.axiosInstance.get(
|
|
65
|
+
const { data } = await this.axiosInstance.get(this.discoveryUrl);
|
|
77
66
|
const directory = schema_1.DirectoryResponseSchema.parse(data);
|
|
78
67
|
return new TextEncoder().encode(JSON.stringify(directory));
|
|
79
68
|
}
|
|
@@ -100,7 +89,6 @@ class AcmeService {
|
|
|
100
89
|
}
|
|
101
90
|
async createNewAccount(url, payload) {
|
|
102
91
|
return this.postJoseRequest({
|
|
103
|
-
errorMessage: 'Error while creating new Account',
|
|
104
92
|
payload,
|
|
105
93
|
schema: schema_1.NewAccountResponseSchema,
|
|
106
94
|
url,
|
|
@@ -108,7 +96,6 @@ class AcmeService {
|
|
|
108
96
|
}
|
|
109
97
|
async createNewOrder(url, payload) {
|
|
110
98
|
return this.postJoseRequest({
|
|
111
|
-
errorMessage: 'Error while creating new Order',
|
|
112
99
|
payload,
|
|
113
100
|
schema: schema_1.NewOrderResponseSchema,
|
|
114
101
|
url,
|
|
@@ -117,7 +104,6 @@ class AcmeService {
|
|
|
117
104
|
}
|
|
118
105
|
async getAuthorization(url, payload) {
|
|
119
106
|
return this.postJoseRequest({
|
|
120
|
-
errorMessage: 'Error while receiving Authorization',
|
|
121
107
|
payload,
|
|
122
108
|
schema: schema_1.AuthorizationResponseSchema,
|
|
123
109
|
url,
|
|
@@ -125,7 +111,6 @@ class AcmeService {
|
|
|
125
111
|
}
|
|
126
112
|
async validateDpopChallenge(url, payload) {
|
|
127
113
|
return this.postJoseRequest({
|
|
128
|
-
errorMessage: 'Error while validating DPOP challenge',
|
|
129
114
|
payload,
|
|
130
115
|
schema: schema_1.DpopChallengeResponseSchema,
|
|
131
116
|
url,
|
|
@@ -133,7 +118,6 @@ class AcmeService {
|
|
|
133
118
|
}
|
|
134
119
|
async validateOidcChallenge(url, payload) {
|
|
135
120
|
return this.postJoseRequest({
|
|
136
|
-
errorMessage: 'Error while validating OIDC challenge',
|
|
137
121
|
payload,
|
|
138
122
|
schema: schema_1.OidcChallengeResponseSchema,
|
|
139
123
|
url,
|
|
@@ -141,7 +125,6 @@ class AcmeService {
|
|
|
141
125
|
}
|
|
142
126
|
async checkStatusOfOrder(url, payload) {
|
|
143
127
|
return this.postJoseRequest({
|
|
144
|
-
errorMessage: 'Error while checking status of Order',
|
|
145
128
|
payload,
|
|
146
129
|
schema: schema_1.CheckStatusOfOrderResponseSchema,
|
|
147
130
|
url,
|
|
@@ -149,7 +132,6 @@ class AcmeService {
|
|
|
149
132
|
}
|
|
150
133
|
async finalizeOrder(url, payload) {
|
|
151
134
|
return this.postJoseRequest({
|
|
152
|
-
errorMessage: 'Error while finalizing Order',
|
|
153
135
|
payload,
|
|
154
136
|
schema: schema_1.FinalizeOrderResponseSchema,
|
|
155
137
|
url,
|
|
@@ -157,7 +139,6 @@ class AcmeService {
|
|
|
157
139
|
}
|
|
158
140
|
async getCertificate(url, payload) {
|
|
159
141
|
return this.postJoseRequest({
|
|
160
|
-
errorMessage: 'Error while receiving Certificate',
|
|
161
142
|
payload,
|
|
162
143
|
schema: schema_1.GetCertificateResponseSchema,
|
|
163
144
|
url,
|
package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.types.d.ts
CHANGED
|
@@ -6,12 +6,11 @@ export interface PostJoseRequestParams<T> {
|
|
|
6
6
|
url: string;
|
|
7
7
|
payload: Uint8Array;
|
|
8
8
|
schema: ZodSchema<T>;
|
|
9
|
-
errorMessage: string;
|
|
10
9
|
shouldGetLocation?: boolean;
|
|
11
10
|
}
|
|
12
|
-
export type PostJoseRequestReturnValue<T> =
|
|
11
|
+
export type PostJoseRequestReturnValue<T> = {
|
|
13
12
|
data: T;
|
|
14
13
|
nonce: Nonce;
|
|
15
14
|
location?: string;
|
|
16
|
-
}
|
|
15
|
+
};
|
|
17
16
|
//# sourceMappingURL=AcmeService.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcmeService.types.d.ts","sourceRoot":"","sources":["../../../../../../src/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.types.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,KAAK,CAAC;AAE9B,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAC;AAE9C,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;AAEtE,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAErE,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACrB,
|
|
1
|
+
{"version":3,"file":"AcmeService.types.d.ts","sourceRoot":"","sources":["../../../../../../src/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.types.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,KAAK,CAAC;AAE9B,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAC;AAE9C,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;AAEtE,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAErE,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AACD,MAAM,MAAM,0BAA0B,CAAC,CAAC,IAAI;IAC1C,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { E2EIServiceExternal } from './E2EIServiceExternal';
|
|
|
7
7
|
type OmitFree<T> = Omit<T, 'free'>;
|
|
8
8
|
type NewAcmeAuthzOriginal = OmitFree<Awaited<ReturnType<E2eiEnrollment['newAuthzResponse']>>>;
|
|
9
9
|
export type AcmeDirectory = OmitFree<Awaited<ReturnType<E2eiEnrollment['directoryResponse']>>>;
|
|
10
|
-
export type AcmeChallenge = OmitFree<NonNullable<NewAcmeAuthzOriginal['
|
|
10
|
+
export type AcmeChallenge = OmitFree<NonNullable<NewAcmeAuthzOriginal['wireOidcChallenge']>>;
|
|
11
11
|
export type NewAcmeOrder = OmitFree<Awaited<ReturnType<E2eiEnrollment['newOrderResponse']>>>;
|
|
12
12
|
export type NewAcmeAuthz = Pick<Awaited<ReturnType<E2eiEnrollment['newAuthzResponse']>>, 'identifier' | 'keyauth'> & {
|
|
13
13
|
wireDpopChallenge?: AcmeChallenge;
|
|
@@ -18,6 +18,7 @@ export type User = {
|
|
|
18
18
|
id: string;
|
|
19
19
|
domain: string;
|
|
20
20
|
displayName: string;
|
|
21
|
+
teamId: string;
|
|
21
22
|
handle: string;
|
|
22
23
|
};
|
|
23
24
|
export type Account = Uint8Array;
|
|
@@ -41,8 +42,4 @@ export interface InitParams {
|
|
|
41
42
|
discoveryUrl?: string;
|
|
42
43
|
keyPackagesAmount: number;
|
|
43
44
|
}
|
|
44
|
-
export interface StartNewOAuthFlowReturnValue {
|
|
45
|
-
challenge: AcmeChallenge;
|
|
46
|
-
keyAuth: KeyAuth;
|
|
47
|
-
}
|
|
48
45
|
//# sourceMappingURL=E2EIService.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"E2EIService.types.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/E2EIdentityService/E2EIService.types.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EACL,cAAc,EACd,WAAW,EACX,UA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AM,MAAM,KAAK,GAAG,MAAM,CAAC;AAC3B,MAAM,MAAM,OAAO,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAEtD,MAAM,WAAW,yBAAyB;IACxC,aAAa,EAAE,aAAa,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,SAAS,CAAC;IACrB,eAAe,EAAE,UAAU,CAAC;IAC5B,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;CAC3B
|
|
1
|
+
{"version":3,"file":"E2EIService.types.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/E2EIdentityService/E2EIService.types.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EACL,cAAc,EACd,WAAW,EACX,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D;;GAEG;AACH,KAAK,QAAQ,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AACnC,KAAK,oBAAoB,GAAG,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9F,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,mBAAmB,CAAC,C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,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InitParams, RotateBundle
|
|
2
|
-
declare class E2EIServiceInternal {
|
|
1
|
+
import { InitParams, RotateBundle } from './E2EIService.types';
|
|
2
|
+
export declare class E2EIServiceInternal {
|
|
3
3
|
private static instance;
|
|
4
4
|
private readonly logger;
|
|
5
5
|
private readonly coreCryptoClient;
|
|
@@ -11,10 +11,12 @@ declare class E2EIServiceInternal {
|
|
|
11
11
|
private isInitialized;
|
|
12
12
|
private constructor();
|
|
13
13
|
static getInstance(params?: InitParams): Promise<E2EIServiceInternal>;
|
|
14
|
-
startCertificateProcess(hasActiveCertificate: boolean): Promise<
|
|
14
|
+
startCertificateProcess(hasActiveCertificate: boolean): Promise<{
|
|
15
|
+
challenge: import("./E2EIService.types").AcmeChallenge;
|
|
16
|
+
keyAuth: string;
|
|
17
|
+
}>;
|
|
15
18
|
continueCertificateProcess(oAuthIdToken: string): Promise<RotateBundle | undefined>;
|
|
16
19
|
private initIdentity;
|
|
17
|
-
private exitWithError;
|
|
18
20
|
private init;
|
|
19
21
|
private getDirectory;
|
|
20
22
|
private getInitialNonce;
|
|
@@ -24,7 +26,7 @@ declare class E2EIServiceInternal {
|
|
|
24
26
|
*
|
|
25
27
|
* @returns authData
|
|
26
28
|
*/
|
|
27
|
-
private
|
|
29
|
+
private getEnrollmentChallenges;
|
|
28
30
|
/**
|
|
29
31
|
* Continuation of the ACME enrollment flow
|
|
30
32
|
* Needs to be called after the user has authenticated with the OIDC provider
|
|
@@ -53,7 +55,6 @@ declare class E2EIServiceInternal {
|
|
|
53
55
|
* @param oAuthIdToken
|
|
54
56
|
* @returns
|
|
55
57
|
*/
|
|
56
|
-
startRefreshCertficateFlow(oAuthIdToken: string, hasActiveCertificate: boolean): Promise<RotateBundle
|
|
58
|
+
startRefreshCertficateFlow(oAuthIdToken: string, hasActiveCertificate: boolean): Promise<RotateBundle>;
|
|
57
59
|
}
|
|
58
|
-
export { E2EIServiceInternal };
|
|
59
60
|
//# sourceMappingURL=E2EIServiceInternal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"E2EIServiceInternal.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.ts"],"names":[],"mappings":"AAyBA,OAAO,
|
|
1
|
+
{"version":3,"file":"E2EIServiceInternal.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAyD,UAAU,EAAE,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAYrH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAsB;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuD;IAC9E,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAa;IAC9C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAsB;IACzD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,CAAiB;IAClC,OAAO,CAAC,WAAW,CAAC,CAAc;IAClC,OAAO,CAAC,aAAa,CAAS;IAE9B,OAAO;WAea,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAwBrE,uBAAuB,CAAC,oBAAoB,EAAE,OAAO;;;;IAOrD,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;YAUlF,YAAY;YA0BZ,IAAI;YAUJ,YAAY;YAUZ,eAAe;IAQ7B;;;;;OAKG;YACW,uBAAuB;IAiDrC;;;;;;;OAOG;YACW,sCAAsC;IAgEpD;;;OAGG;YACW,iBAAiB;IAwB/B;;;;;;OAMG;YACW,iBAAiB;IAe/B;;;;;OAKG;IACU,0BAA0B,CAAC,YAAY,EAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO;CAa5F"}
|