@doordeck/doordeck-headless-sdk 0.45.0 → 0.47.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/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js +1394 -1464
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +19 -21
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +6 -8
- package/kotlin/Stately-stately-concurrency.js +6 -8
- package/kotlin/Stately-stately-concurrent-collections.js +53 -55
- package/kotlin/Stately-stately-strict.js +0 -2
- package/kotlin/doordeck-sdk.js +11765 -11217
- package/kotlin/kotlin-kotlin-stdlib.js +1938 -1924
- package/kotlin/kotlin-kotlinx-atomicfu-runtime.js +0 -2
- package/kotlin/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +0 -2
- package/kotlin/kotlinx-atomicfu.js +13 -15
- package/kotlin/kotlinx-coroutines-core.js +2051 -2089
- package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +0 -2
- package/kotlin/kotlinx-io-kotlinx-io-core.js +559 -550
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1849 -1872
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json-io.js +0 -2
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1523 -1523
- package/kotlin/ktor-ktor-client-ktor-client-core.js +2832 -2843
- package/kotlin/ktor-ktor-client-ktor-client-js.js +0 -2
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js +388 -391
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js +198 -199
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-encoding.js +0 -2
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-logging.js +0 -2
- package/kotlin/ktor-ktor-http.js +833 -860
- package/kotlin/ktor-ktor-io.js +641 -653
- package/kotlin/ktor-ktor-shared-ktor-events.js +7 -10
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx-ktor-serialization-kotlinx-json.js +7 -9
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx.js +266 -263
- package/kotlin/ktor-ktor-shared-ktor-serialization.js +113 -111
- package/kotlin/ktor-ktor-shared-ktor-sse.js +0 -2
- package/kotlin/ktor-ktor-shared-ktor-websocket-serialization.js +0 -2
- package/kotlin/ktor-ktor-shared-ktor-websockets.js +46 -46
- package/kotlin/ktor-ktor-utils.js +590 -606
- package/kotlin/projects-core-koin-core.js +299 -316
- package/package.json +4 -3
- package/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js.map +0 -1
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js.map +0 -1
- package/kotlin/MultiplatformSettings-multiplatform-settings.js.map +0 -1
- package/kotlin/Stately-stately-concurrency.js.map +0 -1
- package/kotlin/Stately-stately-concurrent-collections.js.map +0 -1
- package/kotlin/Stately-stately-strict.js.map +0 -1
- package/kotlin/doordeck-sdk.js.map +0 -1
- package/kotlin/kotlin-kotlin-stdlib.js.map +0 -1
- package/kotlin/kotlin-kotlinx-atomicfu-runtime.js.map +0 -1
- package/kotlin/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +0 -1
- package/kotlin/kotlinx-atomicfu.js.map +0 -1
- package/kotlin/kotlinx-coroutines-core.js.map +0 -1
- package/kotlin/kotlinx-io-kotlinx-io-bytestring.js.map +0 -1
- package/kotlin/kotlinx-io-kotlinx-io-core.js.map +0 -1
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js.map +0 -1
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json-io.js.map +0 -1
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js.map +0 -1
- package/kotlin/ktor-ktor-client-ktor-client-core.js.map +0 -1
- package/kotlin/ktor-ktor-client-ktor-client-js.js.map +0 -1
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js.map +0 -1
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js.map +0 -1
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-encoding.js.map +0 -1
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-logging.js.map +0 -1
- package/kotlin/ktor-ktor-http.js.map +0 -1
- package/kotlin/ktor-ktor-io.js.map +0 -1
- package/kotlin/ktor-ktor-shared-ktor-events.js.map +0 -1
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx-ktor-serialization-kotlinx-json.js.map +0 -1
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx.js.map +0 -1
- package/kotlin/ktor-ktor-shared-ktor-serialization.js.map +0 -1
- package/kotlin/ktor-ktor-shared-ktor-sse.js.map +0 -1
- package/kotlin/ktor-ktor-shared-ktor-websocket-serialization.js.map +0 -1
- package/kotlin/ktor-ktor-shared-ktor-websockets.js.map +0 -1
- package/kotlin/ktor-ktor-utils.js.map +0 -1
- package/kotlin/projects-core-koin-core.js.map +0 -1
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
initMetadataForCoroutine($invoke$refreshTokenIfNeededCOROUTINE$0, CoroutineImpl);
|
|
60
60
|
initMetadataForCoroutine($invoke$executeWithNewTokenCOROUTINE$1, CoroutineImpl);
|
|
61
61
|
function sendWithoutRequest(request) {
|
|
62
|
-
return this.
|
|
62
|
+
return this.l44();
|
|
63
63
|
}
|
|
64
64
|
function addRequestHeaders$default(request, authHeader, $completion, $super) {
|
|
65
65
|
authHeader = authHeader === VOID ? null : authHeader;
|
|
66
|
-
return $super === VOID ? this.
|
|
66
|
+
return $super === VOID ? this.k44(request, authHeader, $completion) : $super.k44.call(this, request, authHeader, $completion);
|
|
67
67
|
}
|
|
68
68
|
function refreshToken(response, $completion) {
|
|
69
69
|
return true;
|
|
@@ -105,10 +105,10 @@
|
|
|
105
105
|
function AuthConfig() {
|
|
106
106
|
var tmp = this;
|
|
107
107
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
108
|
-
tmp.
|
|
108
|
+
tmp.k41_1 = ArrayList_init_$Create$();
|
|
109
109
|
}
|
|
110
110
|
function AtomicCounter() {
|
|
111
|
-
this.
|
|
111
|
+
this.l41_1 = atomic$int$1(0);
|
|
112
112
|
}
|
|
113
113
|
function AuthConfig$_init_$ref_ms3pb9() {
|
|
114
114
|
var l = function () {
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
}
|
|
120
120
|
function Auth$lambda($this$createClientPlugin) {
|
|
121
121
|
_init_properties_Auth_kt__9ob1dk();
|
|
122
|
-
var providers = toList($this$createClientPlugin.
|
|
123
|
-
$this$createClientPlugin.
|
|
122
|
+
var providers = toList($this$createClientPlugin.q34_1.k41_1);
|
|
123
|
+
$this$createClientPlugin.p34_1.h2u_1.t27(get_AuthProvidersKey(), providers);
|
|
124
124
|
var tokenVersions = new ConcurrentMap();
|
|
125
125
|
// Inline function 'io.ktor.util.AttributeKey' call
|
|
126
126
|
var name = 'ProviderVersionAttributeKey';
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
130
130
|
var tmp_0;
|
|
131
131
|
try {
|
|
132
|
-
tmp_0 = createKType(getKClass(KtMutableMap), arrayOf([createInvariantKTypeProjection(createKType(getKClass(AuthProvider), arrayOf([]), false)), createInvariantKTypeProjection(createKType(PrimitiveClasses_getInstance().
|
|
132
|
+
tmp_0 = createKType(getKClass(KtMutableMap), arrayOf([createInvariantKTypeProjection(createKType(getKClass(AuthProvider), arrayOf([]), false)), createInvariantKTypeProjection(createKType(PrimitiveClasses_getInstance().gc(), arrayOf([]), false))]), false);
|
|
133
133
|
} catch ($p) {
|
|
134
134
|
var tmp_1;
|
|
135
135
|
if ($p instanceof Error) {
|
|
@@ -143,13 +143,13 @@
|
|
|
143
143
|
var tmp$ret$0 = tmp_0;
|
|
144
144
|
var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
|
|
145
145
|
var tokenVersionsAttributeKey = new AttributeKey(name, tmp$ret$1);
|
|
146
|
-
$this$createClientPlugin.
|
|
146
|
+
$this$createClientPlugin.w3m(Auth$lambda$slambda_0(providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
147
147
|
var tmp_2 = Send_instance;
|
|
148
|
-
$this$createClientPlugin.
|
|
148
|
+
$this$createClientPlugin.t34(tmp_2, Auth$lambda$slambda_2(providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
149
149
|
return Unit_instance;
|
|
150
150
|
}
|
|
151
151
|
function invoke$findProvider(call, candidateProviders) {
|
|
152
|
-
var headerValues = call.
|
|
152
|
+
var headerValues = call.e2v().y2j().h29(HttpHeaders_getInstance().x2i_1);
|
|
153
153
|
var tmp;
|
|
154
154
|
if (headerValues == null) {
|
|
155
155
|
tmp = null;
|
|
@@ -157,9 +157,9 @@
|
|
|
157
157
|
// Inline function 'kotlin.collections.map' call
|
|
158
158
|
// Inline function 'kotlin.collections.mapTo' call
|
|
159
159
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(headerValues, 10));
|
|
160
|
-
var
|
|
161
|
-
while (
|
|
162
|
-
var item =
|
|
160
|
+
var _iterator__ex2g4s = headerValues.p();
|
|
161
|
+
while (_iterator__ex2g4s.q()) {
|
|
162
|
+
var item = _iterator__ex2g4s.r();
|
|
163
163
|
// Inline function 'io.ktor.client.plugins.auth.Auth$lambda.invoke.findProvider.<anonymous>' call
|
|
164
164
|
var tmp$ret$0 = parseAuthorizationHeaders(item);
|
|
165
165
|
destination.k(tmp$ret$0);
|
|
@@ -173,25 +173,25 @@
|
|
|
173
173
|
if (authHeaders.h() && candidateProviders.s() === 1) {
|
|
174
174
|
tmp_0 = to(first(candidateProviders), null);
|
|
175
175
|
} else if (authHeaders.h()) {
|
|
176
|
-
get_LOGGER().
|
|
176
|
+
get_LOGGER().u2d('401 response ' + call.n2y().q2y().toString() + ' has no or empty "WWW-Authenticate" header. ' + 'Can not add or refresh token');
|
|
177
177
|
tmp_0 = null;
|
|
178
178
|
} else {
|
|
179
179
|
var tmp$ret$9;
|
|
180
180
|
$l$block_0: {
|
|
181
181
|
// Inline function 'kotlin.collections.firstNotNullOfOrNull' call
|
|
182
|
-
var
|
|
183
|
-
while (
|
|
184
|
-
var element =
|
|
182
|
+
var _iterator__ex2g4s_0 = authHeaders.p();
|
|
183
|
+
while (_iterator__ex2g4s_0.q()) {
|
|
184
|
+
var element = _iterator__ex2g4s_0.r();
|
|
185
185
|
// Inline function 'io.ktor.client.plugins.auth.Auth$lambda.invoke.findProvider.<anonymous>' call
|
|
186
186
|
// Inline function 'kotlin.collections.find' call
|
|
187
187
|
var tmp$ret$4;
|
|
188
188
|
$l$block: {
|
|
189
189
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
190
|
-
var
|
|
191
|
-
while (
|
|
192
|
-
var element_0 =
|
|
190
|
+
var _iterator__ex2g4s_1 = candidateProviders.p();
|
|
191
|
+
while (_iterator__ex2g4s_1.q()) {
|
|
192
|
+
var element_0 = _iterator__ex2g4s_1.r();
|
|
193
193
|
// Inline function 'io.ktor.client.plugins.auth.Auth$lambda.invoke.findProvider.<anonymous>.<anonymous>' call
|
|
194
|
-
if (element_0.
|
|
194
|
+
if (element_0.m41(element)) {
|
|
195
195
|
tmp$ret$4 = element_0;
|
|
196
196
|
break $l$block;
|
|
197
197
|
}
|
|
@@ -204,7 +204,6 @@
|
|
|
204
204
|
tmp_1 = null;
|
|
205
205
|
} else {
|
|
206
206
|
// Inline function 'kotlin.let' call
|
|
207
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
208
207
|
// Inline function 'io.ktor.client.plugins.auth.Auth$lambda.invoke.findProvider.<anonymous>.<anonymous>' call
|
|
209
208
|
tmp_1 = to(tmp0_safe_receiver, element);
|
|
210
209
|
}
|
|
@@ -222,15 +221,15 @@
|
|
|
222
221
|
}
|
|
223
222
|
function invoke$refreshTokenIfNeeded(tokenVersions, tokenVersionsAttributeKey, call, provider, request, $completion) {
|
|
224
223
|
var tmp = new $invoke$refreshTokenIfNeededCOROUTINE$0(tokenVersions, tokenVersionsAttributeKey, call, provider, request, $completion);
|
|
225
|
-
tmp.
|
|
226
|
-
tmp.
|
|
227
|
-
return tmp.
|
|
224
|
+
tmp.g9_1 = Unit_instance;
|
|
225
|
+
tmp.h9_1 = null;
|
|
226
|
+
return tmp.m9();
|
|
228
227
|
}
|
|
229
228
|
function invoke$executeWithNewToken(_this__u8e3s4, call, provider, oldRequest, authHeader, $completion) {
|
|
230
229
|
var tmp = new $invoke$executeWithNewTokenCOROUTINE$1(_this__u8e3s4, call, provider, oldRequest, authHeader, $completion);
|
|
231
|
-
tmp.
|
|
232
|
-
tmp.
|
|
233
|
-
return tmp.
|
|
230
|
+
tmp.g9_1 = Unit_instance;
|
|
231
|
+
tmp.h9_1 = null;
|
|
232
|
+
return tmp.m9();
|
|
234
233
|
}
|
|
235
234
|
function Auth$lambda$slambda$lambda() {
|
|
236
235
|
return new AtomicCounter();
|
|
@@ -240,222 +239,224 @@
|
|
|
240
239
|
return LinkedHashMap_init_$Create$();
|
|
241
240
|
}
|
|
242
241
|
function Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
243
|
-
this.
|
|
244
|
-
this.
|
|
245
|
-
this.
|
|
242
|
+
this.z42_1 = $providers;
|
|
243
|
+
this.a43_1 = $tokenVersions;
|
|
244
|
+
this.b43_1 = $tokenVersionsAttributeKey;
|
|
246
245
|
CoroutineImpl.call(this, resultContinuation);
|
|
247
246
|
}
|
|
248
|
-
protoOf(Auth$lambda$slambda).
|
|
249
|
-
var tmp = this.
|
|
250
|
-
tmp.
|
|
251
|
-
tmp.
|
|
252
|
-
return tmp.
|
|
247
|
+
protoOf(Auth$lambda$slambda).j3n = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
248
|
+
var tmp = this.k3n($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
249
|
+
tmp.g9_1 = Unit_instance;
|
|
250
|
+
tmp.h9_1 = null;
|
|
251
|
+
return tmp.m9();
|
|
253
252
|
};
|
|
254
|
-
protoOf(Auth$lambda$slambda).
|
|
253
|
+
protoOf(Auth$lambda$slambda).l3n = function (p1, p2, p3, $completion) {
|
|
255
254
|
var tmp = p1 instanceof OnRequestContext ? p1 : THROW_CCE();
|
|
256
255
|
var tmp_0 = p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE();
|
|
257
|
-
return this.
|
|
256
|
+
return this.j3n(tmp, tmp_0, !(p3 == null) ? p3 : THROW_CCE(), $completion);
|
|
258
257
|
};
|
|
259
|
-
protoOf(Auth$lambda$slambda).
|
|
260
|
-
var suspendResult = this.
|
|
258
|
+
protoOf(Auth$lambda$slambda).m9 = function () {
|
|
259
|
+
var suspendResult = this.g9_1;
|
|
261
260
|
$sm: do
|
|
262
261
|
try {
|
|
263
|
-
var tmp = this.
|
|
262
|
+
var tmp = this.e9_1;
|
|
264
263
|
switch (tmp) {
|
|
265
264
|
case 0:
|
|
266
|
-
this.
|
|
265
|
+
this.f9_1 = 4;
|
|
267
266
|
var tmp_0 = this;
|
|
268
|
-
var
|
|
267
|
+
var tmp0 = this.z42_1;
|
|
269
268
|
var destination = ArrayList_init_$Create$();
|
|
270
|
-
var
|
|
271
|
-
while (
|
|
272
|
-
var element =
|
|
273
|
-
if (element.
|
|
269
|
+
var _iterator__ex2g4s = tmp0.p();
|
|
270
|
+
while (_iterator__ex2g4s.q()) {
|
|
271
|
+
var element = _iterator__ex2g4s.r();
|
|
272
|
+
if (element.n43(this.d43_1)) {
|
|
274
273
|
destination.k(element);
|
|
275
274
|
}
|
|
276
275
|
}
|
|
277
276
|
|
|
278
|
-
tmp_0.
|
|
279
|
-
this.
|
|
280
|
-
this.
|
|
277
|
+
tmp_0.f43_1 = destination;
|
|
278
|
+
this.g43_1 = this.f43_1;
|
|
279
|
+
this.h43_1 = this.g43_1.p();
|
|
280
|
+
this.e9_1 = 1;
|
|
281
281
|
continue $sm;
|
|
282
282
|
case 1:
|
|
283
|
-
if (!this.
|
|
284
|
-
this.
|
|
283
|
+
if (!this.h43_1.q()) {
|
|
284
|
+
this.e9_1 = 3;
|
|
285
285
|
continue $sm;
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
this.
|
|
288
|
+
this.i43_1 = this.h43_1.r();
|
|
289
289
|
var tmp_1 = this;
|
|
290
|
-
tmp_1.
|
|
291
|
-
|
|
290
|
+
tmp_1.j43_1 = this.i43_1;
|
|
291
|
+
this.k43_1 = this.j43_1;
|
|
292
|
+
get_LOGGER().u2d('Adding auth headers for ' + this.d43_1.e2w_1.toString() + ' from provider ' + toString(this.k43_1));
|
|
292
293
|
var tmp_2 = this;
|
|
293
|
-
tmp_2.
|
|
294
|
+
tmp_2.l43_1 = this.a43_1.m2d(this.k43_1, Auth$lambda$slambda$lambda);
|
|
294
295
|
var tmp_3 = this;
|
|
295
|
-
tmp_3.
|
|
296
|
-
var
|
|
297
|
-
var
|
|
298
|
-
var value = this.
|
|
299
|
-
|
|
300
|
-
this.
|
|
301
|
-
suspendResult = this.
|
|
296
|
+
tmp_3.m43_1 = this.d43_1.j2w_1.v27(this.b43_1, Auth$lambda$slambda$lambda_0);
|
|
297
|
+
var tmp0_0 = this.m43_1;
|
|
298
|
+
var tmp1 = this.k43_1;
|
|
299
|
+
var value = this.l43_1.l41_1.kotlinx$atomicfu$value;
|
|
300
|
+
tmp0_0.n2(tmp1, value);
|
|
301
|
+
this.e9_1 = 2;
|
|
302
|
+
suspendResult = this.k43_1.o43(this.d43_1, VOID, this);
|
|
302
303
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
303
304
|
return suspendResult;
|
|
304
305
|
}
|
|
305
306
|
|
|
306
307
|
continue $sm;
|
|
307
308
|
case 2:
|
|
308
|
-
this.
|
|
309
|
+
this.e9_1 = 1;
|
|
309
310
|
continue $sm;
|
|
310
311
|
case 3:
|
|
311
312
|
return Unit_instance;
|
|
312
313
|
case 4:
|
|
313
|
-
throw this.
|
|
314
|
+
throw this.h9_1;
|
|
314
315
|
}
|
|
315
316
|
} catch ($p) {
|
|
316
317
|
var e = $p;
|
|
317
|
-
if (this.
|
|
318
|
+
if (this.f9_1 === 4) {
|
|
318
319
|
throw e;
|
|
319
320
|
} else {
|
|
320
|
-
this.
|
|
321
|
-
this.
|
|
321
|
+
this.e9_1 = this.f9_1;
|
|
322
|
+
this.h9_1 = e;
|
|
322
323
|
}
|
|
323
324
|
}
|
|
324
325
|
while (true);
|
|
325
326
|
};
|
|
326
|
-
protoOf(Auth$lambda$slambda).
|
|
327
|
-
var i = new Auth$lambda$slambda(this.
|
|
328
|
-
i.
|
|
329
|
-
i.
|
|
330
|
-
i.
|
|
327
|
+
protoOf(Auth$lambda$slambda).k3n = function ($this$onRequest, request, _unused_var__etf5q3, completion) {
|
|
328
|
+
var i = new Auth$lambda$slambda(this.z42_1, this.a43_1, this.b43_1, completion);
|
|
329
|
+
i.c43_1 = $this$onRequest;
|
|
330
|
+
i.d43_1 = request;
|
|
331
|
+
i.e43_1 = _unused_var__etf5q3;
|
|
331
332
|
return i;
|
|
332
333
|
};
|
|
333
334
|
function Auth$lambda$slambda_0($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
334
335
|
var i = new Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
335
336
|
var l = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
336
|
-
return i.
|
|
337
|
+
return i.j3n($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
337
338
|
};
|
|
338
339
|
l.$arity = 3;
|
|
339
340
|
return l;
|
|
340
341
|
}
|
|
341
342
|
function Auth$lambda$slambda_1($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
342
|
-
this.
|
|
343
|
-
this.
|
|
344
|
-
this.
|
|
343
|
+
this.x43_1 = $providers;
|
|
344
|
+
this.y43_1 = $tokenVersions;
|
|
345
|
+
this.z43_1 = $tokenVersionsAttributeKey;
|
|
345
346
|
CoroutineImpl.call(this, resultContinuation);
|
|
346
347
|
}
|
|
347
|
-
protoOf(Auth$lambda$slambda_1).
|
|
348
|
-
var tmp = this.
|
|
349
|
-
tmp.
|
|
350
|
-
tmp.
|
|
351
|
-
return tmp.
|
|
348
|
+
protoOf(Auth$lambda$slambda_1).q3d = function ($this$on, originalRequest, $completion) {
|
|
349
|
+
var tmp = this.r3d($this$on, originalRequest, $completion);
|
|
350
|
+
tmp.g9_1 = Unit_instance;
|
|
351
|
+
tmp.h9_1 = null;
|
|
352
|
+
return tmp.m9();
|
|
352
353
|
};
|
|
353
|
-
protoOf(Auth$lambda$slambda_1).
|
|
354
|
+
protoOf(Auth$lambda$slambda_1).x9 = function (p1, p2, $completion) {
|
|
354
355
|
var tmp = p1 instanceof Sender ? p1 : THROW_CCE();
|
|
355
|
-
return this.
|
|
356
|
+
return this.q3d(tmp, p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE(), $completion);
|
|
356
357
|
};
|
|
357
|
-
protoOf(Auth$lambda$slambda_1).
|
|
358
|
-
var suspendResult = this.
|
|
358
|
+
protoOf(Auth$lambda$slambda_1).m9 = function () {
|
|
359
|
+
var suspendResult = this.g9_1;
|
|
359
360
|
$sm: do
|
|
360
361
|
try {
|
|
361
|
-
var tmp = this.
|
|
362
|
+
var tmp = this.e9_1;
|
|
362
363
|
switch (tmp) {
|
|
363
364
|
case 0:
|
|
364
|
-
this.
|
|
365
|
-
this.
|
|
366
|
-
suspendResult = this.
|
|
365
|
+
this.f9_1 = 7;
|
|
366
|
+
this.e9_1 = 1;
|
|
367
|
+
suspendResult = this.a44_1.u3d(this.b44_1, this);
|
|
367
368
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
368
369
|
return suspendResult;
|
|
369
370
|
}
|
|
370
371
|
|
|
371
372
|
continue $sm;
|
|
372
373
|
case 1:
|
|
373
|
-
this.
|
|
374
|
-
if (!this.
|
|
375
|
-
return this.
|
|
376
|
-
if (this.
|
|
377
|
-
return this.
|
|
378
|
-
this.
|
|
379
|
-
this.
|
|
380
|
-
this.
|
|
374
|
+
this.c44_1 = suspendResult;
|
|
375
|
+
if (!this.c44_1.e2v().r2y().equals(Companion_getInstance().l2l_1))
|
|
376
|
+
return this.c44_1;
|
|
377
|
+
if (this.c44_1.n2y().t2x().s27(get_AuthCircuitBreaker()))
|
|
378
|
+
return this.c44_1;
|
|
379
|
+
this.d44_1 = this.c44_1;
|
|
380
|
+
this.e44_1 = HashSet_init_$Create$(this.x43_1);
|
|
381
|
+
this.e9_1 = 2;
|
|
381
382
|
continue $sm;
|
|
382
383
|
case 2:
|
|
383
|
-
if (!this.
|
|
384
|
-
this.
|
|
384
|
+
if (!this.d44_1.e2v().r2y().equals(Companion_getInstance().l2l_1)) {
|
|
385
|
+
this.e9_1 = 6;
|
|
385
386
|
continue $sm;
|
|
386
387
|
}
|
|
387
388
|
|
|
388
|
-
get_LOGGER().
|
|
389
|
+
get_LOGGER().u2d('Received 401 for ' + this.d44_1.n2y().q2y().toString());
|
|
389
390
|
var tmp_0 = this;
|
|
390
|
-
var tmp0_elvis_lhs = invoke$findProvider(this.
|
|
391
|
+
var tmp0_elvis_lhs = invoke$findProvider(this.d44_1, this.e44_1);
|
|
391
392
|
var tmp_1;
|
|
392
393
|
if (tmp0_elvis_lhs == null) {
|
|
393
|
-
this.
|
|
394
|
-
get_LOGGER().
|
|
395
|
-
return this.
|
|
394
|
+
this.a44_1;
|
|
395
|
+
get_LOGGER().u2d('Can not find auth provider for ' + this.d44_1.n2y().q2y().toString());
|
|
396
|
+
return this.d44_1;
|
|
396
397
|
} else {
|
|
397
398
|
tmp_1 = tmp0_elvis_lhs;
|
|
398
399
|
}
|
|
399
400
|
|
|
400
|
-
tmp_0.
|
|
401
|
-
this.
|
|
402
|
-
this.
|
|
403
|
-
get_LOGGER().
|
|
404
|
-
this.
|
|
405
|
-
this.
|
|
406
|
-
suspendResult = invoke$refreshTokenIfNeeded(this.
|
|
401
|
+
tmp_0.f44_1 = tmp_1;
|
|
402
|
+
this.g44_1 = this.f44_1.qg();
|
|
403
|
+
this.h44_1 = this.f44_1.rg();
|
|
404
|
+
get_LOGGER().u2d('Using provider ' + toString(this.g44_1) + ' for ' + this.d44_1.n2y().q2y().toString());
|
|
405
|
+
this.e44_1.d2(this.g44_1);
|
|
406
|
+
this.e9_1 = 3;
|
|
407
|
+
suspendResult = invoke$refreshTokenIfNeeded(this.y43_1, this.z43_1, this.d44_1, this.g44_1, this.b44_1, this);
|
|
407
408
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
408
409
|
return suspendResult;
|
|
409
410
|
}
|
|
410
411
|
|
|
411
412
|
continue $sm;
|
|
412
413
|
case 3:
|
|
413
|
-
this.
|
|
414
|
-
if (!this.
|
|
415
|
-
return this.
|
|
414
|
+
this.i44_1 = suspendResult;
|
|
415
|
+
if (!this.i44_1) {
|
|
416
|
+
return this.d44_1;
|
|
416
417
|
} else {
|
|
417
|
-
this.
|
|
418
|
+
this.e9_1 = 4;
|
|
418
419
|
continue $sm;
|
|
419
420
|
}
|
|
420
421
|
|
|
421
422
|
case 4:
|
|
422
|
-
this.
|
|
423
|
-
suspendResult = invoke$executeWithNewToken(this.
|
|
423
|
+
this.e9_1 = 5;
|
|
424
|
+
suspendResult = invoke$executeWithNewToken(this.a44_1, this.d44_1, this.g44_1, this.b44_1, this.h44_1, this);
|
|
424
425
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
425
426
|
return suspendResult;
|
|
426
427
|
}
|
|
427
428
|
|
|
428
429
|
continue $sm;
|
|
429
430
|
case 5:
|
|
430
|
-
this.
|
|
431
|
-
this.
|
|
431
|
+
this.d44_1 = suspendResult;
|
|
432
|
+
this.e9_1 = 2;
|
|
432
433
|
continue $sm;
|
|
433
434
|
case 6:
|
|
434
|
-
return this.
|
|
435
|
+
return this.d44_1;
|
|
435
436
|
case 7:
|
|
436
|
-
throw this.
|
|
437
|
+
throw this.h9_1;
|
|
437
438
|
}
|
|
438
439
|
} catch ($p) {
|
|
439
440
|
var e = $p;
|
|
440
|
-
if (this.
|
|
441
|
+
if (this.f9_1 === 7) {
|
|
441
442
|
throw e;
|
|
442
443
|
} else {
|
|
443
|
-
this.
|
|
444
|
-
this.
|
|
444
|
+
this.e9_1 = this.f9_1;
|
|
445
|
+
this.h9_1 = e;
|
|
445
446
|
}
|
|
446
447
|
}
|
|
447
448
|
while (true);
|
|
448
449
|
};
|
|
449
|
-
protoOf(Auth$lambda$slambda_1).
|
|
450
|
-
var i = new Auth$lambda$slambda_1(this.
|
|
451
|
-
i.
|
|
452
|
-
i.
|
|
450
|
+
protoOf(Auth$lambda$slambda_1).r3d = function ($this$on, originalRequest, completion) {
|
|
451
|
+
var i = new Auth$lambda$slambda_1(this.x43_1, this.y43_1, this.z43_1, completion);
|
|
452
|
+
i.a44_1 = $this$on;
|
|
453
|
+
i.b44_1 = originalRequest;
|
|
453
454
|
return i;
|
|
454
455
|
};
|
|
455
456
|
function Auth$lambda$slambda_2($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
456
457
|
var i = new Auth$lambda$slambda_1($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
457
458
|
var l = function ($this$on, originalRequest, $completion) {
|
|
458
|
-
return i.
|
|
459
|
+
return i.q3d($this$on, originalRequest, $completion);
|
|
459
460
|
};
|
|
460
461
|
l.$arity = 2;
|
|
461
462
|
return l;
|
|
@@ -471,101 +472,101 @@
|
|
|
471
472
|
}
|
|
472
473
|
function $invoke$refreshTokenIfNeededCOROUTINE$0(tokenVersions, tokenVersionsAttributeKey, call, provider, request, resultContinuation) {
|
|
473
474
|
CoroutineImpl.call(this, resultContinuation);
|
|
474
|
-
this.
|
|
475
|
-
this.
|
|
476
|
-
this.
|
|
477
|
-
this.
|
|
478
|
-
this.
|
|
475
|
+
this.v41_1 = tokenVersions;
|
|
476
|
+
this.w41_1 = tokenVersionsAttributeKey;
|
|
477
|
+
this.x41_1 = call;
|
|
478
|
+
this.y41_1 = provider;
|
|
479
|
+
this.z41_1 = request;
|
|
479
480
|
}
|
|
480
|
-
protoOf($invoke$refreshTokenIfNeededCOROUTINE$0).
|
|
481
|
-
var suspendResult = this.
|
|
481
|
+
protoOf($invoke$refreshTokenIfNeededCOROUTINE$0).m9 = function () {
|
|
482
|
+
var suspendResult = this.g9_1;
|
|
482
483
|
$sm: do
|
|
483
484
|
try {
|
|
484
|
-
var tmp = this.
|
|
485
|
+
var tmp = this.e9_1;
|
|
485
486
|
switch (tmp) {
|
|
486
487
|
case 0:
|
|
487
|
-
this.
|
|
488
|
+
this.f9_1 = 4;
|
|
488
489
|
var tmp_0 = this;
|
|
489
|
-
tmp_0.
|
|
490
|
+
tmp_0.a42_1 = this.v41_1.m2d(this.y41_1, Auth$lambda$refreshTokenIfNeeded$lambda);
|
|
490
491
|
var tmp_1 = this;
|
|
491
|
-
tmp_1.
|
|
492
|
-
this.
|
|
493
|
-
if (!(this.
|
|
494
|
-
get_LOGGER().
|
|
495
|
-
this.
|
|
496
|
-
suspendResult = this.
|
|
492
|
+
tmp_1.b42_1 = this.z41_1.j2w_1.v27(this.w41_1, Auth$lambda$refreshTokenIfNeeded$lambda_0);
|
|
493
|
+
this.c42_1 = this.b42_1.k2(this.y41_1);
|
|
494
|
+
if (!(this.c42_1 == null) && this.c42_1 >= this.a42_1.l41_1.kotlinx$atomicfu$value) {
|
|
495
|
+
get_LOGGER().u2d('Refreshing token for ' + this.x41_1.n2y().q2y().toString());
|
|
496
|
+
this.e9_1 = 1;
|
|
497
|
+
suspendResult = this.y41_1.j44(this.x41_1.e2v(), this);
|
|
497
498
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
498
499
|
return suspendResult;
|
|
499
500
|
}
|
|
500
501
|
continue $sm;
|
|
501
502
|
} else {
|
|
502
|
-
this.
|
|
503
|
+
this.e9_1 = 3;
|
|
503
504
|
continue $sm;
|
|
504
505
|
}
|
|
505
506
|
|
|
506
507
|
case 1:
|
|
507
508
|
var ARGUMENT = suspendResult;
|
|
508
509
|
if (!ARGUMENT) {
|
|
509
|
-
get_LOGGER().
|
|
510
|
+
get_LOGGER().u2d('Refreshing token failed for ' + this.x41_1.n2y().q2y().toString());
|
|
510
511
|
return false;
|
|
511
512
|
} else {
|
|
512
|
-
var
|
|
513
|
-
var
|
|
514
|
-
var value = this.
|
|
515
|
-
|
|
516
|
-
this.
|
|
513
|
+
var tmp0 = this.b42_1;
|
|
514
|
+
var tmp1 = this.y41_1;
|
|
515
|
+
var value = this.a42_1.l41_1.atomicfu$incrementAndGet();
|
|
516
|
+
tmp0.n2(tmp1, value);
|
|
517
|
+
this.e9_1 = 2;
|
|
517
518
|
continue $sm;
|
|
518
519
|
}
|
|
519
520
|
|
|
520
521
|
case 2:
|
|
521
|
-
this.
|
|
522
|
+
this.e9_1 = 3;
|
|
522
523
|
continue $sm;
|
|
523
524
|
case 3:
|
|
524
525
|
return true;
|
|
525
526
|
case 4:
|
|
526
|
-
throw this.
|
|
527
|
+
throw this.h9_1;
|
|
527
528
|
}
|
|
528
529
|
} catch ($p) {
|
|
529
530
|
var e = $p;
|
|
530
|
-
if (this.
|
|
531
|
+
if (this.f9_1 === 4) {
|
|
531
532
|
throw e;
|
|
532
533
|
} else {
|
|
533
|
-
this.
|
|
534
|
-
this.
|
|
534
|
+
this.e9_1 = this.f9_1;
|
|
535
|
+
this.h9_1 = e;
|
|
535
536
|
}
|
|
536
537
|
}
|
|
537
538
|
while (true);
|
|
538
539
|
};
|
|
539
540
|
function $invoke$executeWithNewTokenCOROUTINE$1(_this__u8e3s4, call, provider, oldRequest, authHeader, resultContinuation) {
|
|
540
541
|
CoroutineImpl.call(this, resultContinuation);
|
|
541
|
-
this.
|
|
542
|
-
this.
|
|
543
|
-
this.
|
|
544
|
-
this.
|
|
545
|
-
this.
|
|
542
|
+
this.l42_1 = _this__u8e3s4;
|
|
543
|
+
this.m42_1 = call;
|
|
544
|
+
this.n42_1 = provider;
|
|
545
|
+
this.o42_1 = oldRequest;
|
|
546
|
+
this.p42_1 = authHeader;
|
|
546
547
|
}
|
|
547
|
-
protoOf($invoke$executeWithNewTokenCOROUTINE$1).
|
|
548
|
-
var suspendResult = this.
|
|
548
|
+
protoOf($invoke$executeWithNewTokenCOROUTINE$1).m9 = function () {
|
|
549
|
+
var suspendResult = this.g9_1;
|
|
549
550
|
$sm: do
|
|
550
551
|
try {
|
|
551
|
-
var tmp = this.
|
|
552
|
+
var tmp = this.e9_1;
|
|
552
553
|
switch (tmp) {
|
|
553
554
|
case 0:
|
|
554
|
-
this.
|
|
555
|
-
this.
|
|
556
|
-
this.
|
|
557
|
-
this.
|
|
558
|
-
suspendResult = this.
|
|
555
|
+
this.f9_1 = 3;
|
|
556
|
+
this.q42_1 = new HttpRequestBuilder();
|
|
557
|
+
this.q42_1.c32(this.o42_1);
|
|
558
|
+
this.e9_1 = 1;
|
|
559
|
+
suspendResult = this.n42_1.k44(this.q42_1, this.p42_1, this);
|
|
559
560
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
560
561
|
return suspendResult;
|
|
561
562
|
}
|
|
562
563
|
|
|
563
564
|
continue $sm;
|
|
564
565
|
case 1:
|
|
565
|
-
this.
|
|
566
|
-
get_LOGGER().
|
|
567
|
-
this.
|
|
568
|
-
suspendResult = this.
|
|
566
|
+
this.q42_1.j2w_1.t27(get_AuthCircuitBreaker(), Unit_instance);
|
|
567
|
+
get_LOGGER().u2d('Sending new request to ' + this.m42_1.n2y().q2y().toString());
|
|
568
|
+
this.e9_1 = 2;
|
|
569
|
+
suspendResult = this.l42_1.u3d(this.q42_1, this);
|
|
569
570
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
570
571
|
return suspendResult;
|
|
571
572
|
}
|
|
@@ -574,15 +575,15 @@
|
|
|
574
575
|
case 2:
|
|
575
576
|
return suspendResult;
|
|
576
577
|
case 3:
|
|
577
|
-
throw this.
|
|
578
|
+
throw this.h9_1;
|
|
578
579
|
}
|
|
579
580
|
} catch ($p) {
|
|
580
581
|
var e = $p;
|
|
581
|
-
if (this.
|
|
582
|
+
if (this.f9_1 === 3) {
|
|
582
583
|
throw e;
|
|
583
584
|
} else {
|
|
584
|
-
this.
|
|
585
|
-
this.
|
|
585
|
+
this.e9_1 = this.f9_1;
|
|
586
|
+
this.h9_1 = e;
|
|
586
587
|
}
|
|
587
588
|
}
|
|
588
589
|
while (true);
|
|
@@ -642,43 +643,43 @@
|
|
|
642
643
|
}
|
|
643
644
|
function $loadTokenCOROUTINE$2(_this__u8e3s4, resultContinuation) {
|
|
644
645
|
CoroutineImpl.call(this, resultContinuation);
|
|
645
|
-
this.
|
|
646
|
+
this.u44_1 = _this__u8e3s4;
|
|
646
647
|
}
|
|
647
|
-
protoOf($loadTokenCOROUTINE$2).
|
|
648
|
-
var suspendResult = this.
|
|
648
|
+
protoOf($loadTokenCOROUTINE$2).m9 = function () {
|
|
649
|
+
var suspendResult = this.g9_1;
|
|
649
650
|
$sm: do
|
|
650
651
|
try {
|
|
651
|
-
var tmp = this.
|
|
652
|
+
var tmp = this.e9_1;
|
|
652
653
|
switch (tmp) {
|
|
653
654
|
case 0:
|
|
654
|
-
this.
|
|
655
|
-
this.
|
|
655
|
+
this.f9_1 = 5;
|
|
656
|
+
this.w44_1 = null;
|
|
656
657
|
$l$loop: while (true) {
|
|
657
|
-
this.
|
|
658
|
-
var tmp0_elvis_lhs = this.
|
|
658
|
+
this.v44_1 = this.u44_1.z44_1.kotlinx$atomicfu$value;
|
|
659
|
+
var tmp0_elvis_lhs = this.v44_1;
|
|
659
660
|
var newValue = tmp0_elvis_lhs == null ? CompletableDeferred() : tmp0_elvis_lhs;
|
|
660
|
-
if (this.
|
|
661
|
-
this.
|
|
661
|
+
if (this.u44_1.z44_1.atomicfu$compareAndSet(this.v44_1, newValue)) {
|
|
662
|
+
this.w44_1 = newValue;
|
|
662
663
|
break $l$loop;
|
|
663
664
|
}
|
|
664
665
|
}
|
|
665
666
|
|
|
666
|
-
if (!(this.
|
|
667
|
-
this.
|
|
668
|
-
suspendResult = this.
|
|
667
|
+
if (!(this.v44_1 == null)) {
|
|
668
|
+
this.e9_1 = 4;
|
|
669
|
+
suspendResult = this.v44_1.uq(this);
|
|
669
670
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
670
671
|
return suspendResult;
|
|
671
672
|
}
|
|
672
673
|
continue $sm;
|
|
673
674
|
} else {
|
|
674
|
-
this.
|
|
675
|
+
this.e9_1 = 1;
|
|
675
676
|
continue $sm;
|
|
676
677
|
}
|
|
677
678
|
|
|
678
679
|
case 1:
|
|
679
|
-
this.
|
|
680
|
-
this.
|
|
681
|
-
suspendResult = this.
|
|
680
|
+
this.f9_1 = 3;
|
|
681
|
+
this.e9_1 = 2;
|
|
682
|
+
suspendResult = this.u44_1.x44_1(this);
|
|
682
683
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
683
684
|
return suspendResult;
|
|
684
685
|
}
|
|
@@ -687,89 +688,89 @@
|
|
|
687
688
|
case 2:
|
|
688
689
|
var newTokens = suspendResult;
|
|
689
690
|
var tmp_0;
|
|
690
|
-
if (this.
|
|
691
|
+
if (this.w44_1 == null) {
|
|
691
692
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
692
693
|
} else {
|
|
693
|
-
tmp_0 = this.
|
|
694
|
+
tmp_0 = this.w44_1;
|
|
694
695
|
}
|
|
695
696
|
|
|
696
|
-
tmp_0.
|
|
697
|
+
tmp_0.su(newTokens);
|
|
697
698
|
return newTokens;
|
|
698
699
|
case 3:
|
|
699
|
-
this.
|
|
700
|
-
var tmp_1 = this.
|
|
700
|
+
this.f9_1 = 5;
|
|
701
|
+
var tmp_1 = this.h9_1;
|
|
701
702
|
if (tmp_1 instanceof Error) {
|
|
702
|
-
var cause = this.
|
|
703
|
+
var cause = this.h9_1;
|
|
703
704
|
var tmp_2;
|
|
704
|
-
if (this.
|
|
705
|
+
if (this.w44_1 == null) {
|
|
705
706
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
706
707
|
} else {
|
|
707
|
-
tmp_2 = this.
|
|
708
|
+
tmp_2 = this.w44_1;
|
|
708
709
|
}
|
|
709
|
-
tmp_2.
|
|
710
|
+
tmp_2.uu(cause);
|
|
710
711
|
var tmp_3;
|
|
711
|
-
if (this.
|
|
712
|
+
if (this.w44_1 == null) {
|
|
712
713
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
713
714
|
} else {
|
|
714
|
-
tmp_3 = this.
|
|
715
|
+
tmp_3 = this.w44_1;
|
|
715
716
|
}
|
|
716
|
-
this.
|
|
717
|
+
this.u44_1.z44_1.atomicfu$compareAndSet(tmp_3, null);
|
|
717
718
|
throw cause;
|
|
718
719
|
} else {
|
|
719
|
-
throw this.
|
|
720
|
+
throw this.h9_1;
|
|
720
721
|
}
|
|
721
722
|
|
|
722
723
|
case 4:
|
|
723
724
|
return suspendResult;
|
|
724
725
|
case 5:
|
|
725
|
-
throw this.
|
|
726
|
+
throw this.h9_1;
|
|
726
727
|
}
|
|
727
728
|
} catch ($p) {
|
|
728
729
|
var e = $p;
|
|
729
|
-
if (this.
|
|
730
|
+
if (this.f9_1 === 5) {
|
|
730
731
|
throw e;
|
|
731
732
|
} else {
|
|
732
|
-
this.
|
|
733
|
-
this.
|
|
733
|
+
this.e9_1 = this.f9_1;
|
|
734
|
+
this.h9_1 = e;
|
|
734
735
|
}
|
|
735
736
|
}
|
|
736
737
|
while (true);
|
|
737
738
|
};
|
|
738
739
|
function $setTokenCOROUTINE$3(_this__u8e3s4, block, resultContinuation) {
|
|
739
740
|
CoroutineImpl.call(this, resultContinuation);
|
|
740
|
-
this.
|
|
741
|
-
this.
|
|
741
|
+
this.i45_1 = _this__u8e3s4;
|
|
742
|
+
this.j45_1 = block;
|
|
742
743
|
}
|
|
743
|
-
protoOf($setTokenCOROUTINE$3).
|
|
744
|
-
var suspendResult = this.
|
|
744
|
+
protoOf($setTokenCOROUTINE$3).m9 = function () {
|
|
745
|
+
var suspendResult = this.g9_1;
|
|
745
746
|
$sm: do
|
|
746
747
|
try {
|
|
747
|
-
var tmp = this.
|
|
748
|
+
var tmp = this.e9_1;
|
|
748
749
|
switch (tmp) {
|
|
749
750
|
case 0:
|
|
750
|
-
this.
|
|
751
|
-
this.
|
|
751
|
+
this.f9_1 = 5;
|
|
752
|
+
this.l45_1 = null;
|
|
752
753
|
$l$loop: while (true) {
|
|
753
|
-
this.
|
|
754
|
-
var tmp0_elvis_lhs = this.
|
|
754
|
+
this.k45_1 = this.i45_1.y44_1.kotlinx$atomicfu$value;
|
|
755
|
+
var tmp0_elvis_lhs = this.k45_1;
|
|
755
756
|
var newValue = tmp0_elvis_lhs == null ? CompletableDeferred() : tmp0_elvis_lhs;
|
|
756
|
-
if (this.
|
|
757
|
-
this.
|
|
757
|
+
if (this.i45_1.y44_1.atomicfu$compareAndSet(this.k45_1, newValue)) {
|
|
758
|
+
this.l45_1 = newValue;
|
|
758
759
|
break $l$loop;
|
|
759
760
|
}
|
|
760
761
|
}
|
|
761
762
|
|
|
762
|
-
this.
|
|
763
|
-
if (this.
|
|
764
|
-
this.
|
|
765
|
-
suspendResult = this.
|
|
763
|
+
this.f9_1 = 4;
|
|
764
|
+
if (this.k45_1 == null) {
|
|
765
|
+
this.e9_1 = 2;
|
|
766
|
+
suspendResult = this.j45_1(this);
|
|
766
767
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
767
768
|
return suspendResult;
|
|
768
769
|
}
|
|
769
770
|
continue $sm;
|
|
770
771
|
} else {
|
|
771
|
-
this.
|
|
772
|
-
suspendResult = this.
|
|
772
|
+
this.e9_1 = 1;
|
|
773
|
+
suspendResult = this.k45_1.uq(this);
|
|
773
774
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
774
775
|
return suspendResult;
|
|
775
776
|
}
|
|
@@ -777,114 +778,112 @@
|
|
|
777
778
|
}
|
|
778
779
|
|
|
779
780
|
case 1:
|
|
780
|
-
this.
|
|
781
|
-
this.
|
|
781
|
+
this.m45_1 = suspendResult;
|
|
782
|
+
this.e9_1 = 3;
|
|
782
783
|
continue $sm;
|
|
783
784
|
case 2:
|
|
784
785
|
var newTokens = suspendResult;
|
|
785
786
|
var tmp_0;
|
|
786
|
-
if (this.
|
|
787
|
+
if (this.l45_1 == null) {
|
|
787
788
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
788
789
|
} else {
|
|
789
|
-
tmp_0 = this.
|
|
790
|
+
tmp_0 = this.l45_1;
|
|
790
791
|
}
|
|
791
792
|
|
|
792
|
-
tmp_0.
|
|
793
|
-
this.
|
|
794
|
-
this.
|
|
795
|
-
this.
|
|
793
|
+
tmp_0.su(newTokens);
|
|
794
|
+
this.i45_1.y44_1.kotlinx$atomicfu$value = null;
|
|
795
|
+
this.m45_1 = newTokens;
|
|
796
|
+
this.e9_1 = 3;
|
|
796
797
|
continue $sm;
|
|
797
798
|
case 3:
|
|
798
|
-
var newToken = this.
|
|
799
|
-
this.
|
|
799
|
+
var newToken = this.m45_1;
|
|
800
|
+
this.i45_1.z44_1.kotlinx$atomicfu$value = CompletableDeferred_0(newToken);
|
|
800
801
|
return newToken;
|
|
801
802
|
case 4:
|
|
802
|
-
this.
|
|
803
|
-
var tmp_1 = this.
|
|
803
|
+
this.f9_1 = 5;
|
|
804
|
+
var tmp_1 = this.h9_1;
|
|
804
805
|
if (tmp_1 instanceof Error) {
|
|
805
|
-
var cause = this.
|
|
806
|
+
var cause = this.h9_1;
|
|
806
807
|
var tmp_2;
|
|
807
|
-
if (this.
|
|
808
|
+
if (this.l45_1 == null) {
|
|
808
809
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
809
810
|
} else {
|
|
810
|
-
tmp_2 = this.
|
|
811
|
+
tmp_2 = this.l45_1;
|
|
811
812
|
}
|
|
812
|
-
tmp_2.
|
|
813
|
+
tmp_2.uu(cause);
|
|
813
814
|
var tmp_3;
|
|
814
|
-
if (this.
|
|
815
|
+
if (this.l45_1 == null) {
|
|
815
816
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
816
817
|
} else {
|
|
817
|
-
tmp_3 = this.
|
|
818
|
+
tmp_3 = this.l45_1;
|
|
818
819
|
}
|
|
819
|
-
this.
|
|
820
|
+
this.i45_1.y44_1.atomicfu$compareAndSet(tmp_3, null);
|
|
820
821
|
throw cause;
|
|
821
822
|
} else {
|
|
822
|
-
throw this.
|
|
823
|
+
throw this.h9_1;
|
|
823
824
|
}
|
|
824
825
|
|
|
825
826
|
case 5:
|
|
826
|
-
throw this.
|
|
827
|
+
throw this.h9_1;
|
|
827
828
|
}
|
|
828
829
|
} catch ($p) {
|
|
829
830
|
var e = $p;
|
|
830
|
-
if (this.
|
|
831
|
+
if (this.f9_1 === 5) {
|
|
831
832
|
throw e;
|
|
832
833
|
} else {
|
|
833
|
-
this.
|
|
834
|
-
this.
|
|
834
|
+
this.e9_1 = this.f9_1;
|
|
835
|
+
this.h9_1 = e;
|
|
835
836
|
}
|
|
836
837
|
}
|
|
837
838
|
while (true);
|
|
838
839
|
};
|
|
839
840
|
function AuthTokenHolder(loadTokens) {
|
|
840
|
-
this.
|
|
841
|
-
this.
|
|
842
|
-
this.
|
|
841
|
+
this.x44_1 = loadTokens;
|
|
842
|
+
this.y44_1 = atomic$ref$1(null);
|
|
843
|
+
this.z44_1 = atomic$ref$1(null);
|
|
843
844
|
}
|
|
844
|
-
protoOf(AuthTokenHolder).
|
|
845
|
+
protoOf(AuthTokenHolder).n45 = function ($completion) {
|
|
845
846
|
var tmp = new $loadTokenCOROUTINE$2(this, $completion);
|
|
846
|
-
tmp.
|
|
847
|
-
tmp.
|
|
848
|
-
return tmp.
|
|
847
|
+
tmp.g9_1 = Unit_instance;
|
|
848
|
+
tmp.h9_1 = null;
|
|
849
|
+
return tmp.m9();
|
|
849
850
|
};
|
|
850
|
-
protoOf(AuthTokenHolder).
|
|
851
|
+
protoOf(AuthTokenHolder).o45 = function (block, $completion) {
|
|
851
852
|
var tmp = new $setTokenCOROUTINE$3(this, block, $completion);
|
|
852
|
-
tmp.
|
|
853
|
-
tmp.
|
|
854
|
-
return tmp.
|
|
853
|
+
tmp.g9_1 = Unit_instance;
|
|
854
|
+
tmp.h9_1 = null;
|
|
855
|
+
return tmp.m9();
|
|
855
856
|
};
|
|
856
857
|
function bearer(_this__u8e3s4, block) {
|
|
857
|
-
// Inline function 'kotlin.with' call
|
|
858
858
|
// Inline function 'kotlin.apply' call
|
|
859
859
|
var this_0 = new BearerAuthConfig();
|
|
860
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
861
860
|
block(this_0);
|
|
862
|
-
// Inline function 'kotlin.
|
|
861
|
+
// Inline function 'kotlin.with' call
|
|
863
862
|
// Inline function 'io.ktor.client.plugins.auth.providers.bearer.<anonymous>' call
|
|
864
|
-
_this__u8e3s4.
|
|
863
|
+
_this__u8e3s4.k41_1.k(new BearerAuthProvider(this_0.p45_1, this_0.q45_1, this_0.r45_1, this_0.s45_1));
|
|
865
864
|
}
|
|
866
865
|
function BearerAuthConfig$_refreshTokens$slambda(resultContinuation) {
|
|
867
866
|
CoroutineImpl.call(this, resultContinuation);
|
|
868
867
|
}
|
|
869
|
-
protoOf(BearerAuthConfig$_refreshTokens$slambda).
|
|
870
|
-
var tmp = this.
|
|
871
|
-
tmp.
|
|
872
|
-
tmp.
|
|
873
|
-
return tmp.
|
|
868
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).c46 = function (_this__u8e3s4, $completion) {
|
|
869
|
+
var tmp = this.d46(_this__u8e3s4, $completion);
|
|
870
|
+
tmp.g9_1 = Unit_instance;
|
|
871
|
+
tmp.h9_1 = null;
|
|
872
|
+
return tmp.m9();
|
|
874
873
|
};
|
|
875
|
-
protoOf(BearerAuthConfig$_refreshTokens$slambda).
|
|
876
|
-
return this.
|
|
874
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).w9 = function (p1, $completion) {
|
|
875
|
+
return this.c46(p1 instanceof RefreshTokensParams ? p1 : THROW_CCE(), $completion);
|
|
877
876
|
};
|
|
878
|
-
protoOf(BearerAuthConfig$_refreshTokens$slambda).
|
|
879
|
-
var suspendResult = this.
|
|
877
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).m9 = function () {
|
|
878
|
+
var suspendResult = this.g9_1;
|
|
880
879
|
$sm: do
|
|
881
880
|
try {
|
|
882
|
-
var tmp = this.
|
|
881
|
+
var tmp = this.e9_1;
|
|
883
882
|
if (tmp === 0) {
|
|
884
|
-
this.
|
|
883
|
+
this.f9_1 = 1;
|
|
885
884
|
return null;
|
|
886
885
|
} else if (tmp === 1) {
|
|
887
|
-
throw this.
|
|
886
|
+
throw this.h9_1;
|
|
888
887
|
}
|
|
889
888
|
} catch ($p) {
|
|
890
889
|
var e = $p;
|
|
@@ -892,15 +891,15 @@
|
|
|
892
891
|
}
|
|
893
892
|
while (true);
|
|
894
893
|
};
|
|
895
|
-
protoOf(BearerAuthConfig$_refreshTokens$slambda).
|
|
894
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).d46 = function (_this__u8e3s4, completion) {
|
|
896
895
|
var i = new BearerAuthConfig$_refreshTokens$slambda(completion);
|
|
897
|
-
i.
|
|
896
|
+
i.b46_1 = _this__u8e3s4;
|
|
898
897
|
return i;
|
|
899
898
|
};
|
|
900
899
|
function BearerAuthConfig$_refreshTokens$slambda_0(resultContinuation) {
|
|
901
900
|
var i = new BearerAuthConfig$_refreshTokens$slambda(resultContinuation);
|
|
902
901
|
var l = function (_this__u8e3s4, $completion) {
|
|
903
|
-
return i.
|
|
902
|
+
return i.c46(_this__u8e3s4, $completion);
|
|
904
903
|
};
|
|
905
904
|
l.$arity = 1;
|
|
906
905
|
return l;
|
|
@@ -908,25 +907,25 @@
|
|
|
908
907
|
function BearerAuthConfig$_loadTokens$slambda(resultContinuation) {
|
|
909
908
|
CoroutineImpl.call(this, resultContinuation);
|
|
910
909
|
}
|
|
911
|
-
protoOf(BearerAuthConfig$_loadTokens$slambda).
|
|
912
|
-
var tmp = this.
|
|
913
|
-
tmp.
|
|
914
|
-
tmp.
|
|
915
|
-
return tmp.
|
|
910
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).m46 = function ($completion) {
|
|
911
|
+
var tmp = this.n46($completion);
|
|
912
|
+
tmp.g9_1 = Unit_instance;
|
|
913
|
+
tmp.h9_1 = null;
|
|
914
|
+
return tmp.m9();
|
|
916
915
|
};
|
|
917
|
-
protoOf(BearerAuthConfig$_loadTokens$slambda).
|
|
918
|
-
return this.
|
|
916
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).bb = function ($completion) {
|
|
917
|
+
return this.m46($completion);
|
|
919
918
|
};
|
|
920
|
-
protoOf(BearerAuthConfig$_loadTokens$slambda).
|
|
921
|
-
var suspendResult = this.
|
|
919
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).m9 = function () {
|
|
920
|
+
var suspendResult = this.g9_1;
|
|
922
921
|
$sm: do
|
|
923
922
|
try {
|
|
924
|
-
var tmp = this.
|
|
923
|
+
var tmp = this.e9_1;
|
|
925
924
|
if (tmp === 0) {
|
|
926
|
-
this.
|
|
925
|
+
this.f9_1 = 1;
|
|
927
926
|
return null;
|
|
928
927
|
} else if (tmp === 1) {
|
|
929
|
-
throw this.
|
|
928
|
+
throw this.h9_1;
|
|
930
929
|
}
|
|
931
930
|
} catch ($p) {
|
|
932
931
|
var e = $p;
|
|
@@ -934,13 +933,13 @@
|
|
|
934
933
|
}
|
|
935
934
|
while (true);
|
|
936
935
|
};
|
|
937
|
-
protoOf(BearerAuthConfig$_loadTokens$slambda).
|
|
936
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).n46 = function (completion) {
|
|
938
937
|
return new BearerAuthConfig$_loadTokens$slambda(completion);
|
|
939
938
|
};
|
|
940
939
|
function BearerAuthConfig$_loadTokens$slambda_0(resultContinuation) {
|
|
941
940
|
var i = new BearerAuthConfig$_loadTokens$slambda(resultContinuation);
|
|
942
941
|
var l = function ($completion) {
|
|
943
|
-
return i.
|
|
942
|
+
return i.m46($completion);
|
|
944
943
|
};
|
|
945
944
|
l.$arity = 0;
|
|
946
945
|
return l;
|
|
@@ -950,76 +949,76 @@
|
|
|
950
949
|
}
|
|
951
950
|
function BearerAuthConfig() {
|
|
952
951
|
var tmp = this;
|
|
953
|
-
tmp.
|
|
952
|
+
tmp.p45_1 = BearerAuthConfig$_refreshTokens$slambda_0(null);
|
|
954
953
|
var tmp_0 = this;
|
|
955
|
-
tmp_0.
|
|
954
|
+
tmp_0.q45_1 = BearerAuthConfig$_loadTokens$slambda_0(null);
|
|
956
955
|
var tmp_1 = this;
|
|
957
|
-
tmp_1.
|
|
958
|
-
this.
|
|
956
|
+
tmp_1.r45_1 = BearerAuthConfig$_sendWithoutRequest$lambda;
|
|
957
|
+
this.s45_1 = null;
|
|
959
958
|
}
|
|
960
|
-
protoOf(BearerAuthConfig).
|
|
961
|
-
this.
|
|
959
|
+
protoOf(BearerAuthConfig).o46 = function (block) {
|
|
960
|
+
this.p45_1 = block;
|
|
962
961
|
};
|
|
963
962
|
function RefreshTokensParams(client, response, oldTokens) {
|
|
964
|
-
this.
|
|
965
|
-
this.
|
|
966
|
-
this.
|
|
963
|
+
this.p46_1 = client;
|
|
964
|
+
this.q46_1 = response;
|
|
965
|
+
this.r46_1 = oldTokens;
|
|
967
966
|
}
|
|
968
967
|
function BearerTokens(accessToken, refreshToken) {
|
|
969
|
-
this.
|
|
970
|
-
this.
|
|
968
|
+
this.s46_1 = accessToken;
|
|
969
|
+
this.t46_1 = refreshToken;
|
|
971
970
|
}
|
|
972
971
|
function BearerAuthProvider$_init_$lambda_lcdiwf(it) {
|
|
973
972
|
return true;
|
|
974
973
|
}
|
|
975
974
|
function BearerAuthProvider$addRequestHeaders$lambda($token) {
|
|
976
975
|
return function ($this$headers) {
|
|
977
|
-
var tokenValue = 'Bearer ' + $token.
|
|
976
|
+
var tokenValue = 'Bearer ' + $token.s46_1;
|
|
978
977
|
var tmp;
|
|
979
|
-
if ($this$headers.
|
|
980
|
-
$this$headers.
|
|
978
|
+
if ($this$headers.p29(HttpHeaders_getInstance().e2g_1)) {
|
|
979
|
+
$this$headers.w29(HttpHeaders_getInstance().e2g_1);
|
|
981
980
|
tmp = Unit_instance;
|
|
982
981
|
}
|
|
983
|
-
$this$headers.
|
|
982
|
+
$this$headers.t29(HttpHeaders_getInstance().e2g_1, tokenValue);
|
|
984
983
|
return Unit_instance;
|
|
985
984
|
};
|
|
986
985
|
}
|
|
987
986
|
function BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation) {
|
|
988
|
-
this.
|
|
989
|
-
this.
|
|
987
|
+
this.c47_1 = this$0;
|
|
988
|
+
this.d47_1 = $response;
|
|
990
989
|
CoroutineImpl.call(this, resultContinuation);
|
|
991
990
|
}
|
|
992
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
993
|
-
var tmp = this.
|
|
994
|
-
tmp.
|
|
995
|
-
tmp.
|
|
996
|
-
return tmp.
|
|
991
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).i47 = function ($completion) {
|
|
992
|
+
var tmp = this.n46($completion);
|
|
993
|
+
tmp.g9_1 = Unit_instance;
|
|
994
|
+
tmp.h9_1 = null;
|
|
995
|
+
return tmp.m9();
|
|
997
996
|
};
|
|
998
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
999
|
-
return this.
|
|
997
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).bb = function ($completion) {
|
|
998
|
+
return this.i47($completion);
|
|
1000
999
|
};
|
|
1001
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1002
|
-
var suspendResult = this.
|
|
1000
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).m9 = function () {
|
|
1001
|
+
var suspendResult = this.g9_1;
|
|
1003
1002
|
$sm: do
|
|
1004
1003
|
try {
|
|
1005
|
-
var tmp = this.
|
|
1004
|
+
var tmp = this.e9_1;
|
|
1006
1005
|
switch (tmp) {
|
|
1007
1006
|
case 0:
|
|
1008
|
-
this.
|
|
1009
|
-
this.
|
|
1010
|
-
this.
|
|
1011
|
-
this.
|
|
1012
|
-
suspendResult = this.
|
|
1007
|
+
this.f9_1 = 3;
|
|
1008
|
+
this.e47_1 = this.c47_1.j47_1;
|
|
1009
|
+
this.f47_1 = this.d47_1.m2z().z2u_1;
|
|
1010
|
+
this.e9_1 = 1;
|
|
1011
|
+
suspendResult = this.c47_1.m47_1.n45(this);
|
|
1013
1012
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1014
1013
|
return suspendResult;
|
|
1015
1014
|
}
|
|
1016
1015
|
|
|
1017
1016
|
continue $sm;
|
|
1018
1017
|
case 1:
|
|
1019
|
-
this.
|
|
1020
|
-
this.
|
|
1021
|
-
this.
|
|
1022
|
-
suspendResult = this.
|
|
1018
|
+
this.g47_1 = suspendResult;
|
|
1019
|
+
this.h47_1 = new RefreshTokensParams(this.f47_1, this.d47_1, this.g47_1);
|
|
1020
|
+
this.e9_1 = 2;
|
|
1021
|
+
suspendResult = this.e47_1(this.h47_1, this);
|
|
1023
1022
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1024
1023
|
return suspendResult;
|
|
1025
1024
|
}
|
|
@@ -1028,46 +1027,46 @@
|
|
|
1028
1027
|
case 2:
|
|
1029
1028
|
return suspendResult;
|
|
1030
1029
|
case 3:
|
|
1031
|
-
throw this.
|
|
1030
|
+
throw this.h9_1;
|
|
1032
1031
|
}
|
|
1033
1032
|
} catch ($p) {
|
|
1034
1033
|
var e = $p;
|
|
1035
|
-
if (this.
|
|
1034
|
+
if (this.f9_1 === 3) {
|
|
1036
1035
|
throw e;
|
|
1037
1036
|
} else {
|
|
1038
|
-
this.
|
|
1039
|
-
this.
|
|
1037
|
+
this.e9_1 = this.f9_1;
|
|
1038
|
+
this.h9_1 = e;
|
|
1040
1039
|
}
|
|
1041
1040
|
}
|
|
1042
1041
|
while (true);
|
|
1043
1042
|
};
|
|
1044
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1045
|
-
return new BearerAuthProvider$refreshToken$slambda(this.
|
|
1043
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).n46 = function (completion) {
|
|
1044
|
+
return new BearerAuthProvider$refreshToken$slambda(this.c47_1, this.d47_1, completion);
|
|
1046
1045
|
};
|
|
1047
1046
|
function BearerAuthProvider$refreshToken$slambda_0(this$0, $response, resultContinuation) {
|
|
1048
1047
|
var i = new BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation);
|
|
1049
1048
|
var l = function ($completion) {
|
|
1050
|
-
return i.
|
|
1049
|
+
return i.i47($completion);
|
|
1051
1050
|
};
|
|
1052
1051
|
l.$arity = 0;
|
|
1053
1052
|
return l;
|
|
1054
1053
|
}
|
|
1055
1054
|
function $addRequestHeadersCOROUTINE$4(_this__u8e3s4, request, authHeader, resultContinuation) {
|
|
1056
1055
|
CoroutineImpl.call(this, resultContinuation);
|
|
1057
|
-
this.
|
|
1058
|
-
this.
|
|
1059
|
-
this.
|
|
1056
|
+
this.v47_1 = _this__u8e3s4;
|
|
1057
|
+
this.w47_1 = request;
|
|
1058
|
+
this.x47_1 = authHeader;
|
|
1060
1059
|
}
|
|
1061
|
-
protoOf($addRequestHeadersCOROUTINE$4).
|
|
1062
|
-
var suspendResult = this.
|
|
1060
|
+
protoOf($addRequestHeadersCOROUTINE$4).m9 = function () {
|
|
1061
|
+
var suspendResult = this.g9_1;
|
|
1063
1062
|
$sm: do
|
|
1064
1063
|
try {
|
|
1065
|
-
var tmp = this.
|
|
1064
|
+
var tmp = this.e9_1;
|
|
1066
1065
|
switch (tmp) {
|
|
1067
1066
|
case 0:
|
|
1068
|
-
this.
|
|
1069
|
-
this.
|
|
1070
|
-
suspendResult = this.
|
|
1067
|
+
this.f9_1 = 2;
|
|
1068
|
+
this.e9_1 = 1;
|
|
1069
|
+
suspendResult = this.v47_1.m47_1.n45(this);
|
|
1071
1070
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1072
1071
|
return suspendResult;
|
|
1073
1072
|
}
|
|
@@ -1083,37 +1082,37 @@
|
|
|
1083
1082
|
}
|
|
1084
1083
|
|
|
1085
1084
|
var token = tmp_0;
|
|
1086
|
-
headers(this.
|
|
1085
|
+
headers(this.w47_1, BearerAuthProvider$addRequestHeaders$lambda(token));
|
|
1087
1086
|
return Unit_instance;
|
|
1088
1087
|
case 2:
|
|
1089
|
-
throw this.
|
|
1088
|
+
throw this.h9_1;
|
|
1090
1089
|
}
|
|
1091
1090
|
} catch ($p) {
|
|
1092
1091
|
var e = $p;
|
|
1093
|
-
if (this.
|
|
1092
|
+
if (this.f9_1 === 2) {
|
|
1094
1093
|
throw e;
|
|
1095
1094
|
} else {
|
|
1096
|
-
this.
|
|
1097
|
-
this.
|
|
1095
|
+
this.e9_1 = this.f9_1;
|
|
1096
|
+
this.h9_1 = e;
|
|
1098
1097
|
}
|
|
1099
1098
|
}
|
|
1100
1099
|
while (true);
|
|
1101
1100
|
};
|
|
1102
1101
|
function $refreshTokenCOROUTINE$5(_this__u8e3s4, response, resultContinuation) {
|
|
1103
1102
|
CoroutineImpl.call(this, resultContinuation);
|
|
1104
|
-
this.
|
|
1105
|
-
this.
|
|
1103
|
+
this.g48_1 = _this__u8e3s4;
|
|
1104
|
+
this.h48_1 = response;
|
|
1106
1105
|
}
|
|
1107
|
-
protoOf($refreshTokenCOROUTINE$5).
|
|
1108
|
-
var suspendResult = this.
|
|
1106
|
+
protoOf($refreshTokenCOROUTINE$5).m9 = function () {
|
|
1107
|
+
var suspendResult = this.g9_1;
|
|
1109
1108
|
$sm: do
|
|
1110
1109
|
try {
|
|
1111
|
-
var tmp = this.
|
|
1110
|
+
var tmp = this.e9_1;
|
|
1112
1111
|
switch (tmp) {
|
|
1113
1112
|
case 0:
|
|
1114
|
-
this.
|
|
1115
|
-
this.
|
|
1116
|
-
suspendResult = this.
|
|
1113
|
+
this.f9_1 = 2;
|
|
1114
|
+
this.e9_1 = 1;
|
|
1115
|
+
suspendResult = this.g48_1.m47_1.o45(BearerAuthProvider$refreshToken$slambda_0(this.g48_1, this.h48_1, null), this);
|
|
1117
1116
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1118
1117
|
return suspendResult;
|
|
1119
1118
|
}
|
|
@@ -1123,15 +1122,15 @@
|
|
|
1123
1122
|
var newToken = suspendResult;
|
|
1124
1123
|
return !(newToken == null);
|
|
1125
1124
|
case 2:
|
|
1126
|
-
throw this.
|
|
1125
|
+
throw this.h9_1;
|
|
1127
1126
|
}
|
|
1128
1127
|
} catch ($p) {
|
|
1129
1128
|
var e = $p;
|
|
1130
|
-
if (this.
|
|
1129
|
+
if (this.f9_1 === 2) {
|
|
1131
1130
|
throw e;
|
|
1132
1131
|
} else {
|
|
1133
|
-
this.
|
|
1134
|
-
this.
|
|
1132
|
+
this.e9_1 = this.f9_1;
|
|
1133
|
+
this.h9_1 = e;
|
|
1135
1134
|
}
|
|
1136
1135
|
}
|
|
1137
1136
|
while (true);
|
|
@@ -1144,53 +1143,53 @@
|
|
|
1144
1143
|
tmp = sendWithoutRequestCallback;
|
|
1145
1144
|
}
|
|
1146
1145
|
sendWithoutRequestCallback = tmp;
|
|
1147
|
-
this.
|
|
1148
|
-
this.
|
|
1149
|
-
this.
|
|
1150
|
-
this.
|
|
1146
|
+
this.j47_1 = refreshTokens;
|
|
1147
|
+
this.k47_1 = sendWithoutRequestCallback;
|
|
1148
|
+
this.l47_1 = realm;
|
|
1149
|
+
this.m47_1 = new AuthTokenHolder(loadTokens);
|
|
1151
1150
|
}
|
|
1152
|
-
protoOf(BearerAuthProvider).
|
|
1151
|
+
protoOf(BearerAuthProvider).l44 = function () {
|
|
1153
1152
|
var message = 'Deprecated';
|
|
1154
1153
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1155
1154
|
};
|
|
1156
|
-
protoOf(BearerAuthProvider).
|
|
1157
|
-
return this.
|
|
1155
|
+
protoOf(BearerAuthProvider).n43 = function (request) {
|
|
1156
|
+
return this.k47_1(request);
|
|
1158
1157
|
};
|
|
1159
|
-
protoOf(BearerAuthProvider).
|
|
1160
|
-
if (!(auth.
|
|
1161
|
-
get_LOGGER().
|
|
1158
|
+
protoOf(BearerAuthProvider).m41 = function (auth) {
|
|
1159
|
+
if (!(auth.h2p_1 === 'Bearer')) {
|
|
1160
|
+
get_LOGGER().u2d('Bearer Auth Provider is not applicable for ' + auth.toString());
|
|
1162
1161
|
return false;
|
|
1163
1162
|
}
|
|
1164
1163
|
var tmp;
|
|
1165
|
-
if (this.
|
|
1164
|
+
if (this.l47_1 == null) {
|
|
1166
1165
|
tmp = true;
|
|
1167
1166
|
} else {
|
|
1168
1167
|
if (!(auth instanceof Parameterized)) {
|
|
1169
1168
|
tmp = false;
|
|
1170
1169
|
} else {
|
|
1171
|
-
tmp = auth.
|
|
1170
|
+
tmp = auth.q2f('realm') == this.l47_1;
|
|
1172
1171
|
}
|
|
1173
1172
|
}
|
|
1174
1173
|
var isSameRealm = tmp;
|
|
1175
1174
|
if (!isSameRealm) {
|
|
1176
|
-
get_LOGGER().
|
|
1175
|
+
get_LOGGER().u2d('Bearer Auth Provider is not applicable for this realm');
|
|
1177
1176
|
}
|
|
1178
1177
|
return isSameRealm;
|
|
1179
1178
|
};
|
|
1180
|
-
protoOf(BearerAuthProvider).
|
|
1179
|
+
protoOf(BearerAuthProvider).k44 = function (request, authHeader, $completion) {
|
|
1181
1180
|
var tmp = new $addRequestHeadersCOROUTINE$4(this, request, authHeader, $completion);
|
|
1182
|
-
tmp.
|
|
1183
|
-
tmp.
|
|
1184
|
-
return tmp.
|
|
1181
|
+
tmp.g9_1 = Unit_instance;
|
|
1182
|
+
tmp.h9_1 = null;
|
|
1183
|
+
return tmp.m9();
|
|
1185
1184
|
};
|
|
1186
|
-
protoOf(BearerAuthProvider).
|
|
1185
|
+
protoOf(BearerAuthProvider).j44 = function (response, $completion) {
|
|
1187
1186
|
var tmp = new $refreshTokenCOROUTINE$5(this, response, $completion);
|
|
1188
|
-
tmp.
|
|
1189
|
-
tmp.
|
|
1190
|
-
return tmp.
|
|
1187
|
+
tmp.g9_1 = Unit_instance;
|
|
1188
|
+
tmp.h9_1 = null;
|
|
1189
|
+
return tmp.m9();
|
|
1191
1190
|
};
|
|
1192
1191
|
//region block: post-declaration
|
|
1193
|
-
protoOf(BearerAuthProvider).
|
|
1192
|
+
protoOf(BearerAuthProvider).o43 = addRequestHeaders$default;
|
|
1194
1193
|
//endregion
|
|
1195
1194
|
//region block: exports
|
|
1196
1195
|
_.$_$ = _.$_$ || {};
|
|
@@ -1201,5 +1200,3 @@
|
|
|
1201
1200
|
//endregion
|
|
1202
1201
|
return _;
|
|
1203
1202
|
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-atomicfu.js'), require('./ktor-ktor-utils.js'), require('./ktor-ktor-client-ktor-client-core.js'), require('./ktor-ktor-http.js'), require('./kotlinx-coroutines-core.js')));
|
|
1204
|
-
|
|
1205
|
-
//# sourceMappingURL=ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js.map
|