@doordeck/doordeck-headless-sdk 0.56.0 → 0.57.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 +1258 -1258
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +21 -21
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +7 -7
- package/kotlin/doordeck-sdk.js +9034 -9034
- package/kotlin/kotlin-kotlin-stdlib.js +1117 -904
- package/kotlin/kotlinx-atomicfu.js +15 -15
- package/kotlin/kotlinx-coroutines-core.js +1672 -1642
- package/kotlin/kotlinx-io-kotlinx-io-core.js +431 -431
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1781 -1781
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1387 -1387
- package/kotlin/ktor-ktor-client-ktor-client-core.js +2012 -1885
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js +241 -241
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js +130 -130
- package/kotlin/ktor-ktor-http.js +699 -698
- package/kotlin/ktor-ktor-io.js +483 -458
- package/kotlin/ktor-ktor-shared-ktor-events.js +10 -10
- 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 +145 -145
- package/kotlin/ktor-ktor-shared-ktor-serialization.js +68 -68
- package/kotlin/ktor-ktor-shared-ktor-websockets.js +45 -45
- package/kotlin/ktor-ktor-utils.js +564 -543
- package/package.json +1 -1
- package/kotlin/ktor-ktor-client-ktor-client-js.js +0 -6
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
//region block: imports
|
|
4
4
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.p;
|
|
5
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
5
|
+
var protoOf = kotlin_kotlin.$_$.jb;
|
|
6
6
|
var initMetadataForClass = kotlin_kotlin.$_$.ia;
|
|
7
7
|
var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
|
|
8
8
|
var toList = kotlin_kotlin.$_$.k8;
|
|
9
9
|
var ConcurrentMap = kotlin_io_ktor_ktor_utils.$_$.c;
|
|
10
10
|
var KtMutableMap = kotlin_kotlin.$_$.s5;
|
|
11
11
|
var getKClass = kotlin_kotlin.$_$.f;
|
|
12
|
-
var arrayOf = kotlin_kotlin.$_$.
|
|
12
|
+
var arrayOf = kotlin_kotlin.$_$.kf;
|
|
13
13
|
var createKType = kotlin_kotlin.$_$.c;
|
|
14
14
|
var createInvariantKTypeProjection = kotlin_kotlin.$_$.a;
|
|
15
15
|
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.w4;
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
var parseAuthorizationHeaders = kotlin_io_ktor_ktor_http.$_$.k;
|
|
24
24
|
var flatten = kotlin_kotlin.$_$.a7;
|
|
25
25
|
var emptyList = kotlin_kotlin.$_$.s6;
|
|
26
|
-
var to = kotlin_kotlin.$_$.
|
|
26
|
+
var to = kotlin_kotlin.$_$.zf;
|
|
27
27
|
var first = kotlin_kotlin.$_$.z6;
|
|
28
28
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.y;
|
|
29
29
|
var CoroutineImpl = kotlin_kotlin.$_$.l9;
|
|
30
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
30
|
+
var THROW_CCE = kotlin_kotlin.$_$.we;
|
|
31
31
|
var OnRequestContext = kotlin_io_ktor_ktor_client_core.$_$.e;
|
|
32
32
|
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.o;
|
|
33
|
-
var toString = kotlin_kotlin.$_$.
|
|
33
|
+
var toString = kotlin_kotlin.$_$.nb;
|
|
34
34
|
var VOID = kotlin_kotlin.$_$.h;
|
|
35
35
|
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.v8;
|
|
36
36
|
var initMetadataForLambda = kotlin_kotlin.$_$.na;
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
var HashSet_init_$Create$ = kotlin_kotlin.$_$.w;
|
|
40
40
|
var initMetadataForCoroutine = kotlin_kotlin.$_$.ka;
|
|
41
41
|
var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.g;
|
|
42
|
-
var Unit = kotlin_kotlin.$_$.
|
|
42
|
+
var Unit = kotlin_kotlin.$_$.hf;
|
|
43
43
|
var createClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.i;
|
|
44
44
|
var KtList = kotlin_kotlin.$_$.n5;
|
|
45
45
|
var initMetadataForInterface = kotlin_kotlin.$_$.ma;
|
|
46
|
-
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
47
|
-
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.
|
|
48
|
-
var CompletableDeferred_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
46
|
+
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.r;
|
|
47
|
+
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.xf;
|
|
48
|
+
var CompletableDeferred_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q;
|
|
49
49
|
var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
|
|
50
50
|
var headers = kotlin_io_ktor_ktor_client_core.$_$.q;
|
|
51
51
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.y1;
|
|
@@ -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.t44();
|
|
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.s44(request, authHeader, $completion) : $super.s44.call(this, request, authHeader, $completion);
|
|
67
67
|
}
|
|
68
68
|
function refreshToken(response, $completion) {
|
|
69
69
|
return true;
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
initMetadataForCoroutine($loadTokenCOROUTINE$2, CoroutineImpl);
|
|
73
73
|
initMetadataForCoroutine($setTokenCOROUTINE$3, CoroutineImpl);
|
|
74
74
|
initMetadataForClass(AuthTokenHolder, 'AuthTokenHolder', VOID, VOID, VOID, [0, 1]);
|
|
75
|
-
initMetadataForLambda(BearerAuthConfig$
|
|
76
|
-
initMetadataForLambda(BearerAuthConfig$
|
|
75
|
+
initMetadataForLambda(BearerAuthConfig$refreshTokens$slambda, CoroutineImpl, VOID, [1]);
|
|
76
|
+
initMetadataForLambda(BearerAuthConfig$loadTokens$slambda, CoroutineImpl, VOID, [0]);
|
|
77
77
|
initMetadataForClass(BearerAuthConfig, 'BearerAuthConfig', BearerAuthConfig);
|
|
78
78
|
initMetadataForClass(RefreshTokensParams, 'RefreshTokensParams');
|
|
79
79
|
initMetadataForClass(BearerTokens, 'BearerTokens');
|
|
@@ -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.s41_1 = ArrayList_init_$Create$();
|
|
109
109
|
}
|
|
110
110
|
function AtomicCounter() {
|
|
111
|
-
this.
|
|
111
|
+
this.t41_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.h34_1.s41_1);
|
|
123
|
+
$this$createClientPlugin.g34_1.y2t_1.j27(get_AuthProvidersKey(), providers);
|
|
124
124
|
var tokenVersions = new ConcurrentMap();
|
|
125
125
|
// Inline function 'io.ktor.util.AttributeKey' call
|
|
126
126
|
var name = 'ProviderVersionAttributeKey';
|
|
@@ -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.o3m(Auth$lambda$slambda_0(providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
147
147
|
var tmp_2 = Send_instance;
|
|
148
|
-
$this$createClientPlugin.
|
|
148
|
+
$this$createClientPlugin.k34(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.v2u().o2j().x28(HttpHeaders_getInstance().n2i_1);
|
|
153
153
|
var tmp;
|
|
154
154
|
if (headerValues == null) {
|
|
155
155
|
tmp = null;
|
|
@@ -173,7 +173,7 @@
|
|
|
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().k2d('401 response ' + call.e2y().h2y().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;
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
while (_iterator__ex2g4s_1.q()) {
|
|
192
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.u41(element)) {
|
|
195
195
|
tmp$ret$4 = element_0;
|
|
196
196
|
break $l$block;
|
|
197
197
|
}
|
|
@@ -239,21 +239,21 @@
|
|
|
239
239
|
return LinkedHashMap_init_$Create$();
|
|
240
240
|
}
|
|
241
241
|
function Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
242
|
-
this.
|
|
243
|
-
this.
|
|
244
|
-
this.
|
|
242
|
+
this.h43_1 = $providers;
|
|
243
|
+
this.i43_1 = $tokenVersions;
|
|
244
|
+
this.j43_1 = $tokenVersionsAttributeKey;
|
|
245
245
|
CoroutineImpl.call(this, resultContinuation);
|
|
246
246
|
}
|
|
247
|
-
protoOf(Auth$lambda$slambda).
|
|
248
|
-
var tmp = this.
|
|
247
|
+
protoOf(Auth$lambda$slambda).b3n = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
248
|
+
var tmp = this.c3n($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
249
249
|
tmp.f9_1 = Unit_instance;
|
|
250
250
|
tmp.g9_1 = null;
|
|
251
251
|
return tmp.l9();
|
|
252
252
|
};
|
|
253
|
-
protoOf(Auth$lambda$slambda).
|
|
253
|
+
protoOf(Auth$lambda$slambda).d3n = function (p1, p2, p3, $completion) {
|
|
254
254
|
var tmp = p1 instanceof OnRequestContext ? p1 : THROW_CCE();
|
|
255
255
|
var tmp_0 = p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE();
|
|
256
|
-
return this.
|
|
256
|
+
return this.b3n(tmp, tmp_0, !(p3 == null) ? p3 : THROW_CCE(), $completion);
|
|
257
257
|
};
|
|
258
258
|
protoOf(Auth$lambda$slambda).l9 = function () {
|
|
259
259
|
var suspendResult = this.f9_1;
|
|
@@ -264,42 +264,42 @@
|
|
|
264
264
|
case 0:
|
|
265
265
|
this.e9_1 = 4;
|
|
266
266
|
var tmp_0 = this;
|
|
267
|
-
var tmp0 = this.
|
|
267
|
+
var tmp0 = this.h43_1;
|
|
268
268
|
var destination = ArrayList_init_$Create$();
|
|
269
269
|
var _iterator__ex2g4s = tmp0.p();
|
|
270
270
|
while (_iterator__ex2g4s.q()) {
|
|
271
271
|
var element = _iterator__ex2g4s.r();
|
|
272
|
-
if (element.
|
|
272
|
+
if (element.v43(this.l43_1)) {
|
|
273
273
|
destination.k(element);
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
tmp_0.
|
|
278
|
-
this.
|
|
279
|
-
this.
|
|
277
|
+
tmp_0.n43_1 = destination;
|
|
278
|
+
this.o43_1 = this.n43_1;
|
|
279
|
+
this.p43_1 = this.o43_1.p();
|
|
280
280
|
this.d9_1 = 1;
|
|
281
281
|
continue $sm;
|
|
282
282
|
case 1:
|
|
283
|
-
if (!this.
|
|
283
|
+
if (!this.p43_1.q()) {
|
|
284
284
|
this.d9_1 = 3;
|
|
285
285
|
continue $sm;
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
this.
|
|
288
|
+
this.q43_1 = this.p43_1.r();
|
|
289
289
|
var tmp_1 = this;
|
|
290
|
-
tmp_1.
|
|
291
|
-
this.
|
|
292
|
-
get_LOGGER().
|
|
290
|
+
tmp_1.r43_1 = this.q43_1;
|
|
291
|
+
this.s43_1 = this.r43_1;
|
|
292
|
+
get_LOGGER().k2d('Adding auth headers for ' + this.l43_1.v2v_1.toString() + ' from provider ' + toString(this.s43_1));
|
|
293
293
|
var tmp_2 = this;
|
|
294
|
-
tmp_2.
|
|
294
|
+
tmp_2.t43_1 = this.i43_1.c2d(this.s43_1, Auth$lambda$slambda$lambda);
|
|
295
295
|
var tmp_3 = this;
|
|
296
|
-
tmp_3.
|
|
297
|
-
var tmp0_0 = this.
|
|
298
|
-
var tmp1 = this.
|
|
299
|
-
var value = this.
|
|
296
|
+
tmp_3.u43_1 = this.l43_1.a2w_1.l27(this.j43_1, Auth$lambda$slambda$lambda_0);
|
|
297
|
+
var tmp0_0 = this.u43_1;
|
|
298
|
+
var tmp1 = this.s43_1;
|
|
299
|
+
var value = this.t43_1.t41_1.kotlinx$atomicfu$value;
|
|
300
300
|
tmp0_0.n2(tmp1, value);
|
|
301
301
|
this.d9_1 = 2;
|
|
302
|
-
suspendResult = this.
|
|
302
|
+
suspendResult = this.s43_1.w43(this.l43_1, VOID, this);
|
|
303
303
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
304
304
|
return suspendResult;
|
|
305
305
|
}
|
|
@@ -324,36 +324,36 @@
|
|
|
324
324
|
}
|
|
325
325
|
while (true);
|
|
326
326
|
};
|
|
327
|
-
protoOf(Auth$lambda$slambda).
|
|
328
|
-
var i = new Auth$lambda$slambda(this.
|
|
329
|
-
i.
|
|
330
|
-
i.
|
|
331
|
-
i.
|
|
327
|
+
protoOf(Auth$lambda$slambda).c3n = function ($this$onRequest, request, _unused_var__etf5q3, completion) {
|
|
328
|
+
var i = new Auth$lambda$slambda(this.h43_1, this.i43_1, this.j43_1, completion);
|
|
329
|
+
i.k43_1 = $this$onRequest;
|
|
330
|
+
i.l43_1 = request;
|
|
331
|
+
i.m43_1 = _unused_var__etf5q3;
|
|
332
332
|
return i;
|
|
333
333
|
};
|
|
334
334
|
function Auth$lambda$slambda_0($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
335
335
|
var i = new Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
336
336
|
var l = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
337
|
-
return i.
|
|
337
|
+
return i.b3n($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
338
338
|
};
|
|
339
339
|
l.$arity = 3;
|
|
340
340
|
return l;
|
|
341
341
|
}
|
|
342
342
|
function Auth$lambda$slambda_1($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
343
|
-
this.
|
|
344
|
-
this.
|
|
345
|
-
this.
|
|
343
|
+
this.f44_1 = $providers;
|
|
344
|
+
this.g44_1 = $tokenVersions;
|
|
345
|
+
this.h44_1 = $tokenVersionsAttributeKey;
|
|
346
346
|
CoroutineImpl.call(this, resultContinuation);
|
|
347
347
|
}
|
|
348
|
-
protoOf(Auth$lambda$slambda_1).
|
|
349
|
-
var tmp = this.
|
|
348
|
+
protoOf(Auth$lambda$slambda_1).i3d = function ($this$on, originalRequest, $completion) {
|
|
349
|
+
var tmp = this.j3d($this$on, originalRequest, $completion);
|
|
350
350
|
tmp.f9_1 = Unit_instance;
|
|
351
351
|
tmp.g9_1 = null;
|
|
352
352
|
return tmp.l9();
|
|
353
353
|
};
|
|
354
354
|
protoOf(Auth$lambda$slambda_1).w9 = function (p1, p2, $completion) {
|
|
355
355
|
var tmp = p1 instanceof Sender ? p1 : THROW_CCE();
|
|
356
|
-
return this.
|
|
356
|
+
return this.i3d(tmp, p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE(), $completion);
|
|
357
357
|
};
|
|
358
358
|
protoOf(Auth$lambda$slambda_1).l9 = function () {
|
|
359
359
|
var suspendResult = this.f9_1;
|
|
@@ -364,56 +364,56 @@
|
|
|
364
364
|
case 0:
|
|
365
365
|
this.e9_1 = 7;
|
|
366
366
|
this.d9_1 = 1;
|
|
367
|
-
suspendResult = this.
|
|
367
|
+
suspendResult = this.i44_1.m3d(this.j44_1, this);
|
|
368
368
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
369
369
|
return suspendResult;
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
continue $sm;
|
|
373
373
|
case 1:
|
|
374
|
-
this.
|
|
375
|
-
if (!this.
|
|
376
|
-
return this.
|
|
377
|
-
if (this.
|
|
378
|
-
return this.
|
|
379
|
-
this.
|
|
380
|
-
this.
|
|
374
|
+
this.k44_1 = suspendResult;
|
|
375
|
+
if (!this.k44_1.v2u().i2y().equals(Companion_getInstance().b2l_1))
|
|
376
|
+
return this.k44_1;
|
|
377
|
+
if (this.k44_1.e2y().k2x().i27(get_AuthCircuitBreaker()))
|
|
378
|
+
return this.k44_1;
|
|
379
|
+
this.l44_1 = this.k44_1;
|
|
380
|
+
this.m44_1 = HashSet_init_$Create$(this.f44_1);
|
|
381
381
|
this.d9_1 = 2;
|
|
382
382
|
continue $sm;
|
|
383
383
|
case 2:
|
|
384
|
-
if (!this.
|
|
384
|
+
if (!this.l44_1.v2u().i2y().equals(Companion_getInstance().b2l_1)) {
|
|
385
385
|
this.d9_1 = 6;
|
|
386
386
|
continue $sm;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
-
get_LOGGER().
|
|
389
|
+
get_LOGGER().k2d('Received 401 for ' + this.l44_1.e2y().h2y().toString());
|
|
390
390
|
var tmp_0 = this;
|
|
391
|
-
var tmp0_elvis_lhs = invoke$findProvider(this.
|
|
391
|
+
var tmp0_elvis_lhs = invoke$findProvider(this.l44_1, this.m44_1);
|
|
392
392
|
var tmp_1;
|
|
393
393
|
if (tmp0_elvis_lhs == null) {
|
|
394
|
-
this.
|
|
395
|
-
get_LOGGER().
|
|
396
|
-
return this.
|
|
394
|
+
this.i44_1;
|
|
395
|
+
get_LOGGER().k2d('Can not find auth provider for ' + this.l44_1.e2y().h2y().toString());
|
|
396
|
+
return this.l44_1;
|
|
397
397
|
} else {
|
|
398
398
|
tmp_1 = tmp0_elvis_lhs;
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
-
tmp_0.
|
|
402
|
-
this.
|
|
403
|
-
this.
|
|
404
|
-
get_LOGGER().
|
|
405
|
-
this.
|
|
401
|
+
tmp_0.n44_1 = tmp_1;
|
|
402
|
+
this.o44_1 = this.n44_1.hg();
|
|
403
|
+
this.p44_1 = this.n44_1.ig();
|
|
404
|
+
get_LOGGER().k2d('Using provider ' + toString(this.o44_1) + ' for ' + this.l44_1.e2y().h2y().toString());
|
|
405
|
+
this.m44_1.d2(this.o44_1);
|
|
406
406
|
this.d9_1 = 3;
|
|
407
|
-
suspendResult = invoke$refreshTokenIfNeeded(this.
|
|
407
|
+
suspendResult = invoke$refreshTokenIfNeeded(this.g44_1, this.h44_1, this.l44_1, this.o44_1, this.j44_1, this);
|
|
408
408
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
409
409
|
return suspendResult;
|
|
410
410
|
}
|
|
411
411
|
|
|
412
412
|
continue $sm;
|
|
413
413
|
case 3:
|
|
414
|
-
this.
|
|
415
|
-
if (!this.
|
|
416
|
-
return this.
|
|
414
|
+
this.q44_1 = suspendResult;
|
|
415
|
+
if (!this.q44_1) {
|
|
416
|
+
return this.l44_1;
|
|
417
417
|
} else {
|
|
418
418
|
this.d9_1 = 4;
|
|
419
419
|
continue $sm;
|
|
@@ -421,18 +421,18 @@
|
|
|
421
421
|
|
|
422
422
|
case 4:
|
|
423
423
|
this.d9_1 = 5;
|
|
424
|
-
suspendResult = invoke$executeWithNewToken(this.
|
|
424
|
+
suspendResult = invoke$executeWithNewToken(this.i44_1, this.l44_1, this.o44_1, this.j44_1, this.p44_1, this);
|
|
425
425
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
426
426
|
return suspendResult;
|
|
427
427
|
}
|
|
428
428
|
|
|
429
429
|
continue $sm;
|
|
430
430
|
case 5:
|
|
431
|
-
this.
|
|
431
|
+
this.l44_1 = suspendResult;
|
|
432
432
|
this.d9_1 = 2;
|
|
433
433
|
continue $sm;
|
|
434
434
|
case 6:
|
|
435
|
-
return this.
|
|
435
|
+
return this.l44_1;
|
|
436
436
|
case 7:
|
|
437
437
|
throw this.g9_1;
|
|
438
438
|
}
|
|
@@ -447,16 +447,16 @@
|
|
|
447
447
|
}
|
|
448
448
|
while (true);
|
|
449
449
|
};
|
|
450
|
-
protoOf(Auth$lambda$slambda_1).
|
|
451
|
-
var i = new Auth$lambda$slambda_1(this.
|
|
452
|
-
i.
|
|
453
|
-
i.
|
|
450
|
+
protoOf(Auth$lambda$slambda_1).j3d = function ($this$on, originalRequest, completion) {
|
|
451
|
+
var i = new Auth$lambda$slambda_1(this.f44_1, this.g44_1, this.h44_1, completion);
|
|
452
|
+
i.i44_1 = $this$on;
|
|
453
|
+
i.j44_1 = originalRequest;
|
|
454
454
|
return i;
|
|
455
455
|
};
|
|
456
456
|
function Auth$lambda$slambda_2($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
457
457
|
var i = new Auth$lambda$slambda_1($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
458
458
|
var l = function ($this$on, originalRequest, $completion) {
|
|
459
|
-
return i.
|
|
459
|
+
return i.i3d($this$on, originalRequest, $completion);
|
|
460
460
|
};
|
|
461
461
|
l.$arity = 2;
|
|
462
462
|
return l;
|
|
@@ -472,11 +472,11 @@
|
|
|
472
472
|
}
|
|
473
473
|
function $invoke$refreshTokenIfNeededCOROUTINE$0(tokenVersions, tokenVersionsAttributeKey, call, provider, request, resultContinuation) {
|
|
474
474
|
CoroutineImpl.call(this, resultContinuation);
|
|
475
|
-
this.
|
|
476
|
-
this.
|
|
477
|
-
this.
|
|
478
|
-
this.
|
|
479
|
-
this.
|
|
475
|
+
this.d42_1 = tokenVersions;
|
|
476
|
+
this.e42_1 = tokenVersionsAttributeKey;
|
|
477
|
+
this.f42_1 = call;
|
|
478
|
+
this.g42_1 = provider;
|
|
479
|
+
this.h42_1 = request;
|
|
480
480
|
}
|
|
481
481
|
protoOf($invoke$refreshTokenIfNeededCOROUTINE$0).l9 = function () {
|
|
482
482
|
var suspendResult = this.f9_1;
|
|
@@ -487,14 +487,14 @@
|
|
|
487
487
|
case 0:
|
|
488
488
|
this.e9_1 = 4;
|
|
489
489
|
var tmp_0 = this;
|
|
490
|
-
tmp_0.
|
|
490
|
+
tmp_0.i42_1 = this.d42_1.c2d(this.g42_1, Auth$lambda$refreshTokenIfNeeded$lambda);
|
|
491
491
|
var tmp_1 = this;
|
|
492
|
-
tmp_1.
|
|
493
|
-
this.
|
|
494
|
-
if (!(this.
|
|
495
|
-
get_LOGGER().
|
|
492
|
+
tmp_1.j42_1 = this.h42_1.a2w_1.l27(this.e42_1, Auth$lambda$refreshTokenIfNeeded$lambda_0);
|
|
493
|
+
this.k42_1 = this.j42_1.k2(this.g42_1);
|
|
494
|
+
if (!(this.k42_1 == null) && this.k42_1 >= this.i42_1.t41_1.kotlinx$atomicfu$value) {
|
|
495
|
+
get_LOGGER().k2d('Refreshing token for ' + this.f42_1.e2y().h2y().toString());
|
|
496
496
|
this.d9_1 = 1;
|
|
497
|
-
suspendResult = this.
|
|
497
|
+
suspendResult = this.g42_1.r44(this.f42_1.v2u(), this);
|
|
498
498
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
499
499
|
return suspendResult;
|
|
500
500
|
}
|
|
@@ -507,12 +507,12 @@
|
|
|
507
507
|
case 1:
|
|
508
508
|
var ARGUMENT = suspendResult;
|
|
509
509
|
if (!ARGUMENT) {
|
|
510
|
-
get_LOGGER().
|
|
510
|
+
get_LOGGER().k2d('Refreshing token failed for ' + this.f42_1.e2y().h2y().toString());
|
|
511
511
|
return false;
|
|
512
512
|
} else {
|
|
513
|
-
var tmp0 = this.
|
|
514
|
-
var tmp1 = this.
|
|
515
|
-
var value = this.
|
|
513
|
+
var tmp0 = this.j42_1;
|
|
514
|
+
var tmp1 = this.g42_1;
|
|
515
|
+
var value = this.i42_1.t41_1.atomicfu$incrementAndGet();
|
|
516
516
|
tmp0.n2(tmp1, value);
|
|
517
517
|
this.d9_1 = 2;
|
|
518
518
|
continue $sm;
|
|
@@ -539,11 +539,11 @@
|
|
|
539
539
|
};
|
|
540
540
|
function $invoke$executeWithNewTokenCOROUTINE$1(_this__u8e3s4, call, provider, oldRequest, authHeader, resultContinuation) {
|
|
541
541
|
CoroutineImpl.call(this, resultContinuation);
|
|
542
|
-
this.
|
|
543
|
-
this.
|
|
544
|
-
this.
|
|
545
|
-
this.
|
|
546
|
-
this.
|
|
542
|
+
this.t42_1 = _this__u8e3s4;
|
|
543
|
+
this.u42_1 = call;
|
|
544
|
+
this.v42_1 = provider;
|
|
545
|
+
this.w42_1 = oldRequest;
|
|
546
|
+
this.x42_1 = authHeader;
|
|
547
547
|
}
|
|
548
548
|
protoOf($invoke$executeWithNewTokenCOROUTINE$1).l9 = function () {
|
|
549
549
|
var suspendResult = this.f9_1;
|
|
@@ -553,20 +553,20 @@
|
|
|
553
553
|
switch (tmp) {
|
|
554
554
|
case 0:
|
|
555
555
|
this.e9_1 = 3;
|
|
556
|
-
this.
|
|
557
|
-
this.
|
|
556
|
+
this.y42_1 = new HttpRequestBuilder();
|
|
557
|
+
this.y42_1.t31(this.w42_1);
|
|
558
558
|
this.d9_1 = 1;
|
|
559
|
-
suspendResult = this.
|
|
559
|
+
suspendResult = this.v42_1.s44(this.y42_1, this.x42_1, this);
|
|
560
560
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
561
561
|
return suspendResult;
|
|
562
562
|
}
|
|
563
563
|
|
|
564
564
|
continue $sm;
|
|
565
565
|
case 1:
|
|
566
|
-
this.
|
|
567
|
-
get_LOGGER().
|
|
566
|
+
this.y42_1.a2w_1.j27(get_AuthCircuitBreaker(), Unit_instance);
|
|
567
|
+
get_LOGGER().k2d('Sending new request to ' + this.u42_1.e2y().h2y().toString());
|
|
568
568
|
this.d9_1 = 2;
|
|
569
|
-
suspendResult = this.
|
|
569
|
+
suspendResult = this.t42_1.m3d(this.y42_1, this);
|
|
570
570
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
571
571
|
return suspendResult;
|
|
572
572
|
}
|
|
@@ -643,7 +643,7 @@
|
|
|
643
643
|
}
|
|
644
644
|
function $loadTokenCOROUTINE$2(_this__u8e3s4, resultContinuation) {
|
|
645
645
|
CoroutineImpl.call(this, resultContinuation);
|
|
646
|
-
this.
|
|
646
|
+
this.c45_1 = _this__u8e3s4;
|
|
647
647
|
}
|
|
648
648
|
protoOf($loadTokenCOROUTINE$2).l9 = function () {
|
|
649
649
|
var suspendResult = this.f9_1;
|
|
@@ -653,20 +653,20 @@
|
|
|
653
653
|
switch (tmp) {
|
|
654
654
|
case 0:
|
|
655
655
|
this.e9_1 = 5;
|
|
656
|
-
this.
|
|
656
|
+
this.e45_1 = null;
|
|
657
657
|
$l$loop: while (true) {
|
|
658
|
-
this.
|
|
659
|
-
var tmp0_elvis_lhs = this.
|
|
658
|
+
this.d45_1 = this.c45_1.h45_1.kotlinx$atomicfu$value;
|
|
659
|
+
var tmp0_elvis_lhs = this.d45_1;
|
|
660
660
|
var newValue = tmp0_elvis_lhs == null ? CompletableDeferred() : tmp0_elvis_lhs;
|
|
661
|
-
if (this.
|
|
662
|
-
this.
|
|
661
|
+
if (this.c45_1.h45_1.atomicfu$compareAndSet(this.d45_1, newValue)) {
|
|
662
|
+
this.e45_1 = newValue;
|
|
663
663
|
break $l$loop;
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
666
|
|
|
667
|
-
if (!(this.
|
|
667
|
+
if (!(this.d45_1 == null)) {
|
|
668
668
|
this.d9_1 = 4;
|
|
669
|
-
suspendResult = this.
|
|
669
|
+
suspendResult = this.d45_1.hq(this);
|
|
670
670
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
671
671
|
return suspendResult;
|
|
672
672
|
}
|
|
@@ -679,7 +679,7 @@
|
|
|
679
679
|
case 1:
|
|
680
680
|
this.e9_1 = 3;
|
|
681
681
|
this.d9_1 = 2;
|
|
682
|
-
suspendResult = this.
|
|
682
|
+
suspendResult = this.c45_1.f45_1(this);
|
|
683
683
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
684
684
|
return suspendResult;
|
|
685
685
|
}
|
|
@@ -688,13 +688,13 @@
|
|
|
688
688
|
case 2:
|
|
689
689
|
var newTokens = suspendResult;
|
|
690
690
|
var tmp_0;
|
|
691
|
-
if (this.
|
|
691
|
+
if (this.e45_1 == null) {
|
|
692
692
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
693
693
|
} else {
|
|
694
|
-
tmp_0 = this.
|
|
694
|
+
tmp_0 = this.e45_1;
|
|
695
695
|
}
|
|
696
696
|
|
|
697
|
-
tmp_0.
|
|
697
|
+
tmp_0.fu(newTokens);
|
|
698
698
|
return newTokens;
|
|
699
699
|
case 3:
|
|
700
700
|
this.e9_1 = 5;
|
|
@@ -702,19 +702,19 @@
|
|
|
702
702
|
if (tmp_1 instanceof Error) {
|
|
703
703
|
var cause = this.g9_1;
|
|
704
704
|
var tmp_2;
|
|
705
|
-
if (this.
|
|
705
|
+
if (this.e45_1 == null) {
|
|
706
706
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
707
707
|
} else {
|
|
708
|
-
tmp_2 = this.
|
|
708
|
+
tmp_2 = this.e45_1;
|
|
709
709
|
}
|
|
710
|
-
tmp_2.
|
|
710
|
+
tmp_2.hu(cause);
|
|
711
711
|
var tmp_3;
|
|
712
|
-
if (this.
|
|
712
|
+
if (this.e45_1 == null) {
|
|
713
713
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
714
714
|
} else {
|
|
715
|
-
tmp_3 = this.
|
|
715
|
+
tmp_3 = this.e45_1;
|
|
716
716
|
}
|
|
717
|
-
this.
|
|
717
|
+
this.c45_1.h45_1.atomicfu$compareAndSet(tmp_3, null);
|
|
718
718
|
throw cause;
|
|
719
719
|
} else {
|
|
720
720
|
throw this.g9_1;
|
|
@@ -738,8 +738,8 @@
|
|
|
738
738
|
};
|
|
739
739
|
function $setTokenCOROUTINE$3(_this__u8e3s4, block, resultContinuation) {
|
|
740
740
|
CoroutineImpl.call(this, resultContinuation);
|
|
741
|
-
this.
|
|
742
|
-
this.
|
|
741
|
+
this.q45_1 = _this__u8e3s4;
|
|
742
|
+
this.r45_1 = block;
|
|
743
743
|
}
|
|
744
744
|
protoOf($setTokenCOROUTINE$3).l9 = function () {
|
|
745
745
|
var suspendResult = this.f9_1;
|
|
@@ -749,28 +749,28 @@
|
|
|
749
749
|
switch (tmp) {
|
|
750
750
|
case 0:
|
|
751
751
|
this.e9_1 = 5;
|
|
752
|
-
this.
|
|
752
|
+
this.t45_1 = null;
|
|
753
753
|
$l$loop: while (true) {
|
|
754
|
-
this.
|
|
755
|
-
var tmp0_elvis_lhs = this.
|
|
754
|
+
this.s45_1 = this.q45_1.g45_1.kotlinx$atomicfu$value;
|
|
755
|
+
var tmp0_elvis_lhs = this.s45_1;
|
|
756
756
|
var newValue = tmp0_elvis_lhs == null ? CompletableDeferred() : tmp0_elvis_lhs;
|
|
757
|
-
if (this.
|
|
758
|
-
this.
|
|
757
|
+
if (this.q45_1.g45_1.atomicfu$compareAndSet(this.s45_1, newValue)) {
|
|
758
|
+
this.t45_1 = newValue;
|
|
759
759
|
break $l$loop;
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
762
|
|
|
763
763
|
this.e9_1 = 4;
|
|
764
|
-
if (this.
|
|
764
|
+
if (this.s45_1 == null) {
|
|
765
765
|
this.d9_1 = 2;
|
|
766
|
-
suspendResult = this.
|
|
766
|
+
suspendResult = this.r45_1(this);
|
|
767
767
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
768
768
|
return suspendResult;
|
|
769
769
|
}
|
|
770
770
|
continue $sm;
|
|
771
771
|
} else {
|
|
772
772
|
this.d9_1 = 1;
|
|
773
|
-
suspendResult = this.
|
|
773
|
+
suspendResult = this.s45_1.hq(this);
|
|
774
774
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
775
775
|
return suspendResult;
|
|
776
776
|
}
|
|
@@ -778,26 +778,26 @@
|
|
|
778
778
|
}
|
|
779
779
|
|
|
780
780
|
case 1:
|
|
781
|
-
this.
|
|
781
|
+
this.u45_1 = suspendResult;
|
|
782
782
|
this.d9_1 = 3;
|
|
783
783
|
continue $sm;
|
|
784
784
|
case 2:
|
|
785
785
|
var newTokens = suspendResult;
|
|
786
786
|
var tmp_0;
|
|
787
|
-
if (this.
|
|
787
|
+
if (this.t45_1 == null) {
|
|
788
788
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
789
789
|
} else {
|
|
790
|
-
tmp_0 = this.
|
|
790
|
+
tmp_0 = this.t45_1;
|
|
791
791
|
}
|
|
792
792
|
|
|
793
|
-
tmp_0.
|
|
794
|
-
this.
|
|
795
|
-
this.
|
|
793
|
+
tmp_0.fu(newTokens);
|
|
794
|
+
this.q45_1.g45_1.kotlinx$atomicfu$value = null;
|
|
795
|
+
this.u45_1 = newTokens;
|
|
796
796
|
this.d9_1 = 3;
|
|
797
797
|
continue $sm;
|
|
798
798
|
case 3:
|
|
799
|
-
var newToken = this.
|
|
800
|
-
this.
|
|
799
|
+
var newToken = this.u45_1;
|
|
800
|
+
this.q45_1.h45_1.kotlinx$atomicfu$value = CompletableDeferred_0(newToken);
|
|
801
801
|
return newToken;
|
|
802
802
|
case 4:
|
|
803
803
|
this.e9_1 = 5;
|
|
@@ -805,19 +805,19 @@
|
|
|
805
805
|
if (tmp_1 instanceof Error) {
|
|
806
806
|
var cause = this.g9_1;
|
|
807
807
|
var tmp_2;
|
|
808
|
-
if (this.
|
|
808
|
+
if (this.t45_1 == null) {
|
|
809
809
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
810
810
|
} else {
|
|
811
|
-
tmp_2 = this.
|
|
811
|
+
tmp_2 = this.t45_1;
|
|
812
812
|
}
|
|
813
|
-
tmp_2.
|
|
813
|
+
tmp_2.hu(cause);
|
|
814
814
|
var tmp_3;
|
|
815
|
-
if (this.
|
|
815
|
+
if (this.t45_1 == null) {
|
|
816
816
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
817
817
|
} else {
|
|
818
|
-
tmp_3 = this.
|
|
818
|
+
tmp_3 = this.t45_1;
|
|
819
819
|
}
|
|
820
|
-
this.
|
|
820
|
+
this.q45_1.g45_1.atomicfu$compareAndSet(tmp_3, null);
|
|
821
821
|
throw cause;
|
|
822
822
|
} else {
|
|
823
823
|
throw this.g9_1;
|
|
@@ -838,17 +838,17 @@
|
|
|
838
838
|
while (true);
|
|
839
839
|
};
|
|
840
840
|
function AuthTokenHolder(loadTokens) {
|
|
841
|
-
this.
|
|
842
|
-
this.
|
|
843
|
-
this.
|
|
841
|
+
this.f45_1 = loadTokens;
|
|
842
|
+
this.g45_1 = atomic$ref$1(null);
|
|
843
|
+
this.h45_1 = atomic$ref$1(null);
|
|
844
844
|
}
|
|
845
|
-
protoOf(AuthTokenHolder).
|
|
845
|
+
protoOf(AuthTokenHolder).v45 = function ($completion) {
|
|
846
846
|
var tmp = new $loadTokenCOROUTINE$2(this, $completion);
|
|
847
847
|
tmp.f9_1 = Unit_instance;
|
|
848
848
|
tmp.g9_1 = null;
|
|
849
849
|
return tmp.l9();
|
|
850
850
|
};
|
|
851
|
-
protoOf(AuthTokenHolder).
|
|
851
|
+
protoOf(AuthTokenHolder).w45 = function (block, $completion) {
|
|
852
852
|
var tmp = new $setTokenCOROUTINE$3(this, block, $completion);
|
|
853
853
|
tmp.f9_1 = Unit_instance;
|
|
854
854
|
tmp.g9_1 = null;
|
|
@@ -860,21 +860,21 @@
|
|
|
860
860
|
block(this_0);
|
|
861
861
|
// Inline function 'kotlin.with' call
|
|
862
862
|
// Inline function 'io.ktor.client.plugins.auth.providers.bearer.<anonymous>' call
|
|
863
|
-
_this__u8e3s4.
|
|
863
|
+
_this__u8e3s4.s41_1.k(new BearerAuthProvider(this_0.x45_1, this_0.y45_1, this_0.z45_1, this_0.a46_1));
|
|
864
864
|
}
|
|
865
|
-
function BearerAuthConfig$
|
|
865
|
+
function BearerAuthConfig$refreshTokens$slambda(resultContinuation) {
|
|
866
866
|
CoroutineImpl.call(this, resultContinuation);
|
|
867
867
|
}
|
|
868
|
-
protoOf(BearerAuthConfig$
|
|
869
|
-
var tmp = this.
|
|
868
|
+
protoOf(BearerAuthConfig$refreshTokens$slambda).k46 = function (_this__u8e3s4, $completion) {
|
|
869
|
+
var tmp = this.l46(_this__u8e3s4, $completion);
|
|
870
870
|
tmp.f9_1 = Unit_instance;
|
|
871
871
|
tmp.g9_1 = null;
|
|
872
872
|
return tmp.l9();
|
|
873
873
|
};
|
|
874
|
-
protoOf(BearerAuthConfig$
|
|
875
|
-
return this.
|
|
874
|
+
protoOf(BearerAuthConfig$refreshTokens$slambda).v9 = function (p1, $completion) {
|
|
875
|
+
return this.k46(p1 instanceof RefreshTokensParams ? p1 : THROW_CCE(), $completion);
|
|
876
876
|
};
|
|
877
|
-
protoOf(BearerAuthConfig$
|
|
877
|
+
protoOf(BearerAuthConfig$refreshTokens$slambda).l9 = function () {
|
|
878
878
|
var suspendResult = this.f9_1;
|
|
879
879
|
$sm: do
|
|
880
880
|
try {
|
|
@@ -891,32 +891,32 @@
|
|
|
891
891
|
}
|
|
892
892
|
while (true);
|
|
893
893
|
};
|
|
894
|
-
protoOf(BearerAuthConfig$
|
|
895
|
-
var i = new BearerAuthConfig$
|
|
896
|
-
i.
|
|
894
|
+
protoOf(BearerAuthConfig$refreshTokens$slambda).l46 = function (_this__u8e3s4, completion) {
|
|
895
|
+
var i = new BearerAuthConfig$refreshTokens$slambda(completion);
|
|
896
|
+
i.j46_1 = _this__u8e3s4;
|
|
897
897
|
return i;
|
|
898
898
|
};
|
|
899
|
-
function BearerAuthConfig$
|
|
900
|
-
var i = new BearerAuthConfig$
|
|
899
|
+
function BearerAuthConfig$refreshTokens$slambda_0(resultContinuation) {
|
|
900
|
+
var i = new BearerAuthConfig$refreshTokens$slambda(resultContinuation);
|
|
901
901
|
var l = function (_this__u8e3s4, $completion) {
|
|
902
|
-
return i.
|
|
902
|
+
return i.k46(_this__u8e3s4, $completion);
|
|
903
903
|
};
|
|
904
904
|
l.$arity = 1;
|
|
905
905
|
return l;
|
|
906
906
|
}
|
|
907
|
-
function BearerAuthConfig$
|
|
907
|
+
function BearerAuthConfig$loadTokens$slambda(resultContinuation) {
|
|
908
908
|
CoroutineImpl.call(this, resultContinuation);
|
|
909
909
|
}
|
|
910
|
-
protoOf(BearerAuthConfig$
|
|
911
|
-
var tmp = this.
|
|
910
|
+
protoOf(BearerAuthConfig$loadTokens$slambda).u46 = function ($completion) {
|
|
911
|
+
var tmp = this.v46($completion);
|
|
912
912
|
tmp.f9_1 = Unit_instance;
|
|
913
913
|
tmp.g9_1 = null;
|
|
914
914
|
return tmp.l9();
|
|
915
915
|
};
|
|
916
|
-
protoOf(BearerAuthConfig$
|
|
917
|
-
return this.
|
|
916
|
+
protoOf(BearerAuthConfig$loadTokens$slambda).ab = function ($completion) {
|
|
917
|
+
return this.u46($completion);
|
|
918
918
|
};
|
|
919
|
-
protoOf(BearerAuthConfig$
|
|
919
|
+
protoOf(BearerAuthConfig$loadTokens$slambda).l9 = function () {
|
|
920
920
|
var suspendResult = this.f9_1;
|
|
921
921
|
$sm: do
|
|
922
922
|
try {
|
|
@@ -933,72 +933,72 @@
|
|
|
933
933
|
}
|
|
934
934
|
while (true);
|
|
935
935
|
};
|
|
936
|
-
protoOf(BearerAuthConfig$
|
|
937
|
-
return new BearerAuthConfig$
|
|
936
|
+
protoOf(BearerAuthConfig$loadTokens$slambda).v46 = function (completion) {
|
|
937
|
+
return new BearerAuthConfig$loadTokens$slambda(completion);
|
|
938
938
|
};
|
|
939
|
-
function BearerAuthConfig$
|
|
940
|
-
var i = new BearerAuthConfig$
|
|
939
|
+
function BearerAuthConfig$loadTokens$slambda_0(resultContinuation) {
|
|
940
|
+
var i = new BearerAuthConfig$loadTokens$slambda(resultContinuation);
|
|
941
941
|
var l = function ($completion) {
|
|
942
|
-
return i.
|
|
942
|
+
return i.u46($completion);
|
|
943
943
|
};
|
|
944
944
|
l.$arity = 0;
|
|
945
945
|
return l;
|
|
946
946
|
}
|
|
947
|
-
function BearerAuthConfig$
|
|
947
|
+
function BearerAuthConfig$sendWithoutRequest$lambda(it) {
|
|
948
948
|
return true;
|
|
949
949
|
}
|
|
950
950
|
function BearerAuthConfig() {
|
|
951
951
|
var tmp = this;
|
|
952
|
-
tmp.
|
|
952
|
+
tmp.x45_1 = BearerAuthConfig$refreshTokens$slambda_0(null);
|
|
953
953
|
var tmp_0 = this;
|
|
954
|
-
tmp_0.
|
|
954
|
+
tmp_0.y45_1 = BearerAuthConfig$loadTokens$slambda_0(null);
|
|
955
955
|
var tmp_1 = this;
|
|
956
|
-
tmp_1.
|
|
957
|
-
this.
|
|
956
|
+
tmp_1.z45_1 = BearerAuthConfig$sendWithoutRequest$lambda;
|
|
957
|
+
this.a46_1 = null;
|
|
958
958
|
}
|
|
959
|
-
protoOf(BearerAuthConfig).
|
|
960
|
-
this.
|
|
959
|
+
protoOf(BearerAuthConfig).w46 = function (block) {
|
|
960
|
+
this.x45_1 = block;
|
|
961
961
|
};
|
|
962
962
|
function RefreshTokensParams(client, response, oldTokens) {
|
|
963
|
-
this.
|
|
964
|
-
this.
|
|
965
|
-
this.
|
|
963
|
+
this.x46_1 = client;
|
|
964
|
+
this.y46_1 = response;
|
|
965
|
+
this.z46_1 = oldTokens;
|
|
966
966
|
}
|
|
967
|
-
protoOf(RefreshTokensParams).
|
|
968
|
-
_this__u8e3s4.
|
|
967
|
+
protoOf(RefreshTokensParams).a47 = function (_this__u8e3s4) {
|
|
968
|
+
_this__u8e3s4.a2w_1.j27(get_AuthCircuitBreaker(), Unit_instance);
|
|
969
969
|
};
|
|
970
970
|
function BearerTokens(accessToken, refreshToken) {
|
|
971
|
-
this.
|
|
972
|
-
this.
|
|
971
|
+
this.b47_1 = accessToken;
|
|
972
|
+
this.c47_1 = refreshToken;
|
|
973
973
|
}
|
|
974
974
|
function BearerAuthProvider$_init_$lambda_lcdiwf(it) {
|
|
975
975
|
return true;
|
|
976
976
|
}
|
|
977
977
|
function BearerAuthProvider$addRequestHeaders$lambda($token) {
|
|
978
978
|
return function ($this$headers) {
|
|
979
|
-
var tokenValue = 'Bearer ' + $token.
|
|
979
|
+
var tokenValue = 'Bearer ' + $token.b47_1;
|
|
980
980
|
var tmp;
|
|
981
|
-
if ($this$headers.
|
|
982
|
-
$this$headers.
|
|
981
|
+
if ($this$headers.f29(HttpHeaders_getInstance().u2f_1)) {
|
|
982
|
+
$this$headers.m29(HttpHeaders_getInstance().u2f_1);
|
|
983
983
|
tmp = Unit_instance;
|
|
984
984
|
}
|
|
985
|
-
$this$headers.
|
|
985
|
+
$this$headers.j29(HttpHeaders_getInstance().u2f_1, tokenValue);
|
|
986
986
|
return Unit_instance;
|
|
987
987
|
};
|
|
988
988
|
}
|
|
989
989
|
function BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation) {
|
|
990
|
-
this.
|
|
991
|
-
this.
|
|
990
|
+
this.l47_1 = this$0;
|
|
991
|
+
this.m47_1 = $response;
|
|
992
992
|
CoroutineImpl.call(this, resultContinuation);
|
|
993
993
|
}
|
|
994
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
995
|
-
var tmp = this.
|
|
994
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).r47 = function ($completion) {
|
|
995
|
+
var tmp = this.v46($completion);
|
|
996
996
|
tmp.f9_1 = Unit_instance;
|
|
997
997
|
tmp.g9_1 = null;
|
|
998
998
|
return tmp.l9();
|
|
999
999
|
};
|
|
1000
1000
|
protoOf(BearerAuthProvider$refreshToken$slambda).ab = function ($completion) {
|
|
1001
|
-
return this.
|
|
1001
|
+
return this.r47($completion);
|
|
1002
1002
|
};
|
|
1003
1003
|
protoOf(BearerAuthProvider$refreshToken$slambda).l9 = function () {
|
|
1004
1004
|
var suspendResult = this.f9_1;
|
|
@@ -1008,20 +1008,20 @@
|
|
|
1008
1008
|
switch (tmp) {
|
|
1009
1009
|
case 0:
|
|
1010
1010
|
this.e9_1 = 3;
|
|
1011
|
-
this.
|
|
1012
|
-
this.
|
|
1011
|
+
this.n47_1 = this.l47_1.s47_1;
|
|
1012
|
+
this.o47_1 = this.m47_1.e2z().q2u_1;
|
|
1013
1013
|
this.d9_1 = 1;
|
|
1014
|
-
suspendResult = this.
|
|
1014
|
+
suspendResult = this.l47_1.v47_1.v45(this);
|
|
1015
1015
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1016
1016
|
return suspendResult;
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
1019
1019
|
continue $sm;
|
|
1020
1020
|
case 1:
|
|
1021
|
-
this.
|
|
1022
|
-
this.
|
|
1021
|
+
this.p47_1 = suspendResult;
|
|
1022
|
+
this.q47_1 = new RefreshTokensParams(this.o47_1, this.m47_1, this.p47_1);
|
|
1023
1023
|
this.d9_1 = 2;
|
|
1024
|
-
suspendResult = this.
|
|
1024
|
+
suspendResult = this.n47_1(this.q47_1, this);
|
|
1025
1025
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1026
1026
|
return suspendResult;
|
|
1027
1027
|
}
|
|
@@ -1043,22 +1043,22 @@
|
|
|
1043
1043
|
}
|
|
1044
1044
|
while (true);
|
|
1045
1045
|
};
|
|
1046
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1047
|
-
return new BearerAuthProvider$refreshToken$slambda(this.
|
|
1046
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).v46 = function (completion) {
|
|
1047
|
+
return new BearerAuthProvider$refreshToken$slambda(this.l47_1, this.m47_1, completion);
|
|
1048
1048
|
};
|
|
1049
1049
|
function BearerAuthProvider$refreshToken$slambda_0(this$0, $response, resultContinuation) {
|
|
1050
1050
|
var i = new BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation);
|
|
1051
1051
|
var l = function ($completion) {
|
|
1052
|
-
return i.
|
|
1052
|
+
return i.r47($completion);
|
|
1053
1053
|
};
|
|
1054
1054
|
l.$arity = 0;
|
|
1055
1055
|
return l;
|
|
1056
1056
|
}
|
|
1057
1057
|
function $addRequestHeadersCOROUTINE$4(_this__u8e3s4, request, authHeader, resultContinuation) {
|
|
1058
1058
|
CoroutineImpl.call(this, resultContinuation);
|
|
1059
|
-
this.
|
|
1060
|
-
this.
|
|
1061
|
-
this.
|
|
1059
|
+
this.e48_1 = _this__u8e3s4;
|
|
1060
|
+
this.f48_1 = request;
|
|
1061
|
+
this.g48_1 = authHeader;
|
|
1062
1062
|
}
|
|
1063
1063
|
protoOf($addRequestHeadersCOROUTINE$4).l9 = function () {
|
|
1064
1064
|
var suspendResult = this.f9_1;
|
|
@@ -1069,7 +1069,7 @@
|
|
|
1069
1069
|
case 0:
|
|
1070
1070
|
this.e9_1 = 2;
|
|
1071
1071
|
this.d9_1 = 1;
|
|
1072
|
-
suspendResult = this.
|
|
1072
|
+
suspendResult = this.e48_1.v47_1.v45(this);
|
|
1073
1073
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1074
1074
|
return suspendResult;
|
|
1075
1075
|
}
|
|
@@ -1085,7 +1085,7 @@
|
|
|
1085
1085
|
}
|
|
1086
1086
|
|
|
1087
1087
|
var token = tmp_0;
|
|
1088
|
-
headers(this.
|
|
1088
|
+
headers(this.f48_1, BearerAuthProvider$addRequestHeaders$lambda(token));
|
|
1089
1089
|
return Unit_instance;
|
|
1090
1090
|
case 2:
|
|
1091
1091
|
throw this.g9_1;
|
|
@@ -1103,8 +1103,8 @@
|
|
|
1103
1103
|
};
|
|
1104
1104
|
function $refreshTokenCOROUTINE$5(_this__u8e3s4, response, resultContinuation) {
|
|
1105
1105
|
CoroutineImpl.call(this, resultContinuation);
|
|
1106
|
-
this.
|
|
1107
|
-
this.
|
|
1106
|
+
this.p48_1 = _this__u8e3s4;
|
|
1107
|
+
this.q48_1 = response;
|
|
1108
1108
|
}
|
|
1109
1109
|
protoOf($refreshTokenCOROUTINE$5).l9 = function () {
|
|
1110
1110
|
var suspendResult = this.f9_1;
|
|
@@ -1115,7 +1115,7 @@
|
|
|
1115
1115
|
case 0:
|
|
1116
1116
|
this.e9_1 = 2;
|
|
1117
1117
|
this.d9_1 = 1;
|
|
1118
|
-
suspendResult = this.
|
|
1118
|
+
suspendResult = this.p48_1.v47_1.w45(BearerAuthProvider$refreshToken$slambda_0(this.p48_1, this.q48_1, null), this);
|
|
1119
1119
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1120
1120
|
return suspendResult;
|
|
1121
1121
|
}
|
|
@@ -1146,53 +1146,53 @@
|
|
|
1146
1146
|
tmp = sendWithoutRequestCallback;
|
|
1147
1147
|
}
|
|
1148
1148
|
sendWithoutRequestCallback = tmp;
|
|
1149
|
-
this.
|
|
1150
|
-
this.
|
|
1151
|
-
this.
|
|
1152
|
-
this.
|
|
1149
|
+
this.s47_1 = refreshTokens;
|
|
1150
|
+
this.t47_1 = sendWithoutRequestCallback;
|
|
1151
|
+
this.u47_1 = realm;
|
|
1152
|
+
this.v47_1 = new AuthTokenHolder(loadTokens);
|
|
1153
1153
|
}
|
|
1154
|
-
protoOf(BearerAuthProvider).
|
|
1154
|
+
protoOf(BearerAuthProvider).t44 = function () {
|
|
1155
1155
|
var message = 'Deprecated';
|
|
1156
1156
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1157
1157
|
};
|
|
1158
|
-
protoOf(BearerAuthProvider).
|
|
1159
|
-
return this.
|
|
1158
|
+
protoOf(BearerAuthProvider).v43 = function (request) {
|
|
1159
|
+
return this.t47_1(request);
|
|
1160
1160
|
};
|
|
1161
|
-
protoOf(BearerAuthProvider).
|
|
1162
|
-
if (!(auth.
|
|
1163
|
-
get_LOGGER().
|
|
1161
|
+
protoOf(BearerAuthProvider).u41 = function (auth) {
|
|
1162
|
+
if (!(auth.y2o_1 === 'Bearer')) {
|
|
1163
|
+
get_LOGGER().k2d('Bearer Auth Provider is not applicable for ' + auth.toString());
|
|
1164
1164
|
return false;
|
|
1165
1165
|
}
|
|
1166
1166
|
var tmp;
|
|
1167
|
-
if (this.
|
|
1167
|
+
if (this.u47_1 == null) {
|
|
1168
1168
|
tmp = true;
|
|
1169
1169
|
} else {
|
|
1170
1170
|
if (!(auth instanceof Parameterized)) {
|
|
1171
1171
|
tmp = false;
|
|
1172
1172
|
} else {
|
|
1173
|
-
tmp = auth.
|
|
1173
|
+
tmp = auth.g2f('realm') == this.u47_1;
|
|
1174
1174
|
}
|
|
1175
1175
|
}
|
|
1176
1176
|
var isSameRealm = tmp;
|
|
1177
1177
|
if (!isSameRealm) {
|
|
1178
|
-
get_LOGGER().
|
|
1178
|
+
get_LOGGER().k2d('Bearer Auth Provider is not applicable for this realm');
|
|
1179
1179
|
}
|
|
1180
1180
|
return isSameRealm;
|
|
1181
1181
|
};
|
|
1182
|
-
protoOf(BearerAuthProvider).
|
|
1182
|
+
protoOf(BearerAuthProvider).s44 = function (request, authHeader, $completion) {
|
|
1183
1183
|
var tmp = new $addRequestHeadersCOROUTINE$4(this, request, authHeader, $completion);
|
|
1184
1184
|
tmp.f9_1 = Unit_instance;
|
|
1185
1185
|
tmp.g9_1 = null;
|
|
1186
1186
|
return tmp.l9();
|
|
1187
1187
|
};
|
|
1188
|
-
protoOf(BearerAuthProvider).
|
|
1188
|
+
protoOf(BearerAuthProvider).r44 = function (response, $completion) {
|
|
1189
1189
|
var tmp = new $refreshTokenCOROUTINE$5(this, response, $completion);
|
|
1190
1190
|
tmp.f9_1 = Unit_instance;
|
|
1191
1191
|
tmp.g9_1 = null;
|
|
1192
1192
|
return tmp.l9();
|
|
1193
1193
|
};
|
|
1194
1194
|
//region block: post-declaration
|
|
1195
|
-
protoOf(BearerAuthProvider).
|
|
1195
|
+
protoOf(BearerAuthProvider).w43 = addRequestHeaders$default;
|
|
1196
1196
|
//endregion
|
|
1197
1197
|
//region block: exports
|
|
1198
1198
|
_.$_$ = _.$_$ || {};
|