@wireapp/core 43.7.1 → 43.8.0
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 +73 -104
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.js +13 -31
- 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/Connection/AcmeServer/schema.d.ts +3 -0
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/schema.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/schema.js +1 -0
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIService.types.d.ts +3 -9
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIService.types.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.d.ts +12 -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 +4 -7
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Authorization.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Authorization.js +36 -27
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.d.ts +7 -10
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.js +3 -3
- 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/OidcChallenge.js +3 -3
- 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 +25 -25
- package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.js +3 -3
- 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 +5 -5
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,MA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seE2EI && 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,84 @@ 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
|
-
|
|
46
|
+
}[];
|
|
47
|
+
}>>;
|
|
48
|
+
validateDpopChallenge(url: AcmeChallenge['url'], payload: Uint8Array): Promise<PostJoseRequestReturnValue<{
|
|
49
|
+
type: string;
|
|
50
|
+
url: string;
|
|
51
|
+
target: string;
|
|
52
|
+
status: string;
|
|
53
|
+
token: string;
|
|
54
|
+
}>>;
|
|
55
|
+
validateOidcChallenge(url: AcmeChallenge['url'], payload: Uint8Array): Promise<PostJoseRequestReturnValue<{
|
|
56
|
+
type: string;
|
|
57
|
+
url: string;
|
|
58
|
+
target: string;
|
|
59
|
+
status: string;
|
|
60
|
+
token: string;
|
|
61
|
+
validated?: string | undefined;
|
|
62
|
+
error?: {
|
|
63
|
+
type: string;
|
|
64
|
+
detail: string;
|
|
65
|
+
} | undefined;
|
|
66
|
+
}>>;
|
|
67
|
+
checkStatusOfOrder(url: string, payload: Uint8Array): Promise<PostJoseRequestReturnValue<{
|
|
68
|
+
id: string;
|
|
69
|
+
status: string;
|
|
70
|
+
expires: string;
|
|
71
|
+
notBefore: string;
|
|
72
|
+
notAfter: string;
|
|
73
|
+
identifiers: {
|
|
74
|
+
type: string;
|
|
75
|
+
value: string;
|
|
76
|
+
}[];
|
|
77
|
+
authorizations: string[];
|
|
78
|
+
finalize: string;
|
|
79
|
+
}>>;
|
|
80
|
+
finalizeOrder(url: string, payload: Uint8Array): Promise<PostJoseRequestReturnValue<{
|
|
81
|
+
id: string;
|
|
82
|
+
certificate: string;
|
|
83
|
+
status: string;
|
|
84
|
+
expires: string;
|
|
85
|
+
notBefore: string;
|
|
86
|
+
notAfter: string;
|
|
87
|
+
identifiers: {
|
|
88
|
+
type: string;
|
|
89
|
+
value: string;
|
|
90
|
+
}[];
|
|
91
|
+
authorizations: string[];
|
|
92
|
+
finalize: string;
|
|
93
|
+
}>>;
|
|
94
|
+
getCertificate(url: string, payload: Uint8Array): Promise<PostJoseRequestReturnValue<string>>;
|
|
126
95
|
}
|
|
127
96
|
//# 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","sourceRoot":"","sources":["../../../../../../src/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.ts"],"names":[],"mappings":"AAsBA,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAE1B,0BAA0B,EAC3B,MAAM,qBAAqB,CAAC;AAkB7B,OAAO,EAAC,aAAa,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAErE,qBAAa,WAAW;IAOV,OAAO,CAAC,YAAY;IANhC,OAAO,CAAC,MAAM,CAAwC;IACtD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiC;IAC/D,OAAO,CAAC,QAAQ,CAAC,GAAG,CAElB;gBAEkB,YAAY,EAAE,MAAM;IAExC,OAAO,KAAK,WAAW,GAGtB;IAID,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,eAAe;YAIT,eAAe;IAsBhB,YAAY,IAAI,uBAAuB;IAWvC,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC;IAM1C,eAAe,CAAC,GAAG,EAAE,aAAa,CAAC,UAAU,CAAC,GAAG,0BAA0B;IAW3E,gBAAgB,CAAC,GAAG,EAAE,aAAa,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,UAAU;;;;;IAQtE,cAAc,CAAC,GAAG,EAAE,aAAa,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,UAAU;;;;;;;;;;;;IASlE,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU;;;;;;;;;;;;;;;IAQjD,qBAAqB,CAAC,GAAG,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,UAAU;;;;;;;IAQpE,qBAAqB,CAAC,GAAG,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,UAAU;;;;;;;;;;;;IAQpE,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU;;;;;;;;;;;;;IAQnD,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU;;;;;;;;;;;;;;IAQ9C,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU;CAO7D"}
|
|
@@ -45,29 +45,19 @@ class AcmeService {
|
|
|
45
45
|
extractLocation(headers) {
|
|
46
46
|
return schema_1.ResponseHeaderLocationSchema.parse(headers).location;
|
|
47
47
|
}
|
|
48
|
-
async postJoseRequest({ payload, schema, url,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return {
|
|
62
|
-
data: accountData,
|
|
63
|
-
nonce,
|
|
64
|
-
location,
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
catch (e) {
|
|
68
|
-
this.logger.error(errorMessage, e);
|
|
69
|
-
return undefined;
|
|
70
|
-
}
|
|
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
|
+
};
|
|
71
61
|
}
|
|
72
62
|
// ############ Public Functions ############
|
|
73
63
|
async getDirectory() {
|
|
@@ -99,7 +89,6 @@ class AcmeService {
|
|
|
99
89
|
}
|
|
100
90
|
async createNewAccount(url, payload) {
|
|
101
91
|
return this.postJoseRequest({
|
|
102
|
-
errorMessage: 'Error while creating new Account',
|
|
103
92
|
payload,
|
|
104
93
|
schema: schema_1.NewAccountResponseSchema,
|
|
105
94
|
url,
|
|
@@ -107,7 +96,6 @@ class AcmeService {
|
|
|
107
96
|
}
|
|
108
97
|
async createNewOrder(url, payload) {
|
|
109
98
|
return this.postJoseRequest({
|
|
110
|
-
errorMessage: 'Error while creating new Order',
|
|
111
99
|
payload,
|
|
112
100
|
schema: schema_1.NewOrderResponseSchema,
|
|
113
101
|
url,
|
|
@@ -116,7 +104,6 @@ class AcmeService {
|
|
|
116
104
|
}
|
|
117
105
|
async getAuthorization(url, payload) {
|
|
118
106
|
return this.postJoseRequest({
|
|
119
|
-
errorMessage: 'Error while receiving Authorization',
|
|
120
107
|
payload,
|
|
121
108
|
schema: schema_1.AuthorizationResponseSchema,
|
|
122
109
|
url,
|
|
@@ -124,7 +111,6 @@ class AcmeService {
|
|
|
124
111
|
}
|
|
125
112
|
async validateDpopChallenge(url, payload) {
|
|
126
113
|
return this.postJoseRequest({
|
|
127
|
-
errorMessage: 'Error while validating DPOP challenge',
|
|
128
114
|
payload,
|
|
129
115
|
schema: schema_1.DpopChallengeResponseSchema,
|
|
130
116
|
url,
|
|
@@ -132,7 +118,6 @@ class AcmeService {
|
|
|
132
118
|
}
|
|
133
119
|
async validateOidcChallenge(url, payload) {
|
|
134
120
|
return this.postJoseRequest({
|
|
135
|
-
errorMessage: 'Error while validating OIDC challenge',
|
|
136
121
|
payload,
|
|
137
122
|
schema: schema_1.OidcChallengeResponseSchema,
|
|
138
123
|
url,
|
|
@@ -140,7 +125,6 @@ class AcmeService {
|
|
|
140
125
|
}
|
|
141
126
|
async checkStatusOfOrder(url, payload) {
|
|
142
127
|
return this.postJoseRequest({
|
|
143
|
-
errorMessage: 'Error while checking status of Order',
|
|
144
128
|
payload,
|
|
145
129
|
schema: schema_1.CheckStatusOfOrderResponseSchema,
|
|
146
130
|
url,
|
|
@@ -148,7 +132,6 @@ class AcmeService {
|
|
|
148
132
|
}
|
|
149
133
|
async finalizeOrder(url, payload) {
|
|
150
134
|
return this.postJoseRequest({
|
|
151
|
-
errorMessage: 'Error while finalizing Order',
|
|
152
135
|
payload,
|
|
153
136
|
schema: schema_1.FinalizeOrderResponseSchema,
|
|
154
137
|
url,
|
|
@@ -156,7 +139,6 @@ class AcmeService {
|
|
|
156
139
|
}
|
|
157
140
|
async getCertificate(url, payload) {
|
|
158
141
|
return this.postJoseRequest({
|
|
159
|
-
errorMessage: 'Error while receiving Certificate',
|
|
160
142
|
payload,
|
|
161
143
|
schema: schema_1.GetCertificateResponseSchema,
|
|
162
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"}
|
|
@@ -159,14 +159,17 @@ export declare const DpopChallengeResponseSchema: z.ZodObject<{
|
|
|
159
159
|
url: z.ZodString;
|
|
160
160
|
status: z.ZodString;
|
|
161
161
|
token: z.ZodString;
|
|
162
|
+
target: z.ZodString;
|
|
162
163
|
}, "strip", z.ZodTypeAny, {
|
|
163
164
|
type: string;
|
|
164
165
|
url: string;
|
|
166
|
+
target: string;
|
|
165
167
|
status: string;
|
|
166
168
|
token: string;
|
|
167
169
|
}, {
|
|
168
170
|
type: string;
|
|
169
171
|
url: string;
|
|
172
|
+
target: string;
|
|
170
173
|
status: string;
|
|
171
174
|
token: string;
|
|
172
175
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../../src/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/schema.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAKtB,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,4BAA4B;;;;;;EAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;EAMlC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE5E,eAAO,MAAM,kCAAkC,aAAoB,CAAC;AACpE,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAEjG,eAAO,MAAM,wBAAwB;;;;;;;;;;;;EAInC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE9E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAajC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE1E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBtC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEpF,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../../src/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/schema.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAKtB,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,4BAA4B;;;;;;EAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;EAMlC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE5E,eAAO,MAAM,kCAAkC,aAAoB,CAAC;AACpE,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAEjG,eAAO,MAAM,wBAAwB;;;;;;;;;;;;EAInC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE9E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAajC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE1E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBtC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEpF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;EAMtC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEpF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAatC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEpF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc3C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE9F,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAetC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEpF,eAAO,MAAM,4BAA4B,aAAoB,CAAC;AAC9D,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -7,17 +7,15 @@ 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['challenge']>>;
|
|
11
11
|
export type NewAcmeOrder = OmitFree<Awaited<ReturnType<E2eiEnrollment['newOrderResponse']>>>;
|
|
12
|
-
export type NewAcmeAuthz = Pick<Awaited<ReturnType<E2eiEnrollment['newAuthzResponse']>>, 'identifier' | 'keyauth'
|
|
13
|
-
wireDpopChallenge?: AcmeChallenge;
|
|
14
|
-
wireOidcChallenge?: AcmeChallenge;
|
|
15
|
-
};
|
|
12
|
+
export type NewAcmeAuthz = Pick<Awaited<ReturnType<E2eiEnrollment['newAuthzResponse']>>, 'identifier' | 'keyauth' | 'challenge'>;
|
|
16
13
|
export { E2eiEnrollment, Ciphersuite, CoreCrypto, RotateBundle, WireIdentity, E2eiConversationState, CredentialType };
|
|
17
14
|
export type User = {
|
|
18
15
|
id: string;
|
|
19
16
|
domain: string;
|
|
20
17
|
displayName: string;
|
|
18
|
+
teamId: string;
|
|
21
19
|
handle: string;
|
|
22
20
|
};
|
|
23
21
|
export type Account = Uint8Array;
|
|
@@ -41,8 +39,4 @@ export interface InitParams {
|
|
|
41
39
|
discoveryUrl?: string;
|
|
42
40
|
keyPackagesAmount: number;
|
|
43
41
|
}
|
|
44
|
-
export interface StartNewOAuthFlowReturnValue {
|
|
45
|
-
challenge: AcmeChallenge;
|
|
46
|
-
keyAuth: KeyAuth;
|
|
47
|
-
}
|
|
48
42
|
//# 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,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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,16 @@ 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: {
|
|
16
|
+
url: string;
|
|
17
|
+
target: string;
|
|
18
|
+
delegate: Uint8Array;
|
|
19
|
+
};
|
|
20
|
+
keyAuth: string;
|
|
21
|
+
}>;
|
|
15
22
|
continueCertificateProcess(oAuthIdToken: string): Promise<RotateBundle | undefined>;
|
|
16
23
|
private initIdentity;
|
|
17
|
-
private exitWithError;
|
|
18
24
|
private init;
|
|
19
25
|
private getDirectory;
|
|
20
26
|
private getInitialNonce;
|
|
@@ -24,7 +30,7 @@ declare class E2EIServiceInternal {
|
|
|
24
30
|
*
|
|
25
31
|
* @returns authData
|
|
26
32
|
*/
|
|
27
|
-
private
|
|
33
|
+
private getEnrollmentChallenges;
|
|
28
34
|
/**
|
|
29
35
|
* Continuation of the ACME enrollment flow
|
|
30
36
|
* Needs to be called after the user has authenticated with the OIDC provider
|
|
@@ -53,7 +59,6 @@ declare class E2EIServiceInternal {
|
|
|
53
59
|
* @param oAuthIdToken
|
|
54
60
|
* @returns
|
|
55
61
|
*/
|
|
56
|
-
startRefreshCertficateFlow(oAuthIdToken: string, hasActiveCertificate: boolean): Promise<RotateBundle
|
|
62
|
+
startRefreshCertficateFlow(oAuthIdToken: string, hasActiveCertificate: boolean): Promise<RotateBundle>;
|
|
57
63
|
}
|
|
58
|
-
export { E2EIServiceInternal };
|
|
59
64
|
//# 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"}
|