@doordeck/doordeck-headless-sdk 0.107.0 → 0.108.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/Kermit-kermit-core.js +44 -44
- package/kotlin/Kermit-kermit.js +4 -4
- package/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js +1393 -1393
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +10 -10
- package/kotlin/doordeck-sdk.js +9596 -9786
- package/kotlin/kotlinx-coroutines-core.js +855 -844
- package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +32 -32
- package/kotlin/kotlinx-io-kotlinx-io-core.js +630 -428
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1738 -1742
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1399 -1399
- package/kotlin/ktor-ktor-client-ktor-client-core.js +1895 -1895
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js +245 -241
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js +135 -135
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-logging.js +658 -658
- package/kotlin/ktor-ktor-http-ktor-http-cio.js +329 -329
- package/kotlin/ktor-ktor-http.js +677 -677
- package/kotlin/ktor-ktor-io.js +976 -888
- package/kotlin/ktor-ktor-shared-ktor-events.js +5 -5
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx-ktor-serialization-kotlinx-json.js +7 -7
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx.js +133 -133
- package/kotlin/ktor-ktor-shared-ktor-serialization.js +58 -58
- package/kotlin/ktor-ktor-shared-ktor-websockets.js +38 -38
- package/kotlin/ktor-ktor-utils.js +644 -644
- package/package.json +1 -1
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
initMetadataForCoroutine($invoke$refreshTokenIfNeededCOROUTINE$0, CoroutineImpl);
|
|
70
70
|
initMetadataForCoroutine($invoke$executeWithNewTokenCOROUTINE$1, CoroutineImpl);
|
|
71
71
|
function sendWithoutRequest(request) {
|
|
72
|
-
return this.
|
|
72
|
+
return this.i4u();
|
|
73
73
|
}
|
|
74
74
|
function addRequestHeaders$default(request, authHeader, $completion, $super) {
|
|
75
75
|
authHeader = authHeader === VOID ? null : authHeader;
|
|
76
|
-
return $super === VOID ? this.
|
|
76
|
+
return $super === VOID ? this.h4u(request, authHeader, $completion) : $super.h4u.call(this, request, authHeader, $completion);
|
|
77
77
|
}
|
|
78
78
|
function refreshToken(response, $completion) {
|
|
79
79
|
return true;
|
|
@@ -118,14 +118,14 @@
|
|
|
118
118
|
function AuthConfig$isUnauthorizedResponse$slambda(resultContinuation) {
|
|
119
119
|
CoroutineImpl.call(this, resultContinuation);
|
|
120
120
|
}
|
|
121
|
-
protoOf(AuthConfig$isUnauthorizedResponse$slambda).
|
|
122
|
-
var tmp = this.
|
|
121
|
+
protoOf(AuthConfig$isUnauthorizedResponse$slambda).d4r = function (it, $completion) {
|
|
122
|
+
var tmp = this.d3r(it, $completion);
|
|
123
123
|
tmp.i9_1 = Unit_instance;
|
|
124
124
|
tmp.j9_1 = null;
|
|
125
125
|
return tmp.o9();
|
|
126
126
|
};
|
|
127
127
|
protoOf(AuthConfig$isUnauthorizedResponse$slambda).ca = function (p1, $completion) {
|
|
128
|
-
return this.
|
|
128
|
+
return this.d4r(p1 instanceof HttpResponse ? p1 : THROW_CCE(), $completion);
|
|
129
129
|
};
|
|
130
130
|
protoOf(AuthConfig$isUnauthorizedResponse$slambda).o9 = function () {
|
|
131
131
|
var suspendResult = this.i9_1;
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
var tmp = this.g9_1;
|
|
135
135
|
if (tmp === 0) {
|
|
136
136
|
this.h9_1 = 1;
|
|
137
|
-
return this.
|
|
137
|
+
return this.c4r_1.y34().equals(Companion_getInstance().p30_1);
|
|
138
138
|
} else if (tmp === 1) {
|
|
139
139
|
throw this.j9_1;
|
|
140
140
|
}
|
|
@@ -144,15 +144,15 @@
|
|
|
144
144
|
}
|
|
145
145
|
while (true);
|
|
146
146
|
};
|
|
147
|
-
protoOf(AuthConfig$isUnauthorizedResponse$slambda).
|
|
147
|
+
protoOf(AuthConfig$isUnauthorizedResponse$slambda).d3r = function (it, completion) {
|
|
148
148
|
var i = new AuthConfig$isUnauthorizedResponse$slambda(completion);
|
|
149
|
-
i.
|
|
149
|
+
i.c4r_1 = it;
|
|
150
150
|
return i;
|
|
151
151
|
};
|
|
152
152
|
function AuthConfig$isUnauthorizedResponse$slambda_0(resultContinuation) {
|
|
153
153
|
var i = new AuthConfig$isUnauthorizedResponse$slambda(resultContinuation);
|
|
154
154
|
var l = function (it, $completion) {
|
|
155
|
-
return i.
|
|
155
|
+
return i.d4r(it, $completion);
|
|
156
156
|
};
|
|
157
157
|
l.$arity = 1;
|
|
158
158
|
return l;
|
|
@@ -160,12 +160,12 @@
|
|
|
160
160
|
function AuthConfig() {
|
|
161
161
|
var tmp = this;
|
|
162
162
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
163
|
-
tmp.
|
|
163
|
+
tmp.e4r_1 = ArrayList_init_$Create$();
|
|
164
164
|
var tmp_0 = this;
|
|
165
|
-
tmp_0.
|
|
165
|
+
tmp_0.f4r_1 = AuthConfig$isUnauthorizedResponse$slambda_0(null);
|
|
166
166
|
}
|
|
167
167
|
function AtomicCounter() {
|
|
168
|
-
this.
|
|
168
|
+
this.g4r_1 = atomic$int$1(0);
|
|
169
169
|
}
|
|
170
170
|
function AuthConfig$_init_$ref_ms3pb9() {
|
|
171
171
|
var l = function () {
|
|
@@ -176,8 +176,8 @@
|
|
|
176
176
|
}
|
|
177
177
|
function Auth$lambda($this$createClientPlugin) {
|
|
178
178
|
_init_properties_Auth_kt__9ob1dk();
|
|
179
|
-
var providers = toList($this$createClientPlugin.
|
|
180
|
-
$this$createClientPlugin.
|
|
179
|
+
var providers = toList($this$createClientPlugin.d3q_1.e4r_1);
|
|
180
|
+
$this$createClientPlugin.c3q_1.x3f_1.q2j(get_AuthProvidersKey(), providers);
|
|
181
181
|
var tokenVersions = new ConcurrentMap();
|
|
182
182
|
// Inline function 'io.ktor.util.AttributeKey' call
|
|
183
183
|
var name = 'ProviderVersionAttributeKey';
|
|
@@ -200,13 +200,13 @@
|
|
|
200
200
|
var tmp$ret$0 = tmp_0;
|
|
201
201
|
var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
|
|
202
202
|
var tokenVersionsAttributeKey = new AttributeKey(name, tmp$ret$1);
|
|
203
|
-
$this$createClientPlugin.
|
|
203
|
+
$this$createClientPlugin.q48(Auth$lambda$slambda_0(providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
204
204
|
var tmp_2 = Send_instance;
|
|
205
|
-
$this$createClientPlugin.
|
|
205
|
+
$this$createClientPlugin.g3q(tmp_2, Auth$lambda$slambda_2($this$createClientPlugin, providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
206
206
|
return Unit_instance;
|
|
207
207
|
}
|
|
208
208
|
function invoke$findProvider(call, candidateProviders) {
|
|
209
|
-
var headerValues = call.
|
|
209
|
+
var headerValues = call.u3g().c2z().t2n(HttpHeaders_getInstance().b2y_1);
|
|
210
210
|
var tmp;
|
|
211
211
|
if (headerValues == null) {
|
|
212
212
|
tmp = null;
|
|
@@ -232,8 +232,8 @@
|
|
|
232
232
|
// Inline function 'io.ktor.util.logging.trace' call
|
|
233
233
|
var this_0 = get_LOGGER();
|
|
234
234
|
if (get_isTraceEnabled(this_0)) {
|
|
235
|
-
var tmp$ret$3 = 'Unauthorized response ' + call.
|
|
236
|
-
this_0.
|
|
235
|
+
var tmp$ret$3 = 'Unauthorized response ' + call.d3k().g3k().toString() + ' has no or empty "WWW-Authenticate" header. ' + 'Can not add or refresh token';
|
|
236
|
+
this_0.l2s(tmp$ret$3);
|
|
237
237
|
}
|
|
238
238
|
tmp_0 = null;
|
|
239
239
|
} else {
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
var _iterator__ex2g4s_1 = candidateProviders.p();
|
|
251
251
|
while (_iterator__ex2g4s_1.q()) {
|
|
252
252
|
var element_0 = _iterator__ex2g4s_1.r();
|
|
253
|
-
if (element_0.
|
|
253
|
+
if (element_0.h4r(element)) {
|
|
254
254
|
tmp$ret$6 = element_0;
|
|
255
255
|
break $l$block;
|
|
256
256
|
}
|
|
@@ -297,21 +297,21 @@
|
|
|
297
297
|
return LinkedHashMap_init_$Create$();
|
|
298
298
|
}
|
|
299
299
|
function Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
300
|
-
this.
|
|
301
|
-
this.
|
|
302
|
-
this.
|
|
300
|
+
this.u4s_1 = $providers;
|
|
301
|
+
this.v4s_1 = $tokenVersions;
|
|
302
|
+
this.w4s_1 = $tokenVersionsAttributeKey;
|
|
303
303
|
CoroutineImpl.call(this, resultContinuation);
|
|
304
304
|
}
|
|
305
|
-
protoOf(Auth$lambda$slambda).
|
|
306
|
-
var tmp = this.
|
|
305
|
+
protoOf(Auth$lambda$slambda).d49 = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
306
|
+
var tmp = this.e49($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
307
307
|
tmp.i9_1 = Unit_instance;
|
|
308
308
|
tmp.j9_1 = null;
|
|
309
309
|
return tmp.o9();
|
|
310
310
|
};
|
|
311
|
-
protoOf(Auth$lambda$slambda).
|
|
311
|
+
protoOf(Auth$lambda$slambda).f49 = function (p1, p2, p3, $completion) {
|
|
312
312
|
var tmp = p1 instanceof OnRequestContext ? p1 : THROW_CCE();
|
|
313
313
|
var tmp_0 = p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE();
|
|
314
|
-
return this.
|
|
314
|
+
return this.d49(tmp, tmp_0, !(p3 == null) ? p3 : THROW_CCE(), $completion);
|
|
315
315
|
};
|
|
316
316
|
protoOf(Auth$lambda$slambda).o9 = function () {
|
|
317
317
|
var suspendResult = this.i9_1;
|
|
@@ -322,46 +322,46 @@
|
|
|
322
322
|
case 0:
|
|
323
323
|
this.h9_1 = 4;
|
|
324
324
|
var tmp_0 = this;
|
|
325
|
-
var tmp0 = this.
|
|
325
|
+
var tmp0 = this.u4s_1;
|
|
326
326
|
var destination = ArrayList_init_$Create$();
|
|
327
327
|
var _iterator__ex2g4s = tmp0.p();
|
|
328
328
|
while (_iterator__ex2g4s.q()) {
|
|
329
329
|
var element = _iterator__ex2g4s.r();
|
|
330
|
-
if (element.
|
|
330
|
+
if (element.i4t(this.y4s_1)) {
|
|
331
331
|
destination.k(element);
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
tmp_0.
|
|
336
|
-
this.
|
|
337
|
-
this.
|
|
335
|
+
tmp_0.a4t_1 = destination;
|
|
336
|
+
this.b4t_1 = this.a4t_1;
|
|
337
|
+
this.c4t_1 = this.b4t_1.p();
|
|
338
338
|
this.g9_1 = 1;
|
|
339
339
|
continue $sm;
|
|
340
340
|
case 1:
|
|
341
|
-
if (!this.
|
|
341
|
+
if (!this.c4t_1.q()) {
|
|
342
342
|
this.g9_1 = 3;
|
|
343
343
|
continue $sm;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
this.
|
|
346
|
+
this.d4t_1 = this.c4t_1.r();
|
|
347
347
|
var tmp_1 = this;
|
|
348
|
-
tmp_1.
|
|
349
|
-
this.
|
|
348
|
+
tmp_1.e4t_1 = this.d4t_1;
|
|
349
|
+
this.f4t_1 = this.e4t_1;
|
|
350
350
|
var this_0 = get_LOGGER();
|
|
351
351
|
if (get_isTraceEnabled(this_0)) {
|
|
352
|
-
this_0.
|
|
352
|
+
this_0.l2s('Adding auth headers for ' + this.y4s_1.u3h_1.toString() + ' from provider ' + toString(this.f4t_1));
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
var tmp_2 = this;
|
|
356
|
-
tmp_2.
|
|
356
|
+
tmp_2.g4t_1 = this.v4s_1.d2s(this.f4t_1, Auth$lambda$slambda$lambda);
|
|
357
357
|
var tmp_3 = this;
|
|
358
|
-
tmp_3.
|
|
359
|
-
var tmp1 = this.
|
|
360
|
-
var tmp2 = this.
|
|
361
|
-
var value = this.
|
|
358
|
+
tmp_3.h4t_1 = this.y4s_1.z3h_1.s2j(this.w4s_1, Auth$lambda$slambda$lambda_0);
|
|
359
|
+
var tmp1 = this.h4t_1;
|
|
360
|
+
var tmp2 = this.f4t_1;
|
|
361
|
+
var value = this.g4t_1.g4r_1.kotlinx$atomicfu$value;
|
|
362
362
|
tmp1.n2(tmp2, value);
|
|
363
363
|
this.g9_1 = 2;
|
|
364
|
-
suspendResult = this.
|
|
364
|
+
suspendResult = this.f4t_1.j4t(this.y4s_1, VOID, this);
|
|
365
365
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
366
366
|
return suspendResult;
|
|
367
367
|
}
|
|
@@ -386,37 +386,37 @@
|
|
|
386
386
|
}
|
|
387
387
|
while (true);
|
|
388
388
|
};
|
|
389
|
-
protoOf(Auth$lambda$slambda).
|
|
390
|
-
var i = new Auth$lambda$slambda(this.
|
|
391
|
-
i.
|
|
392
|
-
i.
|
|
393
|
-
i.
|
|
389
|
+
protoOf(Auth$lambda$slambda).e49 = function ($this$onRequest, request, _unused_var__etf5q3, completion) {
|
|
390
|
+
var i = new Auth$lambda$slambda(this.u4s_1, this.v4s_1, this.w4s_1, completion);
|
|
391
|
+
i.x4s_1 = $this$onRequest;
|
|
392
|
+
i.y4s_1 = request;
|
|
393
|
+
i.z4s_1 = _unused_var__etf5q3;
|
|
394
394
|
return i;
|
|
395
395
|
};
|
|
396
396
|
function Auth$lambda$slambda_0($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
397
397
|
var i = new Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
398
398
|
var l = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
399
|
-
return i.
|
|
399
|
+
return i.d49($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
400
400
|
};
|
|
401
401
|
l.$arity = 3;
|
|
402
402
|
return l;
|
|
403
403
|
}
|
|
404
404
|
function Auth$lambda$slambda_1($this_createClientPlugin, $providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
405
|
-
this.
|
|
406
|
-
this.
|
|
407
|
-
this.
|
|
408
|
-
this.
|
|
405
|
+
this.s4t_1 = $this_createClientPlugin;
|
|
406
|
+
this.t4t_1 = $providers;
|
|
407
|
+
this.u4t_1 = $tokenVersions;
|
|
408
|
+
this.v4t_1 = $tokenVersionsAttributeKey;
|
|
409
409
|
CoroutineImpl.call(this, resultContinuation);
|
|
410
410
|
}
|
|
411
|
-
protoOf(Auth$lambda$slambda_1).
|
|
412
|
-
var tmp = this.
|
|
411
|
+
protoOf(Auth$lambda$slambda_1).l3z = function ($this$on, originalRequest, $completion) {
|
|
412
|
+
var tmp = this.m3z($this$on, originalRequest, $completion);
|
|
413
413
|
tmp.i9_1 = Unit_instance;
|
|
414
414
|
tmp.j9_1 = null;
|
|
415
415
|
return tmp.o9();
|
|
416
416
|
};
|
|
417
417
|
protoOf(Auth$lambda$slambda_1).da = function (p1, p2, $completion) {
|
|
418
418
|
var tmp = p1 instanceof Sender ? p1 : THROW_CCE();
|
|
419
|
-
return this.
|
|
419
|
+
return this.l3z(tmp, p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE(), $completion);
|
|
420
420
|
};
|
|
421
421
|
protoOf(Auth$lambda$slambda_1).o9 = function () {
|
|
422
422
|
var suspendResult = this.i9_1;
|
|
@@ -427,40 +427,40 @@
|
|
|
427
427
|
case 0:
|
|
428
428
|
this.h9_1 = 10;
|
|
429
429
|
this.g9_1 = 1;
|
|
430
|
-
suspendResult = this.
|
|
430
|
+
suspendResult = this.w4t_1.p3z(this.x4t_1, this);
|
|
431
431
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
432
432
|
return suspendResult;
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
continue $sm;
|
|
436
436
|
case 1:
|
|
437
|
-
this.
|
|
437
|
+
this.y4t_1 = suspendResult;
|
|
438
438
|
this.g9_1 = 2;
|
|
439
|
-
suspendResult = this.
|
|
439
|
+
suspendResult = this.s4t_1.d3q_1.f4r_1(this.y4t_1.u3g(), this);
|
|
440
440
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
441
441
|
return suspendResult;
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
continue $sm;
|
|
445
445
|
case 2:
|
|
446
|
-
this.
|
|
447
|
-
if (!this.
|
|
448
|
-
return this.
|
|
446
|
+
this.z4t_1 = suspendResult;
|
|
447
|
+
if (!this.z4t_1) {
|
|
448
|
+
return this.y4t_1;
|
|
449
449
|
} else {
|
|
450
450
|
this.g9_1 = 3;
|
|
451
451
|
continue $sm;
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
case 3:
|
|
455
|
-
if (this.
|
|
456
|
-
return this.
|
|
457
|
-
this.
|
|
458
|
-
this.
|
|
455
|
+
if (this.y4t_1.d3k().c3j().p2j(get_AuthCircuitBreaker()))
|
|
456
|
+
return this.y4t_1;
|
|
457
|
+
this.a4u_1 = this.y4t_1;
|
|
458
|
+
this.b4u_1 = HashSet_init_$Create$(this.t4t_1);
|
|
459
459
|
this.g9_1 = 4;
|
|
460
460
|
continue $sm;
|
|
461
461
|
case 4:
|
|
462
462
|
this.g9_1 = 5;
|
|
463
|
-
suspendResult = this.
|
|
463
|
+
suspendResult = this.s4t_1.d3q_1.f4r_1(this.a4u_1.u3g(), this);
|
|
464
464
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
465
465
|
return suspendResult;
|
|
466
466
|
}
|
|
@@ -474,43 +474,43 @@
|
|
|
474
474
|
|
|
475
475
|
var this_0 = get_LOGGER();
|
|
476
476
|
if (get_isTraceEnabled(this_0)) {
|
|
477
|
-
this_0.
|
|
477
|
+
this_0.l2s('Unauthorized response for ' + this.a4u_1.d3k().g3k().toString());
|
|
478
478
|
}
|
|
479
479
|
|
|
480
480
|
var tmp_0 = this;
|
|
481
|
-
var tmp0_elvis_lhs = invoke$findProvider(this.
|
|
481
|
+
var tmp0_elvis_lhs = invoke$findProvider(this.a4u_1, this.b4u_1);
|
|
482
482
|
var tmp_1;
|
|
483
483
|
if (tmp0_elvis_lhs == null) {
|
|
484
|
-
this.
|
|
484
|
+
this.w4t_1;
|
|
485
485
|
var this_1 = get_LOGGER();
|
|
486
486
|
if (get_isTraceEnabled(this_1)) {
|
|
487
|
-
this_1.
|
|
487
|
+
this_1.l2s('Can not find auth provider for ' + this.a4u_1.d3k().g3k().toString());
|
|
488
488
|
}
|
|
489
|
-
return this.
|
|
489
|
+
return this.a4u_1;
|
|
490
490
|
} else {
|
|
491
491
|
tmp_1 = tmp0_elvis_lhs;
|
|
492
492
|
}
|
|
493
493
|
|
|
494
|
-
tmp_0.
|
|
495
|
-
this.
|
|
496
|
-
this.
|
|
494
|
+
tmp_0.c4u_1 = tmp_1;
|
|
495
|
+
this.d4u_1 = this.c4u_1.tg();
|
|
496
|
+
this.e4u_1 = this.c4u_1.ug();
|
|
497
497
|
var this_2 = get_LOGGER();
|
|
498
498
|
if (get_isTraceEnabled(this_2)) {
|
|
499
|
-
this_2.
|
|
499
|
+
this_2.l2s('Using provider ' + toString(this.d4u_1) + ' for ' + this.a4u_1.d3k().g3k().toString());
|
|
500
500
|
}
|
|
501
501
|
|
|
502
|
-
this.
|
|
502
|
+
this.b4u_1.d2(this.d4u_1);
|
|
503
503
|
this.g9_1 = 6;
|
|
504
|
-
suspendResult = invoke$refreshTokenIfNeeded(this.
|
|
504
|
+
suspendResult = invoke$refreshTokenIfNeeded(this.u4t_1, this.v4t_1, this.a4u_1, this.d4u_1, this.x4t_1, this);
|
|
505
505
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
506
506
|
return suspendResult;
|
|
507
507
|
}
|
|
508
508
|
|
|
509
509
|
continue $sm;
|
|
510
510
|
case 6:
|
|
511
|
-
this.
|
|
512
|
-
if (!this.
|
|
513
|
-
return this.
|
|
511
|
+
this.f4u_1 = suspendResult;
|
|
512
|
+
if (!this.f4u_1) {
|
|
513
|
+
return this.a4u_1;
|
|
514
514
|
} else {
|
|
515
515
|
this.g9_1 = 7;
|
|
516
516
|
continue $sm;
|
|
@@ -518,18 +518,18 @@
|
|
|
518
518
|
|
|
519
519
|
case 7:
|
|
520
520
|
this.g9_1 = 8;
|
|
521
|
-
suspendResult = invoke$executeWithNewToken(this.
|
|
521
|
+
suspendResult = invoke$executeWithNewToken(this.w4t_1, this.a4u_1, this.d4u_1, this.x4t_1, this.e4u_1, this);
|
|
522
522
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
523
523
|
return suspendResult;
|
|
524
524
|
}
|
|
525
525
|
|
|
526
526
|
continue $sm;
|
|
527
527
|
case 8:
|
|
528
|
-
this.
|
|
528
|
+
this.a4u_1 = suspendResult;
|
|
529
529
|
this.g9_1 = 4;
|
|
530
530
|
continue $sm;
|
|
531
531
|
case 9:
|
|
532
|
-
return this.
|
|
532
|
+
return this.a4u_1;
|
|
533
533
|
case 10:
|
|
534
534
|
throw this.j9_1;
|
|
535
535
|
}
|
|
@@ -544,16 +544,16 @@
|
|
|
544
544
|
}
|
|
545
545
|
while (true);
|
|
546
546
|
};
|
|
547
|
-
protoOf(Auth$lambda$slambda_1).
|
|
548
|
-
var i = new Auth$lambda$slambda_1(this.
|
|
549
|
-
i.
|
|
550
|
-
i.
|
|
547
|
+
protoOf(Auth$lambda$slambda_1).m3z = function ($this$on, originalRequest, completion) {
|
|
548
|
+
var i = new Auth$lambda$slambda_1(this.s4t_1, this.t4t_1, this.u4t_1, this.v4t_1, completion);
|
|
549
|
+
i.w4t_1 = $this$on;
|
|
550
|
+
i.x4t_1 = originalRequest;
|
|
551
551
|
return i;
|
|
552
552
|
};
|
|
553
553
|
function Auth$lambda$slambda_2($this_createClientPlugin, $providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
554
554
|
var i = new Auth$lambda$slambda_1($this_createClientPlugin, $providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
555
555
|
var l = function ($this$on, originalRequest, $completion) {
|
|
556
|
-
return i.
|
|
556
|
+
return i.l3z($this$on, originalRequest, $completion);
|
|
557
557
|
};
|
|
558
558
|
l.$arity = 2;
|
|
559
559
|
return l;
|
|
@@ -569,11 +569,11 @@
|
|
|
569
569
|
}
|
|
570
570
|
function $invoke$refreshTokenIfNeededCOROUTINE$0(tokenVersions, tokenVersionsAttributeKey, call, provider, request, resultContinuation) {
|
|
571
571
|
CoroutineImpl.call(this, resultContinuation);
|
|
572
|
-
this.
|
|
573
|
-
this.
|
|
574
|
-
this.
|
|
575
|
-
this.
|
|
576
|
-
this.
|
|
572
|
+
this.q4r_1 = tokenVersions;
|
|
573
|
+
this.r4r_1 = tokenVersionsAttributeKey;
|
|
574
|
+
this.s4r_1 = call;
|
|
575
|
+
this.t4r_1 = provider;
|
|
576
|
+
this.u4r_1 = request;
|
|
577
577
|
}
|
|
578
578
|
protoOf($invoke$refreshTokenIfNeededCOROUTINE$0).o9 = function () {
|
|
579
579
|
var suspendResult = this.i9_1;
|
|
@@ -584,17 +584,17 @@
|
|
|
584
584
|
case 0:
|
|
585
585
|
this.h9_1 = 4;
|
|
586
586
|
var tmp_0 = this;
|
|
587
|
-
tmp_0.
|
|
587
|
+
tmp_0.v4r_1 = this.q4r_1.d2s(this.t4r_1, Auth$lambda$refreshTokenIfNeeded$lambda);
|
|
588
588
|
var tmp_1 = this;
|
|
589
|
-
tmp_1.
|
|
590
|
-
this.
|
|
591
|
-
if (!(this.
|
|
589
|
+
tmp_1.w4r_1 = this.u4r_1.z3h_1.s2j(this.r4r_1, Auth$lambda$refreshTokenIfNeeded$lambda_0);
|
|
590
|
+
this.x4r_1 = this.w4r_1.k2(this.t4r_1);
|
|
591
|
+
if (!(this.x4r_1 == null) && this.x4r_1 >= this.v4r_1.g4r_1.kotlinx$atomicfu$value) {
|
|
592
592
|
var this_0 = get_LOGGER();
|
|
593
593
|
if (get_isTraceEnabled(this_0)) {
|
|
594
|
-
this_0.
|
|
594
|
+
this_0.l2s('Refreshing token for ' + this.s4r_1.d3k().g3k().toString());
|
|
595
595
|
}
|
|
596
596
|
this.g9_1 = 1;
|
|
597
|
-
suspendResult = this.
|
|
597
|
+
suspendResult = this.t4r_1.g4u(this.s4r_1.u3g(), this);
|
|
598
598
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
599
599
|
return suspendResult;
|
|
600
600
|
}
|
|
@@ -609,13 +609,13 @@
|
|
|
609
609
|
if (!ARGUMENT) {
|
|
610
610
|
var this_1 = get_LOGGER();
|
|
611
611
|
if (get_isTraceEnabled(this_1)) {
|
|
612
|
-
this_1.
|
|
612
|
+
this_1.l2s('Refreshing token failed for ' + this.s4r_1.d3k().g3k().toString());
|
|
613
613
|
}
|
|
614
614
|
return false;
|
|
615
615
|
} else {
|
|
616
|
-
var tmp2 = this.
|
|
617
|
-
var tmp3 = this.
|
|
618
|
-
var value = this.
|
|
616
|
+
var tmp2 = this.w4r_1;
|
|
617
|
+
var tmp3 = this.t4r_1;
|
|
618
|
+
var value = this.v4r_1.g4r_1.atomicfu$incrementAndGet();
|
|
619
619
|
tmp2.n2(tmp3, value);
|
|
620
620
|
this.g9_1 = 2;
|
|
621
621
|
continue $sm;
|
|
@@ -642,11 +642,11 @@
|
|
|
642
642
|
};
|
|
643
643
|
function $invoke$executeWithNewTokenCOROUTINE$1(_this__u8e3s4, call, provider, oldRequest, authHeader, resultContinuation) {
|
|
644
644
|
CoroutineImpl.call(this, resultContinuation);
|
|
645
|
-
this.
|
|
646
|
-
this.
|
|
647
|
-
this.
|
|
648
|
-
this.
|
|
649
|
-
this.
|
|
645
|
+
this.g4s_1 = _this__u8e3s4;
|
|
646
|
+
this.h4s_1 = call;
|
|
647
|
+
this.i4s_1 = provider;
|
|
648
|
+
this.j4s_1 = oldRequest;
|
|
649
|
+
this.k4s_1 = authHeader;
|
|
650
650
|
}
|
|
651
651
|
protoOf($invoke$executeWithNewTokenCOROUTINE$1).o9 = function () {
|
|
652
652
|
var suspendResult = this.i9_1;
|
|
@@ -656,24 +656,24 @@
|
|
|
656
656
|
switch (tmp) {
|
|
657
657
|
case 0:
|
|
658
658
|
this.h9_1 = 3;
|
|
659
|
-
this.
|
|
660
|
-
this.
|
|
659
|
+
this.l4s_1 = new HttpRequestBuilder();
|
|
660
|
+
this.l4s_1.p3n(this.j4s_1);
|
|
661
661
|
this.g9_1 = 1;
|
|
662
|
-
suspendResult = this.
|
|
662
|
+
suspendResult = this.i4s_1.h4u(this.l4s_1, this.k4s_1, this);
|
|
663
663
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
664
664
|
return suspendResult;
|
|
665
665
|
}
|
|
666
666
|
|
|
667
667
|
continue $sm;
|
|
668
668
|
case 1:
|
|
669
|
-
this.
|
|
669
|
+
this.l4s_1.z3h_1.q2j(get_AuthCircuitBreaker(), Unit_instance);
|
|
670
670
|
var this_0 = get_LOGGER();
|
|
671
671
|
if (get_isTraceEnabled(this_0)) {
|
|
672
|
-
this_0.
|
|
672
|
+
this_0.l2s('Sending new request to ' + this.h4s_1.d3k().g3k().toString());
|
|
673
673
|
}
|
|
674
674
|
|
|
675
675
|
this.g9_1 = 2;
|
|
676
|
-
suspendResult = this.
|
|
676
|
+
suspendResult = this.g4s_1.p3z(this.l4s_1, this);
|
|
677
677
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
678
678
|
return suspendResult;
|
|
679
679
|
}
|
|
@@ -760,17 +760,17 @@
|
|
|
760
760
|
return Companion_instance;
|
|
761
761
|
};
|
|
762
762
|
function AuthTokenHolder$setToken$slambda($block, resultContinuation) {
|
|
763
|
-
this.
|
|
763
|
+
this.r4u_1 = $block;
|
|
764
764
|
CoroutineImpl.call(this, resultContinuation);
|
|
765
765
|
}
|
|
766
|
-
protoOf(AuthTokenHolder$setToken$slambda).
|
|
767
|
-
var tmp = this.
|
|
766
|
+
protoOf(AuthTokenHolder$setToken$slambda).t4u = function ($this$withContext, $completion) {
|
|
767
|
+
var tmp = this.b1x($this$withContext, $completion);
|
|
768
768
|
tmp.i9_1 = Unit_instance;
|
|
769
769
|
tmp.j9_1 = null;
|
|
770
770
|
return tmp.o9();
|
|
771
771
|
};
|
|
772
772
|
protoOf(AuthTokenHolder$setToken$slambda).ca = function (p1, $completion) {
|
|
773
|
-
return this.
|
|
773
|
+
return this.t4u((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
774
774
|
};
|
|
775
775
|
protoOf(AuthTokenHolder$setToken$slambda).o9 = function () {
|
|
776
776
|
var suspendResult = this.i9_1;
|
|
@@ -781,7 +781,7 @@
|
|
|
781
781
|
case 0:
|
|
782
782
|
this.h9_1 = 2;
|
|
783
783
|
this.g9_1 = 1;
|
|
784
|
-
suspendResult = this.
|
|
784
|
+
suspendResult = this.r4u_1(this);
|
|
785
785
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
786
786
|
return suspendResult;
|
|
787
787
|
}
|
|
@@ -803,22 +803,22 @@
|
|
|
803
803
|
}
|
|
804
804
|
while (true);
|
|
805
805
|
};
|
|
806
|
-
protoOf(AuthTokenHolder$setToken$slambda).
|
|
807
|
-
var i = new AuthTokenHolder$setToken$slambda(this.
|
|
808
|
-
i.
|
|
806
|
+
protoOf(AuthTokenHolder$setToken$slambda).b1x = function ($this$withContext, completion) {
|
|
807
|
+
var i = new AuthTokenHolder$setToken$slambda(this.r4u_1, completion);
|
|
808
|
+
i.s4u_1 = $this$withContext;
|
|
809
809
|
return i;
|
|
810
810
|
};
|
|
811
811
|
function AuthTokenHolder$setToken$slambda_0($block, resultContinuation) {
|
|
812
812
|
var i = new AuthTokenHolder$setToken$slambda($block, resultContinuation);
|
|
813
813
|
var l = function ($this$withContext, $completion) {
|
|
814
|
-
return i.
|
|
814
|
+
return i.t4u($this$withContext, $completion);
|
|
815
815
|
};
|
|
816
816
|
l.$arity = 1;
|
|
817
817
|
return l;
|
|
818
818
|
}
|
|
819
819
|
function $loadTokenCOROUTINE$2(_this__u8e3s4, resultContinuation) {
|
|
820
820
|
CoroutineImpl.call(this, resultContinuation);
|
|
821
|
-
this.
|
|
821
|
+
this.c4v_1 = _this__u8e3s4;
|
|
822
822
|
}
|
|
823
823
|
protoOf($loadTokenCOROUTINE$2).o9 = function () {
|
|
824
824
|
var suspendResult = this.i9_1;
|
|
@@ -828,24 +828,24 @@
|
|
|
828
828
|
switch (tmp) {
|
|
829
829
|
case 0:
|
|
830
830
|
this.h9_1 = 12;
|
|
831
|
-
if (!(this.
|
|
832
|
-
return this.
|
|
833
|
-
this.
|
|
831
|
+
if (!(this.c4v_1.l4v_1 == null))
|
|
832
|
+
return this.c4v_1.l4v_1;
|
|
833
|
+
this.d4v_1 = this.c4v_1.l4v_1;
|
|
834
834
|
if (!(this.m9().t9(Companion_instance) == null)) {
|
|
835
835
|
this.g9_1 = 10;
|
|
836
|
-
suspendResult = this.
|
|
836
|
+
suspendResult = this.c4v_1.k4v_1(this);
|
|
837
837
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
838
838
|
return suspendResult;
|
|
839
839
|
}
|
|
840
840
|
continue $sm;
|
|
841
841
|
} else {
|
|
842
842
|
var tmp_0 = this;
|
|
843
|
-
tmp_0.
|
|
844
|
-
this.
|
|
843
|
+
tmp_0.f4v_1 = this.c4v_1.n4v_1;
|
|
844
|
+
this.g4v_1 = this.f4v_1;
|
|
845
845
|
var tmp_1 = this;
|
|
846
|
-
tmp_1.
|
|
846
|
+
tmp_1.h4v_1 = null;
|
|
847
847
|
this.g9_1 = 1;
|
|
848
|
-
suspendResult = this.
|
|
848
|
+
suspendResult = this.g4v_1.o1e(this.h4v_1, this);
|
|
849
849
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
850
850
|
return suspendResult;
|
|
851
851
|
}
|
|
@@ -853,19 +853,19 @@
|
|
|
853
853
|
}
|
|
854
854
|
|
|
855
855
|
case 1:
|
|
856
|
-
this.
|
|
856
|
+
this.i4v_1 = Unit_instance;
|
|
857
857
|
this.g9_1 = 2;
|
|
858
858
|
continue $sm;
|
|
859
859
|
case 2:
|
|
860
860
|
this.h9_1 = 9;
|
|
861
|
-
this.
|
|
861
|
+
this.c4v_1.m4v_1 = true;
|
|
862
862
|
this.g9_1 = 3;
|
|
863
863
|
continue $sm;
|
|
864
864
|
case 3:
|
|
865
865
|
this.h9_1 = 8;
|
|
866
|
-
if (equals(this.
|
|
866
|
+
if (equals(this.d4v_1, this.c4v_1.l4v_1)) {
|
|
867
867
|
this.g9_1 = 4;
|
|
868
|
-
suspendResult = this.
|
|
868
|
+
suspendResult = this.c4v_1.k4v_1(this);
|
|
869
869
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
870
870
|
return suspendResult;
|
|
871
871
|
}
|
|
@@ -877,45 +877,45 @@
|
|
|
877
877
|
|
|
878
878
|
case 4:
|
|
879
879
|
var ARGUMENT = suspendResult;
|
|
880
|
-
this.
|
|
880
|
+
this.c4v_1.l4v_1 = ARGUMENT;
|
|
881
881
|
this.g9_1 = 5;
|
|
882
882
|
continue $sm;
|
|
883
883
|
case 5:
|
|
884
|
-
this.
|
|
884
|
+
this.j4v_1 = Unit_instance;
|
|
885
885
|
this.g9_1 = 6;
|
|
886
886
|
continue $sm;
|
|
887
887
|
case 6:
|
|
888
888
|
this.h9_1 = 9;
|
|
889
|
-
this.
|
|
890
|
-
this.
|
|
889
|
+
this.c4v_1.m4v_1 = false;
|
|
890
|
+
this.i4v_1 = this.c4v_1.l4v_1;
|
|
891
891
|
this.h9_1 = 12;
|
|
892
892
|
this.g9_1 = 7;
|
|
893
893
|
continue $sm;
|
|
894
894
|
case 7:
|
|
895
|
-
var tmp_2 = this.
|
|
895
|
+
var tmp_2 = this.i4v_1;
|
|
896
896
|
this.h9_1 = 12;
|
|
897
|
-
this.
|
|
898
|
-
this.
|
|
897
|
+
this.g4v_1.a1e(this.h4v_1);
|
|
898
|
+
this.e4v_1 = tmp_2;
|
|
899
899
|
this.g9_1 = 11;
|
|
900
900
|
continue $sm;
|
|
901
901
|
case 8:
|
|
902
902
|
this.h9_1 = 9;
|
|
903
903
|
var t = this.j9_1;
|
|
904
|
-
this.
|
|
904
|
+
this.c4v_1.m4v_1 = false;
|
|
905
905
|
throw t;
|
|
906
906
|
case 9:
|
|
907
907
|
this.h9_1 = 12;
|
|
908
908
|
var t_0 = this.j9_1;
|
|
909
|
-
this.
|
|
909
|
+
this.g4v_1.a1e(this.h4v_1);
|
|
910
910
|
throw t_0;
|
|
911
911
|
case 10:
|
|
912
912
|
var ARGUMENT_0 = suspendResult;
|
|
913
|
-
this.
|
|
914
|
-
this.
|
|
913
|
+
this.c4v_1.l4v_1 = ARGUMENT_0;
|
|
914
|
+
this.e4v_1 = this.c4v_1.l4v_1;
|
|
915
915
|
this.g9_1 = 11;
|
|
916
916
|
continue $sm;
|
|
917
917
|
case 11:
|
|
918
|
-
return this.
|
|
918
|
+
return this.e4v_1;
|
|
919
919
|
case 12:
|
|
920
920
|
throw this.j9_1;
|
|
921
921
|
}
|
|
@@ -932,8 +932,8 @@
|
|
|
932
932
|
};
|
|
933
933
|
function $setTokenCOROUTINE$3(_this__u8e3s4, block, resultContinuation) {
|
|
934
934
|
CoroutineImpl.call(this, resultContinuation);
|
|
935
|
-
this.
|
|
936
|
-
this.
|
|
935
|
+
this.x4v_1 = _this__u8e3s4;
|
|
936
|
+
this.y4v_1 = block;
|
|
937
937
|
}
|
|
938
938
|
protoOf($setTokenCOROUTINE$3).o9 = function () {
|
|
939
939
|
var suspendResult = this.i9_1;
|
|
@@ -943,30 +943,30 @@
|
|
|
943
943
|
switch (tmp) {
|
|
944
944
|
case 0:
|
|
945
945
|
this.h9_1 = 7;
|
|
946
|
-
this.
|
|
947
|
-
this.
|
|
946
|
+
this.z4v_1 = this.x4v_1.l4v_1;
|
|
947
|
+
this.a4w_1 = this.x4v_1.m4v_1;
|
|
948
948
|
var tmp_0 = this;
|
|
949
|
-
tmp_0.
|
|
950
|
-
this.
|
|
949
|
+
tmp_0.b4w_1 = this.x4v_1.n4v_1;
|
|
950
|
+
this.c4w_1 = this.b4w_1;
|
|
951
951
|
var tmp_1 = this;
|
|
952
|
-
tmp_1.
|
|
952
|
+
tmp_1.d4w_1 = null;
|
|
953
953
|
this.g9_1 = 1;
|
|
954
|
-
suspendResult = this.
|
|
954
|
+
suspendResult = this.c4w_1.o1e(this.d4w_1, this);
|
|
955
955
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
956
956
|
return suspendResult;
|
|
957
957
|
}
|
|
958
958
|
|
|
959
959
|
continue $sm;
|
|
960
960
|
case 1:
|
|
961
|
-
this.
|
|
961
|
+
this.e4w_1 = Unit_instance;
|
|
962
962
|
this.g9_1 = 2;
|
|
963
963
|
continue $sm;
|
|
964
964
|
case 2:
|
|
965
965
|
this.h9_1 = 6;
|
|
966
|
-
if (equals(this.
|
|
966
|
+
if (equals(this.z4v_1, this.x4v_1.l4v_1) || this.a4w_1) {
|
|
967
967
|
this.g9_1 = 3;
|
|
968
|
-
var tmp_2 = this.m9().rh(this.
|
|
969
|
-
suspendResult = withContext(tmp_2, AuthTokenHolder$setToken$slambda_0(this.
|
|
968
|
+
var tmp_2 = this.m9().rh(this.x4v_1.o4v_1);
|
|
969
|
+
suspendResult = withContext(tmp_2, AuthTokenHolder$setToken$slambda_0(this.y4v_1, null), this);
|
|
970
970
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
971
971
|
return suspendResult;
|
|
972
972
|
}
|
|
@@ -979,25 +979,25 @@
|
|
|
979
979
|
case 3:
|
|
980
980
|
var newValue = suspendResult;
|
|
981
981
|
if (!(newValue == null)) {
|
|
982
|
-
this.
|
|
982
|
+
this.x4v_1.l4v_1 = newValue;
|
|
983
983
|
}
|
|
984
984
|
|
|
985
985
|
this.g9_1 = 4;
|
|
986
986
|
continue $sm;
|
|
987
987
|
case 4:
|
|
988
|
-
this.
|
|
988
|
+
this.e4w_1 = this.x4v_1.l4v_1;
|
|
989
989
|
this.h9_1 = 7;
|
|
990
990
|
this.g9_1 = 5;
|
|
991
991
|
continue $sm;
|
|
992
992
|
case 5:
|
|
993
|
-
var tmp_3 = this.
|
|
993
|
+
var tmp_3 = this.e4w_1;
|
|
994
994
|
this.h9_1 = 7;
|
|
995
|
-
this.
|
|
995
|
+
this.c4w_1.a1e(this.d4w_1);
|
|
996
996
|
return tmp_3;
|
|
997
997
|
case 6:
|
|
998
998
|
this.h9_1 = 7;
|
|
999
999
|
var t = this.j9_1;
|
|
1000
|
-
this.
|
|
1000
|
+
this.c4w_1.a1e(this.d4w_1);
|
|
1001
1001
|
throw t;
|
|
1002
1002
|
case 7:
|
|
1003
1003
|
throw this.j9_1;
|
|
@@ -1014,19 +1014,19 @@
|
|
|
1014
1014
|
while (true);
|
|
1015
1015
|
};
|
|
1016
1016
|
function AuthTokenHolder(loadTokens) {
|
|
1017
|
-
this.
|
|
1018
|
-
this.
|
|
1019
|
-
this.
|
|
1020
|
-
this.
|
|
1021
|
-
this.
|
|
1017
|
+
this.k4v_1 = loadTokens;
|
|
1018
|
+
this.l4v_1 = null;
|
|
1019
|
+
this.m4v_1 = false;
|
|
1020
|
+
this.n4v_1 = Mutex();
|
|
1021
|
+
this.o4v_1 = new SetTokenContext();
|
|
1022
1022
|
}
|
|
1023
|
-
protoOf(AuthTokenHolder).
|
|
1023
|
+
protoOf(AuthTokenHolder).f4w = function ($completion) {
|
|
1024
1024
|
var tmp = new $loadTokenCOROUTINE$2(this, $completion);
|
|
1025
1025
|
tmp.i9_1 = Unit_instance;
|
|
1026
1026
|
tmp.j9_1 = null;
|
|
1027
1027
|
return tmp.o9();
|
|
1028
1028
|
};
|
|
1029
|
-
protoOf(AuthTokenHolder).
|
|
1029
|
+
protoOf(AuthTokenHolder).g4w = function (block, $completion) {
|
|
1030
1030
|
var tmp = new $setTokenCOROUTINE$3(this, block, $completion);
|
|
1031
1031
|
tmp.i9_1 = Unit_instance;
|
|
1032
1032
|
tmp.j9_1 = null;
|
|
@@ -1037,19 +1037,19 @@
|
|
|
1037
1037
|
var this_0 = new BearerAuthConfig();
|
|
1038
1038
|
block(this_0);
|
|
1039
1039
|
// Inline function 'kotlin.with' call
|
|
1040
|
-
_this__u8e3s4.
|
|
1040
|
+
_this__u8e3s4.e4r_1.k(new BearerAuthProvider(this_0.h4w_1, this_0.i4w_1, this_0.j4w_1, this_0.k4w_1));
|
|
1041
1041
|
}
|
|
1042
1042
|
function BearerAuthConfig$refreshTokens$slambda(resultContinuation) {
|
|
1043
1043
|
CoroutineImpl.call(this, resultContinuation);
|
|
1044
1044
|
}
|
|
1045
|
-
protoOf(BearerAuthConfig$refreshTokens$slambda).
|
|
1046
|
-
var tmp = this.
|
|
1045
|
+
protoOf(BearerAuthConfig$refreshTokens$slambda).u4w = function (_this__u8e3s4, $completion) {
|
|
1046
|
+
var tmp = this.v4w(_this__u8e3s4, $completion);
|
|
1047
1047
|
tmp.i9_1 = Unit_instance;
|
|
1048
1048
|
tmp.j9_1 = null;
|
|
1049
1049
|
return tmp.o9();
|
|
1050
1050
|
};
|
|
1051
1051
|
protoOf(BearerAuthConfig$refreshTokens$slambda).ca = function (p1, $completion) {
|
|
1052
|
-
return this.
|
|
1052
|
+
return this.u4w(p1 instanceof RefreshTokensParams ? p1 : THROW_CCE(), $completion);
|
|
1053
1053
|
};
|
|
1054
1054
|
protoOf(BearerAuthConfig$refreshTokens$slambda).o9 = function () {
|
|
1055
1055
|
var suspendResult = this.i9_1;
|
|
@@ -1068,15 +1068,15 @@
|
|
|
1068
1068
|
}
|
|
1069
1069
|
while (true);
|
|
1070
1070
|
};
|
|
1071
|
-
protoOf(BearerAuthConfig$refreshTokens$slambda).
|
|
1071
|
+
protoOf(BearerAuthConfig$refreshTokens$slambda).v4w = function (_this__u8e3s4, completion) {
|
|
1072
1072
|
var i = new BearerAuthConfig$refreshTokens$slambda(completion);
|
|
1073
|
-
i.
|
|
1073
|
+
i.t4w_1 = _this__u8e3s4;
|
|
1074
1074
|
return i;
|
|
1075
1075
|
};
|
|
1076
1076
|
function BearerAuthConfig$refreshTokens$slambda_0(resultContinuation) {
|
|
1077
1077
|
var i = new BearerAuthConfig$refreshTokens$slambda(resultContinuation);
|
|
1078
1078
|
var l = function (_this__u8e3s4, $completion) {
|
|
1079
|
-
return i.
|
|
1079
|
+
return i.u4w(_this__u8e3s4, $completion);
|
|
1080
1080
|
};
|
|
1081
1081
|
l.$arity = 1;
|
|
1082
1082
|
return l;
|
|
@@ -1084,14 +1084,14 @@
|
|
|
1084
1084
|
function BearerAuthConfig$loadTokens$slambda(resultContinuation) {
|
|
1085
1085
|
CoroutineImpl.call(this, resultContinuation);
|
|
1086
1086
|
}
|
|
1087
|
-
protoOf(BearerAuthConfig$loadTokens$slambda).
|
|
1088
|
-
var tmp = this.
|
|
1087
|
+
protoOf(BearerAuthConfig$loadTokens$slambda).e4x = function ($completion) {
|
|
1088
|
+
var tmp = this.f4x($completion);
|
|
1089
1089
|
tmp.i9_1 = Unit_instance;
|
|
1090
1090
|
tmp.j9_1 = null;
|
|
1091
1091
|
return tmp.o9();
|
|
1092
1092
|
};
|
|
1093
1093
|
protoOf(BearerAuthConfig$loadTokens$slambda).hb = function ($completion) {
|
|
1094
|
-
return this.
|
|
1094
|
+
return this.e4x($completion);
|
|
1095
1095
|
};
|
|
1096
1096
|
protoOf(BearerAuthConfig$loadTokens$slambda).o9 = function () {
|
|
1097
1097
|
var suspendResult = this.i9_1;
|
|
@@ -1110,13 +1110,13 @@
|
|
|
1110
1110
|
}
|
|
1111
1111
|
while (true);
|
|
1112
1112
|
};
|
|
1113
|
-
protoOf(BearerAuthConfig$loadTokens$slambda).
|
|
1113
|
+
protoOf(BearerAuthConfig$loadTokens$slambda).f4x = function (completion) {
|
|
1114
1114
|
return new BearerAuthConfig$loadTokens$slambda(completion);
|
|
1115
1115
|
};
|
|
1116
1116
|
function BearerAuthConfig$loadTokens$slambda_0(resultContinuation) {
|
|
1117
1117
|
var i = new BearerAuthConfig$loadTokens$slambda(resultContinuation);
|
|
1118
1118
|
var l = function ($completion) {
|
|
1119
|
-
return i.
|
|
1119
|
+
return i.e4x($completion);
|
|
1120
1120
|
};
|
|
1121
1121
|
l.$arity = 0;
|
|
1122
1122
|
return l;
|
|
@@ -1126,56 +1126,60 @@
|
|
|
1126
1126
|
}
|
|
1127
1127
|
function BearerAuthConfig() {
|
|
1128
1128
|
var tmp = this;
|
|
1129
|
-
tmp.
|
|
1129
|
+
tmp.h4w_1 = BearerAuthConfig$refreshTokens$slambda_0(null);
|
|
1130
1130
|
var tmp_0 = this;
|
|
1131
|
-
tmp_0.
|
|
1131
|
+
tmp_0.i4w_1 = BearerAuthConfig$loadTokens$slambda_0(null);
|
|
1132
1132
|
var tmp_1 = this;
|
|
1133
|
-
tmp_1.
|
|
1134
|
-
this.
|
|
1133
|
+
tmp_1.j4w_1 = BearerAuthConfig$sendWithoutRequest$lambda;
|
|
1134
|
+
this.k4w_1 = null;
|
|
1135
1135
|
}
|
|
1136
|
-
protoOf(BearerAuthConfig).
|
|
1137
|
-
this.
|
|
1136
|
+
protoOf(BearerAuthConfig).g4x = function (block) {
|
|
1137
|
+
this.h4w_1 = block;
|
|
1138
1138
|
};
|
|
1139
1139
|
function RefreshTokensParams(client, response, oldTokens) {
|
|
1140
|
-
this.
|
|
1141
|
-
this.
|
|
1142
|
-
this.
|
|
1140
|
+
this.h4x_1 = client;
|
|
1141
|
+
this.i4x_1 = response;
|
|
1142
|
+
this.j4x_1 = oldTokens;
|
|
1143
1143
|
}
|
|
1144
|
-
protoOf(RefreshTokensParams).
|
|
1145
|
-
_this__u8e3s4.
|
|
1144
|
+
protoOf(RefreshTokensParams).k4x = function (_this__u8e3s4) {
|
|
1145
|
+
_this__u8e3s4.z3h_1.q2j(get_AuthCircuitBreaker(), Unit_instance);
|
|
1146
1146
|
};
|
|
1147
1147
|
function BearerTokens(accessToken, refreshToken) {
|
|
1148
|
-
this.
|
|
1149
|
-
this.
|
|
1148
|
+
this.l4x_1 = accessToken;
|
|
1149
|
+
this.m4x_1 = refreshToken;
|
|
1150
1150
|
}
|
|
1151
1151
|
function BearerAuthProvider$_init_$lambda_lcdiwf(it) {
|
|
1152
1152
|
return true;
|
|
1153
1153
|
}
|
|
1154
|
-
function BearerAuthProvider$addRequestHeaders$lambda($token) {
|
|
1154
|
+
function BearerAuthProvider$addRequestHeaders$lambda($token, $request) {
|
|
1155
1155
|
return function ($this$headers) {
|
|
1156
|
-
var tokenValue = 'Bearer ' + $token.
|
|
1156
|
+
var tokenValue = 'Bearer ' + $token.l4x_1;
|
|
1157
1157
|
var tmp;
|
|
1158
|
-
if ($this$headers.
|
|
1159
|
-
$this$headers.
|
|
1158
|
+
if ($this$headers.w2n(HttpHeaders_getInstance().i2v_1)) {
|
|
1159
|
+
$this$headers.h2o(HttpHeaders_getInstance().i2v_1);
|
|
1160
1160
|
tmp = Unit_instance;
|
|
1161
1161
|
}
|
|
1162
|
-
|
|
1162
|
+
var tmp_0;
|
|
1163
|
+
if (!$request.z3h_1.p2j(get_AuthCircuitBreaker())) {
|
|
1164
|
+
$this$headers.e2o(HttpHeaders_getInstance().i2v_1, tokenValue);
|
|
1165
|
+
tmp_0 = Unit_instance;
|
|
1166
|
+
}
|
|
1163
1167
|
return Unit_instance;
|
|
1164
1168
|
};
|
|
1165
1169
|
}
|
|
1166
1170
|
function BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation) {
|
|
1167
|
-
this.
|
|
1168
|
-
this.
|
|
1171
|
+
this.v4x_1 = this$0;
|
|
1172
|
+
this.w4x_1 = $response;
|
|
1169
1173
|
CoroutineImpl.call(this, resultContinuation);
|
|
1170
1174
|
}
|
|
1171
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1172
|
-
var tmp = this.
|
|
1175
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).b4y = function ($completion) {
|
|
1176
|
+
var tmp = this.f4x($completion);
|
|
1173
1177
|
tmp.i9_1 = Unit_instance;
|
|
1174
1178
|
tmp.j9_1 = null;
|
|
1175
1179
|
return tmp.o9();
|
|
1176
1180
|
};
|
|
1177
1181
|
protoOf(BearerAuthProvider$refreshToken$slambda).hb = function ($completion) {
|
|
1178
|
-
return this.
|
|
1182
|
+
return this.b4y($completion);
|
|
1179
1183
|
};
|
|
1180
1184
|
protoOf(BearerAuthProvider$refreshToken$slambda).o9 = function () {
|
|
1181
1185
|
var suspendResult = this.i9_1;
|
|
@@ -1185,20 +1189,20 @@
|
|
|
1185
1189
|
switch (tmp) {
|
|
1186
1190
|
case 0:
|
|
1187
1191
|
this.h9_1 = 3;
|
|
1188
|
-
this.
|
|
1189
|
-
this.
|
|
1192
|
+
this.x4x_1 = this.v4x_1.c4y_1;
|
|
1193
|
+
this.y4x_1 = this.w4x_1.c3l().p3g_1;
|
|
1190
1194
|
this.g9_1 = 1;
|
|
1191
|
-
suspendResult = this.
|
|
1195
|
+
suspendResult = this.v4x_1.f4y_1.f4w(this);
|
|
1192
1196
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1193
1197
|
return suspendResult;
|
|
1194
1198
|
}
|
|
1195
1199
|
|
|
1196
1200
|
continue $sm;
|
|
1197
1201
|
case 1:
|
|
1198
|
-
this.
|
|
1199
|
-
this.
|
|
1202
|
+
this.z4x_1 = suspendResult;
|
|
1203
|
+
this.a4y_1 = new RefreshTokensParams(this.y4x_1, this.w4x_1, this.z4x_1);
|
|
1200
1204
|
this.g9_1 = 2;
|
|
1201
|
-
suspendResult = this.
|
|
1205
|
+
suspendResult = this.x4x_1(this.a4y_1, this);
|
|
1202
1206
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1203
1207
|
return suspendResult;
|
|
1204
1208
|
}
|
|
@@ -1220,22 +1224,22 @@
|
|
|
1220
1224
|
}
|
|
1221
1225
|
while (true);
|
|
1222
1226
|
};
|
|
1223
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1224
|
-
return new BearerAuthProvider$refreshToken$slambda(this.
|
|
1227
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).f4x = function (completion) {
|
|
1228
|
+
return new BearerAuthProvider$refreshToken$slambda(this.v4x_1, this.w4x_1, completion);
|
|
1225
1229
|
};
|
|
1226
1230
|
function BearerAuthProvider$refreshToken$slambda_0(this$0, $response, resultContinuation) {
|
|
1227
1231
|
var i = new BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation);
|
|
1228
1232
|
var l = function ($completion) {
|
|
1229
|
-
return i.
|
|
1233
|
+
return i.b4y($completion);
|
|
1230
1234
|
};
|
|
1231
1235
|
l.$arity = 0;
|
|
1232
1236
|
return l;
|
|
1233
1237
|
}
|
|
1234
1238
|
function $addRequestHeadersCOROUTINE$4(_this__u8e3s4, request, authHeader, resultContinuation) {
|
|
1235
1239
|
CoroutineImpl.call(this, resultContinuation);
|
|
1236
|
-
this.
|
|
1237
|
-
this.
|
|
1238
|
-
this.
|
|
1240
|
+
this.o4y_1 = _this__u8e3s4;
|
|
1241
|
+
this.p4y_1 = request;
|
|
1242
|
+
this.q4y_1 = authHeader;
|
|
1239
1243
|
}
|
|
1240
1244
|
protoOf($addRequestHeadersCOROUTINE$4).o9 = function () {
|
|
1241
1245
|
var suspendResult = this.i9_1;
|
|
@@ -1246,7 +1250,7 @@
|
|
|
1246
1250
|
case 0:
|
|
1247
1251
|
this.h9_1 = 2;
|
|
1248
1252
|
this.g9_1 = 1;
|
|
1249
|
-
suspendResult = this.
|
|
1253
|
+
suspendResult = this.o4y_1.f4y_1.f4w(this);
|
|
1250
1254
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1251
1255
|
return suspendResult;
|
|
1252
1256
|
}
|
|
@@ -1262,7 +1266,7 @@
|
|
|
1262
1266
|
}
|
|
1263
1267
|
|
|
1264
1268
|
var token = tmp_0;
|
|
1265
|
-
headers(this.
|
|
1269
|
+
headers(this.p4y_1, BearerAuthProvider$addRequestHeaders$lambda(token, this.p4y_1));
|
|
1266
1270
|
return Unit_instance;
|
|
1267
1271
|
case 2:
|
|
1268
1272
|
throw this.j9_1;
|
|
@@ -1280,8 +1284,8 @@
|
|
|
1280
1284
|
};
|
|
1281
1285
|
function $refreshTokenCOROUTINE$5(_this__u8e3s4, response, resultContinuation) {
|
|
1282
1286
|
CoroutineImpl.call(this, resultContinuation);
|
|
1283
|
-
this.
|
|
1284
|
-
this.
|
|
1287
|
+
this.z4y_1 = _this__u8e3s4;
|
|
1288
|
+
this.a4z_1 = response;
|
|
1285
1289
|
}
|
|
1286
1290
|
protoOf($refreshTokenCOROUTINE$5).o9 = function () {
|
|
1287
1291
|
var suspendResult = this.i9_1;
|
|
@@ -1292,7 +1296,7 @@
|
|
|
1292
1296
|
case 0:
|
|
1293
1297
|
this.h9_1 = 2;
|
|
1294
1298
|
this.g9_1 = 1;
|
|
1295
|
-
suspendResult = this.
|
|
1299
|
+
suspendResult = this.z4y_1.f4y_1.g4w(BearerAuthProvider$refreshToken$slambda_0(this.z4y_1, this.a4z_1, null), this);
|
|
1296
1300
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1297
1301
|
return suspendResult;
|
|
1298
1302
|
}
|
|
@@ -1323,46 +1327,46 @@
|
|
|
1323
1327
|
tmp = sendWithoutRequestCallback;
|
|
1324
1328
|
}
|
|
1325
1329
|
sendWithoutRequestCallback = tmp;
|
|
1326
|
-
this.
|
|
1327
|
-
this.
|
|
1328
|
-
this.
|
|
1329
|
-
this.
|
|
1330
|
+
this.c4y_1 = refreshTokens;
|
|
1331
|
+
this.d4y_1 = sendWithoutRequestCallback;
|
|
1332
|
+
this.e4y_1 = realm;
|
|
1333
|
+
this.f4y_1 = new AuthTokenHolder(loadTokens);
|
|
1330
1334
|
}
|
|
1331
|
-
protoOf(BearerAuthProvider).
|
|
1335
|
+
protoOf(BearerAuthProvider).i4u = function () {
|
|
1332
1336
|
var message = 'Deprecated';
|
|
1333
1337
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1334
1338
|
};
|
|
1335
|
-
protoOf(BearerAuthProvider).
|
|
1336
|
-
return this.
|
|
1339
|
+
protoOf(BearerAuthProvider).i4t = function (request) {
|
|
1340
|
+
return this.d4y_1(request);
|
|
1337
1341
|
};
|
|
1338
|
-
protoOf(BearerAuthProvider).
|
|
1339
|
-
if (!(auth.
|
|
1340
|
-
get_LOGGER().
|
|
1342
|
+
protoOf(BearerAuthProvider).h4r = function (auth) {
|
|
1343
|
+
if (!(auth.o34_1 === 'Bearer')) {
|
|
1344
|
+
get_LOGGER().l2s('Bearer Auth Provider is not applicable for ' + auth.toString());
|
|
1341
1345
|
return false;
|
|
1342
1346
|
}
|
|
1343
1347
|
var tmp;
|
|
1344
|
-
if (this.
|
|
1348
|
+
if (this.e4y_1 == null) {
|
|
1345
1349
|
tmp = true;
|
|
1346
1350
|
} else {
|
|
1347
1351
|
if (!(auth instanceof Parameterized)) {
|
|
1348
1352
|
tmp = false;
|
|
1349
1353
|
} else {
|
|
1350
|
-
tmp = auth.
|
|
1354
|
+
tmp = auth.u2u('realm') == this.e4y_1;
|
|
1351
1355
|
}
|
|
1352
1356
|
}
|
|
1353
1357
|
var isSameRealm = tmp;
|
|
1354
1358
|
if (!isSameRealm) {
|
|
1355
|
-
get_LOGGER().
|
|
1359
|
+
get_LOGGER().l2s('Bearer Auth Provider is not applicable for this realm');
|
|
1356
1360
|
}
|
|
1357
1361
|
return isSameRealm;
|
|
1358
1362
|
};
|
|
1359
|
-
protoOf(BearerAuthProvider).
|
|
1363
|
+
protoOf(BearerAuthProvider).h4u = function (request, authHeader, $completion) {
|
|
1360
1364
|
var tmp = new $addRequestHeadersCOROUTINE$4(this, request, authHeader, $completion);
|
|
1361
1365
|
tmp.i9_1 = Unit_instance;
|
|
1362
1366
|
tmp.j9_1 = null;
|
|
1363
1367
|
return tmp.o9();
|
|
1364
1368
|
};
|
|
1365
|
-
protoOf(BearerAuthProvider).
|
|
1369
|
+
protoOf(BearerAuthProvider).g4u = function (response, $completion) {
|
|
1366
1370
|
var tmp = new $refreshTokenCOROUTINE$5(this, response, $completion);
|
|
1367
1371
|
tmp.i9_1 = Unit_instance;
|
|
1368
1372
|
tmp.j9_1 = null;
|
|
@@ -1373,7 +1377,7 @@
|
|
|
1373
1377
|
protoOf(SetTokenContext).qh = fold;
|
|
1374
1378
|
protoOf(SetTokenContext).ph = minusKey;
|
|
1375
1379
|
protoOf(SetTokenContext).rh = plus;
|
|
1376
|
-
protoOf(BearerAuthProvider).
|
|
1380
|
+
protoOf(BearerAuthProvider).j4t = addRequestHeaders$default;
|
|
1377
1381
|
//endregion
|
|
1378
1382
|
//region block: init
|
|
1379
1383
|
Companion_instance = new Companion();
|