@itwin/core-mobile 3.0.0-dev.81 → 3.0.0-dev.85
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/CHANGELOG.md +263 -263
- package/LICENSE.md +9 -9
- package/README.md +11 -11
- package/lib/cjs/MobileBackend.js.map +1 -1
- package/lib/cjs/MobileFrontend.js.map +1 -1
- package/lib/cjs/__DOC_ONLY__.js.map +1 -1
- package/lib/cjs/backend/AndroidHost.js.map +1 -1
- package/lib/cjs/backend/MobileAuthorizationBackend.js.map +1 -1
- package/lib/cjs/backend/MobileFileHandler.js.map +1 -1
- package/lib/cjs/backend/MobileHost.js.map +1 -1
- package/lib/cjs/backend/MobileRpcServer.js.map +1 -1
- package/lib/cjs/backend/iOSHost.js.map +1 -1
- package/lib/cjs/common/MobileAppProps.js.map +1 -1
- package/lib/cjs/common/MobileEventLoop.js.map +1 -1
- package/lib/cjs/common/MobileIpc.js.map +1 -1
- package/lib/cjs/common/MobilePush.js.map +1 -1
- package/lib/cjs/common/MobileRpcManager.js.map +1 -1
- package/lib/cjs/common/MobileRpcProtocol.js.map +1 -1
- package/lib/cjs/common/MobileRpcRequest.js.map +1 -1
- package/lib/cjs/frontend/AndroidApp.js.map +1 -1
- package/lib/cjs/frontend/IOSApp.js.map +1 -1
- package/lib/cjs/frontend/MobileApp.js.map +1 -1
- package/lib/cjs/test/ios/MobilePlatform.test.js.map +1 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,263 +1,263 @@
|
|
|
1
|
-
# Change Log - @itwin/core-mobile
|
|
2
|
-
|
|
3
|
-
This log was last generated on Tue, 21 Sep 2021 21:06:40 GMT and should not be manually modified.
|
|
4
|
-
|
|
5
|
-
## 2.19.13
|
|
6
|
-
Tue, 21 Sep 2021 21:06:40 GMT
|
|
7
|
-
|
|
8
|
-
_Version update only_
|
|
9
|
-
|
|
10
|
-
## 2.19.12
|
|
11
|
-
Wed, 15 Sep 2021 18:06:46 GMT
|
|
12
|
-
|
|
13
|
-
### Updates
|
|
14
|
-
|
|
15
|
-
- fix timming issue with authInit() called during startup()
|
|
16
|
-
|
|
17
|
-
## 2.19.11
|
|
18
|
-
Thu, 09 Sep 2021 21:04:58 GMT
|
|
19
|
-
|
|
20
|
-
_Version update only_
|
|
21
|
-
|
|
22
|
-
## 2.19.10
|
|
23
|
-
Wed, 08 Sep 2021 14:36:01 GMT
|
|
24
|
-
|
|
25
|
-
_Version update only_
|
|
26
|
-
|
|
27
|
-
## 2.19.9
|
|
28
|
-
Wed, 25 Aug 2021 15:36:01 GMT
|
|
29
|
-
|
|
30
|
-
_Version update only_
|
|
31
|
-
|
|
32
|
-
## 2.19.8
|
|
33
|
-
Mon, 23 Aug 2021 13:23:13 GMT
|
|
34
|
-
|
|
35
|
-
_Version update only_
|
|
36
|
-
|
|
37
|
-
## 2.19.7
|
|
38
|
-
Fri, 20 Aug 2021 17:47:22 GMT
|
|
39
|
-
|
|
40
|
-
### Updates
|
|
41
|
-
|
|
42
|
-
- remove request context from mobile auth client
|
|
43
|
-
|
|
44
|
-
## 2.19.6
|
|
45
|
-
Tue, 17 Aug 2021 20:34:29 GMT
|
|
46
|
-
|
|
47
|
-
_Version update only_
|
|
48
|
-
|
|
49
|
-
## 2.19.5
|
|
50
|
-
Fri, 13 Aug 2021 21:48:09 GMT
|
|
51
|
-
|
|
52
|
-
_Version update only_
|
|
53
|
-
|
|
54
|
-
## 2.19.4
|
|
55
|
-
Thu, 12 Aug 2021 13:09:26 GMT
|
|
56
|
-
|
|
57
|
-
_Version update only_
|
|
58
|
-
|
|
59
|
-
## 2.19.3
|
|
60
|
-
Wed, 04 Aug 2021 20:29:34 GMT
|
|
61
|
-
|
|
62
|
-
_Version update only_
|
|
63
|
-
|
|
64
|
-
## 2.19.2
|
|
65
|
-
Tue, 03 Aug 2021 18:26:23 GMT
|
|
66
|
-
|
|
67
|
-
_Version update only_
|
|
68
|
-
|
|
69
|
-
## 2.19.1
|
|
70
|
-
Thu, 29 Jul 2021 20:01:11 GMT
|
|
71
|
-
|
|
72
|
-
_Version update only_
|
|
73
|
-
|
|
74
|
-
## 2.19.0
|
|
75
|
-
Mon, 26 Jul 2021 12:21:25 GMT
|
|
76
|
-
|
|
77
|
-
### Updates
|
|
78
|
-
|
|
79
|
-
- remove internal barrel-import usage
|
|
80
|
-
|
|
81
|
-
## 2.18.4
|
|
82
|
-
Tue, 10 Aug 2021 19:35:13 GMT
|
|
83
|
-
|
|
84
|
-
_Version update only_
|
|
85
|
-
|
|
86
|
-
## 2.18.3
|
|
87
|
-
Wed, 28 Jul 2021 17:16:30 GMT
|
|
88
|
-
|
|
89
|
-
_Version update only_
|
|
90
|
-
|
|
91
|
-
## 2.18.2
|
|
92
|
-
Mon, 26 Jul 2021 16:18:31 GMT
|
|
93
|
-
|
|
94
|
-
_Version update only_
|
|
95
|
-
|
|
96
|
-
## 2.18.1
|
|
97
|
-
Fri, 16 Jul 2021 17:45:09 GMT
|
|
98
|
-
|
|
99
|
-
_Version update only_
|
|
100
|
-
|
|
101
|
-
## 2.18.0
|
|
102
|
-
Fri, 09 Jul 2021 18:11:24 GMT
|
|
103
|
-
|
|
104
|
-
_Version update only_
|
|
105
|
-
|
|
106
|
-
## 2.17.3
|
|
107
|
-
Mon, 26 Jul 2021 16:08:36 GMT
|
|
108
|
-
|
|
109
|
-
_Version update only_
|
|
110
|
-
|
|
111
|
-
## 2.17.2
|
|
112
|
-
Thu, 08 Jul 2021 15:23:00 GMT
|
|
113
|
-
|
|
114
|
-
_Version update only_
|
|
115
|
-
|
|
116
|
-
## 2.17.1
|
|
117
|
-
Fri, 02 Jul 2021 15:38:31 GMT
|
|
118
|
-
|
|
119
|
-
_Version update only_
|
|
120
|
-
|
|
121
|
-
## 2.17.0
|
|
122
|
-
Mon, 28 Jun 2021 16:20:11 GMT
|
|
123
|
-
|
|
124
|
-
### Updates
|
|
125
|
-
|
|
126
|
-
- set issuerurl correctly before calling authInit()
|
|
127
|
-
- set issuerurl correctly before calling authInit()
|
|
128
|
-
|
|
129
|
-
## 2.16.10
|
|
130
|
-
Thu, 22 Jul 2021 20:23:45 GMT
|
|
131
|
-
|
|
132
|
-
_Version update only_
|
|
133
|
-
|
|
134
|
-
## 2.16.9
|
|
135
|
-
Tue, 06 Jul 2021 22:08:34 GMT
|
|
136
|
-
|
|
137
|
-
_Version update only_
|
|
138
|
-
|
|
139
|
-
## 2.16.8
|
|
140
|
-
Fri, 02 Jul 2021 17:40:46 GMT
|
|
141
|
-
|
|
142
|
-
_Version update only_
|
|
143
|
-
|
|
144
|
-
## 2.16.7
|
|
145
|
-
Mon, 28 Jun 2021 18:13:04 GMT
|
|
146
|
-
|
|
147
|
-
_Version update only_
|
|
148
|
-
|
|
149
|
-
## 2.16.6
|
|
150
|
-
Mon, 28 Jun 2021 13:12:55 GMT
|
|
151
|
-
|
|
152
|
-
_Version update only_
|
|
153
|
-
|
|
154
|
-
## 2.16.5
|
|
155
|
-
Fri, 25 Jun 2021 16:03:01 GMT
|
|
156
|
-
|
|
157
|
-
_Version update only_
|
|
158
|
-
|
|
159
|
-
## 2.16.4
|
|
160
|
-
Wed, 23 Jun 2021 17:09:07 GMT
|
|
161
|
-
|
|
162
|
-
_Version update only_
|
|
163
|
-
|
|
164
|
-
## 2.16.3
|
|
165
|
-
Wed, 16 Jun 2021 20:29:32 GMT
|
|
166
|
-
|
|
167
|
-
_Version update only_
|
|
168
|
-
|
|
169
|
-
## 2.16.2
|
|
170
|
-
Thu, 03 Jun 2021 18:08:11 GMT
|
|
171
|
-
|
|
172
|
-
_Version update only_
|
|
173
|
-
|
|
174
|
-
## 2.16.1
|
|
175
|
-
Thu, 27 May 2021 20:04:22 GMT
|
|
176
|
-
|
|
177
|
-
_Version update only_
|
|
178
|
-
|
|
179
|
-
## 2.16.0
|
|
180
|
-
Mon, 24 May 2021 15:58:39 GMT
|
|
181
|
-
|
|
182
|
-
### Updates
|
|
183
|
-
|
|
184
|
-
- Android fixes
|
|
185
|
-
- Mobile fixes
|
|
186
|
-
- Fixes to desktop/mobile authorization
|
|
187
|
-
|
|
188
|
-
## 2.15.6
|
|
189
|
-
Wed, 26 May 2021 15:55:19 GMT
|
|
190
|
-
|
|
191
|
-
_Version update only_
|
|
192
|
-
|
|
193
|
-
## 2.15.5
|
|
194
|
-
Thu, 20 May 2021 15:06:26 GMT
|
|
195
|
-
|
|
196
|
-
_Version update only_
|
|
197
|
-
|
|
198
|
-
## 2.15.4
|
|
199
|
-
Tue, 18 May 2021 21:59:07 GMT
|
|
200
|
-
|
|
201
|
-
_Version update only_
|
|
202
|
-
|
|
203
|
-
## 2.15.3
|
|
204
|
-
Mon, 17 May 2021 13:31:38 GMT
|
|
205
|
-
|
|
206
|
-
_Version update only_
|
|
207
|
-
|
|
208
|
-
## 2.15.2
|
|
209
|
-
Wed, 12 May 2021 18:08:13 GMT
|
|
210
|
-
|
|
211
|
-
_Version update only_
|
|
212
|
-
|
|
213
|
-
## 2.15.1
|
|
214
|
-
Wed, 05 May 2021 13:18:31 GMT
|
|
215
|
-
|
|
216
|
-
_Version update only_
|
|
217
|
-
|
|
218
|
-
## 2.15.0
|
|
219
|
-
Fri, 30 Apr 2021 12:36:58 GMT
|
|
220
|
-
|
|
221
|
-
### Updates
|
|
222
|
-
|
|
223
|
-
- allow authConfig to be supplied from backend
|
|
224
|
-
- Fixes to desktop and iOS apps.
|
|
225
|
-
|
|
226
|
-
## 2.14.4
|
|
227
|
-
Thu, 22 Apr 2021 21:07:33 GMT
|
|
228
|
-
|
|
229
|
-
_Version update only_
|
|
230
|
-
|
|
231
|
-
## 2.14.3
|
|
232
|
-
Thu, 15 Apr 2021 15:13:16 GMT
|
|
233
|
-
|
|
234
|
-
_Version update only_
|
|
235
|
-
|
|
236
|
-
## 2.14.2
|
|
237
|
-
Thu, 08 Apr 2021 14:30:09 GMT
|
|
238
|
-
|
|
239
|
-
_Version update only_
|
|
240
|
-
|
|
241
|
-
## 2.14.1
|
|
242
|
-
Mon, 05 Apr 2021 16:28:00 GMT
|
|
243
|
-
|
|
244
|
-
### Updates
|
|
245
|
-
|
|
246
|
-
- allow authConfig to be supplied from backend
|
|
247
|
-
|
|
248
|
-
## 2.14.0
|
|
249
|
-
Fri, 02 Apr 2021 13:18:42 GMT
|
|
250
|
-
|
|
251
|
-
### Updates
|
|
252
|
-
|
|
253
|
-
- rework Authentication to use IpcHost
|
|
254
|
-
|
|
255
|
-
## 2.13.0
|
|
256
|
-
Tue, 09 Mar 2021 20:28:13 GMT
|
|
257
|
-
|
|
258
|
-
### Updates
|
|
259
|
-
|
|
260
|
-
- Remove unused code.
|
|
261
|
-
- Updated to use TypeScript 4.1
|
|
262
|
-
- begin rename project from iModel.js to iTwin.js
|
|
263
|
-
|
|
1
|
+
# Change Log - @itwin/core-mobile
|
|
2
|
+
|
|
3
|
+
This log was last generated on Tue, 21 Sep 2021 21:06:40 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 2.19.13
|
|
6
|
+
Tue, 21 Sep 2021 21:06:40 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 2.19.12
|
|
11
|
+
Wed, 15 Sep 2021 18:06:46 GMT
|
|
12
|
+
|
|
13
|
+
### Updates
|
|
14
|
+
|
|
15
|
+
- fix timming issue with authInit() called during startup()
|
|
16
|
+
|
|
17
|
+
## 2.19.11
|
|
18
|
+
Thu, 09 Sep 2021 21:04:58 GMT
|
|
19
|
+
|
|
20
|
+
_Version update only_
|
|
21
|
+
|
|
22
|
+
## 2.19.10
|
|
23
|
+
Wed, 08 Sep 2021 14:36:01 GMT
|
|
24
|
+
|
|
25
|
+
_Version update only_
|
|
26
|
+
|
|
27
|
+
## 2.19.9
|
|
28
|
+
Wed, 25 Aug 2021 15:36:01 GMT
|
|
29
|
+
|
|
30
|
+
_Version update only_
|
|
31
|
+
|
|
32
|
+
## 2.19.8
|
|
33
|
+
Mon, 23 Aug 2021 13:23:13 GMT
|
|
34
|
+
|
|
35
|
+
_Version update only_
|
|
36
|
+
|
|
37
|
+
## 2.19.7
|
|
38
|
+
Fri, 20 Aug 2021 17:47:22 GMT
|
|
39
|
+
|
|
40
|
+
### Updates
|
|
41
|
+
|
|
42
|
+
- remove request context from mobile auth client
|
|
43
|
+
|
|
44
|
+
## 2.19.6
|
|
45
|
+
Tue, 17 Aug 2021 20:34:29 GMT
|
|
46
|
+
|
|
47
|
+
_Version update only_
|
|
48
|
+
|
|
49
|
+
## 2.19.5
|
|
50
|
+
Fri, 13 Aug 2021 21:48:09 GMT
|
|
51
|
+
|
|
52
|
+
_Version update only_
|
|
53
|
+
|
|
54
|
+
## 2.19.4
|
|
55
|
+
Thu, 12 Aug 2021 13:09:26 GMT
|
|
56
|
+
|
|
57
|
+
_Version update only_
|
|
58
|
+
|
|
59
|
+
## 2.19.3
|
|
60
|
+
Wed, 04 Aug 2021 20:29:34 GMT
|
|
61
|
+
|
|
62
|
+
_Version update only_
|
|
63
|
+
|
|
64
|
+
## 2.19.2
|
|
65
|
+
Tue, 03 Aug 2021 18:26:23 GMT
|
|
66
|
+
|
|
67
|
+
_Version update only_
|
|
68
|
+
|
|
69
|
+
## 2.19.1
|
|
70
|
+
Thu, 29 Jul 2021 20:01:11 GMT
|
|
71
|
+
|
|
72
|
+
_Version update only_
|
|
73
|
+
|
|
74
|
+
## 2.19.0
|
|
75
|
+
Mon, 26 Jul 2021 12:21:25 GMT
|
|
76
|
+
|
|
77
|
+
### Updates
|
|
78
|
+
|
|
79
|
+
- remove internal barrel-import usage
|
|
80
|
+
|
|
81
|
+
## 2.18.4
|
|
82
|
+
Tue, 10 Aug 2021 19:35:13 GMT
|
|
83
|
+
|
|
84
|
+
_Version update only_
|
|
85
|
+
|
|
86
|
+
## 2.18.3
|
|
87
|
+
Wed, 28 Jul 2021 17:16:30 GMT
|
|
88
|
+
|
|
89
|
+
_Version update only_
|
|
90
|
+
|
|
91
|
+
## 2.18.2
|
|
92
|
+
Mon, 26 Jul 2021 16:18:31 GMT
|
|
93
|
+
|
|
94
|
+
_Version update only_
|
|
95
|
+
|
|
96
|
+
## 2.18.1
|
|
97
|
+
Fri, 16 Jul 2021 17:45:09 GMT
|
|
98
|
+
|
|
99
|
+
_Version update only_
|
|
100
|
+
|
|
101
|
+
## 2.18.0
|
|
102
|
+
Fri, 09 Jul 2021 18:11:24 GMT
|
|
103
|
+
|
|
104
|
+
_Version update only_
|
|
105
|
+
|
|
106
|
+
## 2.17.3
|
|
107
|
+
Mon, 26 Jul 2021 16:08:36 GMT
|
|
108
|
+
|
|
109
|
+
_Version update only_
|
|
110
|
+
|
|
111
|
+
## 2.17.2
|
|
112
|
+
Thu, 08 Jul 2021 15:23:00 GMT
|
|
113
|
+
|
|
114
|
+
_Version update only_
|
|
115
|
+
|
|
116
|
+
## 2.17.1
|
|
117
|
+
Fri, 02 Jul 2021 15:38:31 GMT
|
|
118
|
+
|
|
119
|
+
_Version update only_
|
|
120
|
+
|
|
121
|
+
## 2.17.0
|
|
122
|
+
Mon, 28 Jun 2021 16:20:11 GMT
|
|
123
|
+
|
|
124
|
+
### Updates
|
|
125
|
+
|
|
126
|
+
- set issuerurl correctly before calling authInit()
|
|
127
|
+
- set issuerurl correctly before calling authInit()
|
|
128
|
+
|
|
129
|
+
## 2.16.10
|
|
130
|
+
Thu, 22 Jul 2021 20:23:45 GMT
|
|
131
|
+
|
|
132
|
+
_Version update only_
|
|
133
|
+
|
|
134
|
+
## 2.16.9
|
|
135
|
+
Tue, 06 Jul 2021 22:08:34 GMT
|
|
136
|
+
|
|
137
|
+
_Version update only_
|
|
138
|
+
|
|
139
|
+
## 2.16.8
|
|
140
|
+
Fri, 02 Jul 2021 17:40:46 GMT
|
|
141
|
+
|
|
142
|
+
_Version update only_
|
|
143
|
+
|
|
144
|
+
## 2.16.7
|
|
145
|
+
Mon, 28 Jun 2021 18:13:04 GMT
|
|
146
|
+
|
|
147
|
+
_Version update only_
|
|
148
|
+
|
|
149
|
+
## 2.16.6
|
|
150
|
+
Mon, 28 Jun 2021 13:12:55 GMT
|
|
151
|
+
|
|
152
|
+
_Version update only_
|
|
153
|
+
|
|
154
|
+
## 2.16.5
|
|
155
|
+
Fri, 25 Jun 2021 16:03:01 GMT
|
|
156
|
+
|
|
157
|
+
_Version update only_
|
|
158
|
+
|
|
159
|
+
## 2.16.4
|
|
160
|
+
Wed, 23 Jun 2021 17:09:07 GMT
|
|
161
|
+
|
|
162
|
+
_Version update only_
|
|
163
|
+
|
|
164
|
+
## 2.16.3
|
|
165
|
+
Wed, 16 Jun 2021 20:29:32 GMT
|
|
166
|
+
|
|
167
|
+
_Version update only_
|
|
168
|
+
|
|
169
|
+
## 2.16.2
|
|
170
|
+
Thu, 03 Jun 2021 18:08:11 GMT
|
|
171
|
+
|
|
172
|
+
_Version update only_
|
|
173
|
+
|
|
174
|
+
## 2.16.1
|
|
175
|
+
Thu, 27 May 2021 20:04:22 GMT
|
|
176
|
+
|
|
177
|
+
_Version update only_
|
|
178
|
+
|
|
179
|
+
## 2.16.0
|
|
180
|
+
Mon, 24 May 2021 15:58:39 GMT
|
|
181
|
+
|
|
182
|
+
### Updates
|
|
183
|
+
|
|
184
|
+
- Android fixes
|
|
185
|
+
- Mobile fixes
|
|
186
|
+
- Fixes to desktop/mobile authorization
|
|
187
|
+
|
|
188
|
+
## 2.15.6
|
|
189
|
+
Wed, 26 May 2021 15:55:19 GMT
|
|
190
|
+
|
|
191
|
+
_Version update only_
|
|
192
|
+
|
|
193
|
+
## 2.15.5
|
|
194
|
+
Thu, 20 May 2021 15:06:26 GMT
|
|
195
|
+
|
|
196
|
+
_Version update only_
|
|
197
|
+
|
|
198
|
+
## 2.15.4
|
|
199
|
+
Tue, 18 May 2021 21:59:07 GMT
|
|
200
|
+
|
|
201
|
+
_Version update only_
|
|
202
|
+
|
|
203
|
+
## 2.15.3
|
|
204
|
+
Mon, 17 May 2021 13:31:38 GMT
|
|
205
|
+
|
|
206
|
+
_Version update only_
|
|
207
|
+
|
|
208
|
+
## 2.15.2
|
|
209
|
+
Wed, 12 May 2021 18:08:13 GMT
|
|
210
|
+
|
|
211
|
+
_Version update only_
|
|
212
|
+
|
|
213
|
+
## 2.15.1
|
|
214
|
+
Wed, 05 May 2021 13:18:31 GMT
|
|
215
|
+
|
|
216
|
+
_Version update only_
|
|
217
|
+
|
|
218
|
+
## 2.15.0
|
|
219
|
+
Fri, 30 Apr 2021 12:36:58 GMT
|
|
220
|
+
|
|
221
|
+
### Updates
|
|
222
|
+
|
|
223
|
+
- allow authConfig to be supplied from backend
|
|
224
|
+
- Fixes to desktop and iOS apps.
|
|
225
|
+
|
|
226
|
+
## 2.14.4
|
|
227
|
+
Thu, 22 Apr 2021 21:07:33 GMT
|
|
228
|
+
|
|
229
|
+
_Version update only_
|
|
230
|
+
|
|
231
|
+
## 2.14.3
|
|
232
|
+
Thu, 15 Apr 2021 15:13:16 GMT
|
|
233
|
+
|
|
234
|
+
_Version update only_
|
|
235
|
+
|
|
236
|
+
## 2.14.2
|
|
237
|
+
Thu, 08 Apr 2021 14:30:09 GMT
|
|
238
|
+
|
|
239
|
+
_Version update only_
|
|
240
|
+
|
|
241
|
+
## 2.14.1
|
|
242
|
+
Mon, 05 Apr 2021 16:28:00 GMT
|
|
243
|
+
|
|
244
|
+
### Updates
|
|
245
|
+
|
|
246
|
+
- allow authConfig to be supplied from backend
|
|
247
|
+
|
|
248
|
+
## 2.14.0
|
|
249
|
+
Fri, 02 Apr 2021 13:18:42 GMT
|
|
250
|
+
|
|
251
|
+
### Updates
|
|
252
|
+
|
|
253
|
+
- rework Authentication to use IpcHost
|
|
254
|
+
|
|
255
|
+
## 2.13.0
|
|
256
|
+
Tue, 09 Mar 2021 20:28:13 GMT
|
|
257
|
+
|
|
258
|
+
### Updates
|
|
259
|
+
|
|
260
|
+
- Remove unused code.
|
|
261
|
+
- Updated to use TypeScript 4.1
|
|
262
|
+
- begin rename project from iModel.js to iTwin.js
|
|
263
|
+
|
package/LICENSE.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# MIT License
|
|
2
|
-
|
|
3
|
-
Copyright © 2017-2021 Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
# MIT License
|
|
2
|
+
|
|
3
|
+
Copyright © 2017-2021 Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# @itwin/core-mobile
|
|
2
|
-
|
|
3
|
-
Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice. See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
The __@itwin/core-electron__ package contains the electron utilities to write an iTwin.js application based on Electron.
|
|
8
|
-
|
|
9
|
-
## Documentation
|
|
10
|
-
|
|
11
|
-
See the [iTwin.js](https://www.itwinjs.org) documentation for more information.
|
|
1
|
+
# @itwin/core-mobile
|
|
2
|
+
|
|
3
|
+
Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice. See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
|
|
5
|
+
## Description
|
|
6
|
+
|
|
7
|
+
The __@itwin/core-electron__ package contains the electron utilities to write an iTwin.js application based on Electron.
|
|
8
|
+
|
|
9
|
+
## Documentation
|
|
10
|
+
|
|
11
|
+
See the [iTwin.js](https://www.itwinjs.org) documentation for more information.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileBackend.js","sourceRoot":"","sources":["../../src/MobileBackend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,kDAAkD;AAElD,wDAAsC;AACtC,oDAAkC;AAClC,uDAAqC;AACrC,uEAAqD;AACrD,4DAA0C;AAC1C,8DAA4C","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n// Barrel file for backend of a mobile application\n\nexport * from \"./backend/AndroidHost\";\nexport * from \"./backend/iOSHost\";\nexport * from \"./backend/MobileHost\";\nexport * from \"./backend/MobileAuthorizationBackend\";\nexport * from \"./common/MobileRpcManager\";\nexport * from \"./backend/MobileFileHandler\";\n\n"]}
|
|
1
|
+
{"version":3,"file":"MobileBackend.js","sourceRoot":"","sources":["../../src/MobileBackend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,kDAAkD;AAElD,wDAAsC;AACtC,oDAAkC;AAClC,uDAAqC;AACrC,uEAAqD;AACrD,4DAA0C;AAC1C,8DAA4C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n// Barrel file for backend of a mobile application\r\n\r\nexport * from \"./backend/AndroidHost\";\r\nexport * from \"./backend/iOSHost\";\r\nexport * from \"./backend/MobileHost\";\r\nexport * from \"./backend/MobileAuthorizationBackend\";\r\nexport * from \"./common/MobileRpcManager\";\r\nexport * from \"./backend/MobileFileHandler\";\r\n\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileFrontend.js","sourceRoot":"","sources":["../../src/MobileFrontend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,wDAAsC;AACtC,oDAAkC;AAClC,uDAAqC;AACrC,4DAA0C","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nexport * from \"./frontend/AndroidApp\";\nexport * from \"./frontend/IOSApp\";\nexport * from \"./frontend/MobileApp\";\nexport * from \"./common/MobileRpcManager\";\n"]}
|
|
1
|
+
{"version":3,"file":"MobileFrontend.js","sourceRoot":"","sources":["../../src/MobileFrontend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,wDAAsC;AACtC,oDAAkC;AAClC,uDAAqC;AACrC,4DAA0C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nexport * from \"./frontend/AndroidApp\";\r\nexport * from \"./frontend/IOSApp\";\r\nexport * from \"./frontend/MobileApp\";\r\nexport * from \"./common/MobileRpcManager\";\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__DOC_ONLY__.js","sourceRoot":"","sources":["../../src/__DOC_ONLY__.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,sDAAsD;AACtD,0EAA0E;AAC1E,iCAAiC;AAEjC,wDAAsC;AACtC,oDAAkC;AAClC,uDAAqC;AACrC,4DAA0C;AAC1C,wDAAsC;AACtC,oDAAkC;AAClC,uDAAqC;AACrC,4DAA0C","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n// THIS FILE EXISTS ONLY FOR DOCUMENTATION GENERATION.\n// It imports both frontend and backend code, which is not legal anywhere.\n// Do not import it in real code!\n\nexport * from \"./frontend/AndroidApp\";\nexport * from \"./frontend/IOSApp\";\nexport * from \"./frontend/MobileApp\";\nexport * from \"./common/MobileRpcManager\";\nexport * from \"./backend/AndroidHost\";\nexport * from \"./backend/iOSHost\";\nexport * from \"./backend/MobileHost\";\nexport * from \"./common/MobileRpcManager\";\n\n"]}
|
|
1
|
+
{"version":3,"file":"__DOC_ONLY__.js","sourceRoot":"","sources":["../../src/__DOC_ONLY__.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;AAE/F,sDAAsD;AACtD,0EAA0E;AAC1E,iCAAiC;AAEjC,wDAAsC;AACtC,oDAAkC;AAClC,uDAAqC;AACrC,4DAA0C;AAC1C,wDAAsC;AACtC,oDAAkC;AAClC,uDAAqC;AACrC,4DAA0C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n// THIS FILE EXISTS ONLY FOR DOCUMENTATION GENERATION.\r\n// It imports both frontend and backend code, which is not legal anywhere.\r\n// Do not import it in real code!\r\n\r\nexport * from \"./frontend/AndroidApp\";\r\nexport * from \"./frontend/IOSApp\";\r\nexport * from \"./frontend/MobileApp\";\r\nexport * from \"./common/MobileRpcManager\";\r\nexport * from \"./backend/AndroidHost\";\r\nexport * from \"./backend/iOSHost\";\r\nexport * from \"./backend/MobileHost\";\r\nexport * from \"./common/MobileRpcManager\";\r\n\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AndroidHost.js","sourceRoot":"","sources":["../../../src/backend/AndroidHost.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,oDAAyD;AACzD,6CAAwE;AAKxE,YAAY;AACZ,MAAa,WAAY,SAAQ,uBAAU;IACzC;;OAEG;IACI,MAAM,CAAU,KAAK,CAAC,OAAO,CAAC,GAAqB;;QACxD,MAAM,MAAM,GAAG,MAAA,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,0CAAE,MAAM,mCAAI,IAAK,yBAAoB,EAAE,CAAC;QACtE,MAAM,MAAM,GAAG,MAAA,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,0CAAE,MAAM,mCAAI,IAAI,iCAAmB,EAAE,CAAC;QACjE,OAAO,uBAAU,CAAC,OAAO,CAAC,EAAE,GAAG,GAAG,EAAE,UAAU,EAAE,EAAE,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IAC1H,CAAC;CACF;AATD,kCASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { IpcWebSocketBackend } from \"@itwin/core-common\";\nimport { MobileDevice, MobileHost, MobileHostOpts } from \"./MobileHost\";\n\n/** @beta */\nexport type AndroidHostOpts = MobileHostOpts;\n\n/** @beta */\nexport class AndroidHost extends MobileHost {\n /**\n * Start the backend of an Android app.\n */\n public static override async startup(opt?: AndroidHostOpts): Promise<void> {\n const device = opt?.mobileHost?.device ?? new (MobileDevice as any)();\n const socket = opt?.ipcHost?.socket ?? new IpcWebSocketBackend();\n return MobileHost.startup({ ...opt, mobileHost: { ...opt?.mobileHost, device }, ipcHost: { ...opt?.ipcHost, socket } });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AndroidHost.js","sourceRoot":"","sources":["../../../src/backend/AndroidHost.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,oDAAyD;AACzD,6CAAwE;AAKxE,YAAY;AACZ,MAAa,WAAY,SAAQ,uBAAU;IACzC;;OAEG;IACI,MAAM,CAAU,KAAK,CAAC,OAAO,CAAC,GAAqB;;QACxD,MAAM,MAAM,GAAG,MAAA,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,0CAAE,MAAM,mCAAI,IAAK,yBAAoB,EAAE,CAAC;QACtE,MAAM,MAAM,GAAG,MAAA,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,0CAAE,MAAM,mCAAI,IAAI,iCAAmB,EAAE,CAAC;QACjE,OAAO,uBAAU,CAAC,OAAO,CAAC,EAAE,GAAG,GAAG,EAAE,UAAU,EAAE,EAAE,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IAC1H,CAAC;CACF;AATD,kCASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { IpcWebSocketBackend } from \"@itwin/core-common\";\r\nimport { MobileDevice, MobileHost, MobileHostOpts } from \"./MobileHost\";\r\n\r\n/** @beta */\r\nexport type AndroidHostOpts = MobileHostOpts;\r\n\r\n/** @beta */\r\nexport class AndroidHost extends MobileHost {\r\n /**\r\n * Start the backend of an Android app.\r\n */\r\n public static override async startup(opt?: AndroidHostOpts): Promise<void> {\r\n const device = opt?.mobileHost?.device ?? new (MobileDevice as any)();\r\n const socket = opt?.ipcHost?.socket ?? new IpcWebSocketBackend();\r\n return MobileHost.startup({ ...opt, mobileHost: { ...opt?.mobileHost, device }, ipcHost: { ...opt?.ipcHost, socket } });\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileAuthorizationBackend.js","sourceRoot":"","sources":["../../../src/backend/MobileAuthorizationBackend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA0D;AAC1D,sDAAoE;AAEpE,6CAA0C;AAE1C;;GAEG;AACH,MAAa,0BAA2B,SAAQ,4CAA6B;IAI3E,YAAmB,MAA4C;QAC7D,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAJD,IAAW,WAAW,iBAAK,OAAO,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,WAAW,mCAAI,0BAA0B,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAM9G,0FAA0F;IAC1E,KAAK,CAAC,UAAU,CAAC,MAA4C;QAC3E,MAAM,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC/B,IAAA,qBAAM,EAAC,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE,mDAAmD,CAAC,CAAC;QAEvH,uBAAU,CAAC,MAAM,CAAC,gBAAgB,GAAG,CAAC,WAAyB,EAAE,EAAE;YACjE,IAAI,CAAC,cAAc,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAC,CAAC;QACzC,CAAC,CAAC;QAEF,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC3C,IAAA,qBAAM,EAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC;YAClC,uBAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,GAAY,EAAE,EAAE;gBACzF,IAAI,CAAC,GAAG,EAAE;oBACR,OAAO,EAAE,CAAC;iBACX;qBAAM;oBACL,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;iBACxB;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,gCAAgC;IACzB,KAAK,CAAC,MAAM;QACjB,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC3C,uBAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAY,EAAE,EAAE;gBAC5C,IAAI,CAAC,GAAG,EAAE;oBACR,OAAO,EAAE,CAAC;iBACX;qBAAM;oBACL,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;iBACxB;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,iCAAiC;IAC1B,KAAK,CAAC,OAAO;QAClB,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC3C,uBAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,GAAY,EAAE,EAAE;gBAC7C,IAAI,CAAC,GAAG,EAAE;oBACR,OAAO,EAAE,CAAC;iBACX;qBAAM;oBACL,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;iBACxB;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,yBAAyB;IAClB,KAAK,CAAC,YAAY;QACvB,OAAO,IAAI,OAAO,CAAc,CAAC,OAAO,EAAE,EAAE;YAC1C,uBAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,eAA6B,EAAE,EAAE;gBACrE,OAAO,CAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE,CAAC,CAAC;YACjC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;;AA9DH,gEA+DC;AA9De,6CAAkB,GAAG,gCAAgC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OIDC\n */\n\nimport { AccessToken, assert } from \"@itwin/core-bentley\";\nimport { NativeAppAuthorizationBackend } from \"@itwin/core-backend\";\nimport { NativeAppAuthorizationConfiguration } from \"@itwin/core-common\";\nimport { MobileHost } from \"./MobileHost\";\n\n/** Utility to provide OIDC/OAuth tokens from native ios app to frontend\n * @internal\n */\nexport class MobileAuthorizationBackend extends NativeAppAuthorizationBackend {\n public static defaultRedirectUri = \"imodeljs://app/signin-callback\";\n public get redirectUri() { return this.config?.redirectUri ?? MobileAuthorizationBackend.defaultRedirectUri; }\n\n public constructor(config?: NativeAppAuthorizationConfiguration) {\n super(config);\n }\n\n /** Used to initialize the client - must be awaited before any other methods are called */\n public override async initialize(config?: NativeAppAuthorizationConfiguration): Promise<void> {\n await super.initialize(config);\n assert(this.config !== undefined && this.issuerUrl !== undefined, \"URL of authorization provider was not initialized\");\n\n MobileHost.device.authStateChanged = (tokenString?: AccessToken) => {\n this.setAccessToken(tokenString ?? \"\");\n };\n\n return new Promise<void>((resolve, reject) => {\n assert(this.config !== undefined);\n MobileHost.device.authInit({ ...this.config, issuerUrl: this.issuerUrl }, (err?: string) => {\n if (!err) {\n resolve();\n } else {\n reject(new Error(err));\n }\n });\n });\n }\n\n /** Start the sign-in process */\n public async signIn(): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n MobileHost.device.authSignIn((err?: string) => {\n if (!err) {\n resolve();\n } else {\n reject(new Error(err));\n }\n });\n });\n }\n\n /** Start the sign-out process */\n public async signOut(): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n MobileHost.device.authSignOut((err?: string) => {\n if (!err) {\n resolve();\n } else {\n reject(new Error(err));\n }\n });\n });\n }\n\n /** return accessToken */\n public async refreshToken(): Promise<AccessToken> {\n return new Promise<AccessToken>((resolve) => {\n MobileHost.device.authGetAccessToken((tokenStringJson?: AccessToken) => {\n resolve(tokenStringJson ?? \"\");\n });\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"MobileAuthorizationBackend.js","sourceRoot":"","sources":["../../../src/backend/MobileAuthorizationBackend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA0D;AAC1D,sDAAoE;AAEpE,6CAA0C;AAE1C;;GAEG;AACH,MAAa,0BAA2B,SAAQ,4CAA6B;IAI3E,YAAmB,MAA4C;QAC7D,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAJD,IAAW,WAAW,iBAAK,OAAO,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,WAAW,mCAAI,0BAA0B,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAM9G,0FAA0F;IAC1E,KAAK,CAAC,UAAU,CAAC,MAA4C;QAC3E,MAAM,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC/B,IAAA,qBAAM,EAAC,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE,mDAAmD,CAAC,CAAC;QAEvH,uBAAU,CAAC,MAAM,CAAC,gBAAgB,GAAG,CAAC,WAAyB,EAAE,EAAE;YACjE,IAAI,CAAC,cAAc,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAC,CAAC;QACzC,CAAC,CAAC;QAEF,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC3C,IAAA,qBAAM,EAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC;YAClC,uBAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,GAAY,EAAE,EAAE;gBACzF,IAAI,CAAC,GAAG,EAAE;oBACR,OAAO,EAAE,CAAC;iBACX;qBAAM;oBACL,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;iBACxB;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,gCAAgC;IACzB,KAAK,CAAC,MAAM;QACjB,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC3C,uBAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAY,EAAE,EAAE;gBAC5C,IAAI,CAAC,GAAG,EAAE;oBACR,OAAO,EAAE,CAAC;iBACX;qBAAM;oBACL,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;iBACxB;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,iCAAiC;IAC1B,KAAK,CAAC,OAAO;QAClB,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC3C,uBAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,GAAY,EAAE,EAAE;gBAC7C,IAAI,CAAC,GAAG,EAAE;oBACR,OAAO,EAAE,CAAC;iBACX;qBAAM;oBACL,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;iBACxB;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,yBAAyB;IAClB,KAAK,CAAC,YAAY;QACvB,OAAO,IAAI,OAAO,CAAc,CAAC,OAAO,EAAE,EAAE;YAC1C,uBAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,eAA6B,EAAE,EAAE;gBACrE,OAAO,CAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE,CAAC,CAAC;YACjC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;;AA9DH,gEA+DC;AA9De,6CAAkB,GAAG,gCAAgC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OIDC\r\n */\r\n\r\nimport { AccessToken, assert } from \"@itwin/core-bentley\";\r\nimport { NativeAppAuthorizationBackend } from \"@itwin/core-backend\";\r\nimport { NativeAppAuthorizationConfiguration } from \"@itwin/core-common\";\r\nimport { MobileHost } from \"./MobileHost\";\r\n\r\n/** Utility to provide OIDC/OAuth tokens from native ios app to frontend\r\n * @internal\r\n */\r\nexport class MobileAuthorizationBackend extends NativeAppAuthorizationBackend {\r\n public static defaultRedirectUri = \"imodeljs://app/signin-callback\";\r\n public get redirectUri() { return this.config?.redirectUri ?? MobileAuthorizationBackend.defaultRedirectUri; }\r\n\r\n public constructor(config?: NativeAppAuthorizationConfiguration) {\r\n super(config);\r\n }\r\n\r\n /** Used to initialize the client - must be awaited before any other methods are called */\r\n public override async initialize(config?: NativeAppAuthorizationConfiguration): Promise<void> {\r\n await super.initialize(config);\r\n assert(this.config !== undefined && this.issuerUrl !== undefined, \"URL of authorization provider was not initialized\");\r\n\r\n MobileHost.device.authStateChanged = (tokenString?: AccessToken) => {\r\n this.setAccessToken(tokenString ?? \"\");\r\n };\r\n\r\n return new Promise<void>((resolve, reject) => {\r\n assert(this.config !== undefined);\r\n MobileHost.device.authInit({ ...this.config, issuerUrl: this.issuerUrl }, (err?: string) => {\r\n if (!err) {\r\n resolve();\r\n } else {\r\n reject(new Error(err));\r\n }\r\n });\r\n });\r\n }\r\n\r\n /** Start the sign-in process */\r\n public async signIn(): Promise<void> {\r\n return new Promise<void>((resolve, reject) => {\r\n MobileHost.device.authSignIn((err?: string) => {\r\n if (!err) {\r\n resolve();\r\n } else {\r\n reject(new Error(err));\r\n }\r\n });\r\n });\r\n }\r\n\r\n /** Start the sign-out process */\r\n public async signOut(): Promise<void> {\r\n return new Promise<void>((resolve, reject) => {\r\n MobileHost.device.authSignOut((err?: string) => {\r\n if (!err) {\r\n resolve();\r\n } else {\r\n reject(new Error(err));\r\n }\r\n });\r\n });\r\n }\r\n\r\n /** return accessToken */\r\n public async refreshToken(): Promise<AccessToken> {\r\n return new Promise<AccessToken>((resolve) => {\r\n MobileHost.device.authGetAccessToken((tokenStringJson?: AccessToken) => {\r\n resolve(tokenStringJson ?? \"\");\r\n });\r\n });\r\n }\r\n}\r\n"]}
|