@doordeck/doordeck-headless-sdk 0.50.0 → 0.52.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/README.md +6 -6
- package/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js +1323 -1323
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +35 -35
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +9 -9
- package/kotlin/doordeck-sdk.d.ts +2 -3
- package/kotlin/doordeck-sdk.js +12511 -12705
- package/kotlin/kotlin-kotlin-stdlib.js +1845 -2257
- package/kotlin/kotlinx-atomicfu.js +19 -19
- package/kotlin/kotlinx-coroutines-core.js +1923 -1923
- package/kotlin/kotlinx-io-kotlinx-io-core.js +454 -454
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1937 -1937
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1541 -1541
- package/kotlin/ktor-ktor-client-ktor-client-core.js +2846 -2847
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js +403 -400
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js +210 -210
- package/kotlin/ktor-ktor-http.js +814 -814
- package/kotlin/ktor-ktor-io.js +667 -667
- package/kotlin/ktor-ktor-shared-ktor-events.js +12 -12
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx-ktor-serialization-kotlinx-json.js +8 -8
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx.js +271 -271
- package/kotlin/ktor-ktor-shared-ktor-serialization.js +127 -127
- package/kotlin/ktor-ktor-shared-ktor-websockets.js +55 -55
- package/kotlin/ktor-ktor-utils.js +632 -632
- package/package.json +1 -1
- package/kotlin/Stately-stately-concurrency.js +0 -30
- package/kotlin/Stately-stately-concurrent-collections.js +0 -302
- package/kotlin/Stately-stately-strict.js +0 -10
- package/kotlin/projects-core-koin-core.js +0 -1147
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_atomicfu, kotlin_io_ktor_ktor_utils, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_http, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core) {
|
|
2
2
|
'use strict';
|
|
3
3
|
//region block: imports
|
|
4
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.
|
|
5
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
6
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
4
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.p;
|
|
5
|
+
var protoOf = kotlin_kotlin.$_$.ib;
|
|
6
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ia;
|
|
7
7
|
var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
|
|
8
|
-
var toList = kotlin_kotlin.$_$.
|
|
8
|
+
var toList = kotlin_kotlin.$_$.k8;
|
|
9
9
|
var ConcurrentMap = kotlin_io_ktor_ktor_utils.$_$.c;
|
|
10
|
-
var KtMutableMap = kotlin_kotlin.$_$.
|
|
10
|
+
var KtMutableMap = kotlin_kotlin.$_$.s5;
|
|
11
11
|
var getKClass = kotlin_kotlin.$_$.f;
|
|
12
|
-
var arrayOf = kotlin_kotlin.$_$.
|
|
12
|
+
var arrayOf = kotlin_kotlin.$_$.if;
|
|
13
13
|
var createKType = kotlin_kotlin.$_$.c;
|
|
14
14
|
var createInvariantKTypeProjection = kotlin_kotlin.$_$.a;
|
|
15
|
-
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.
|
|
15
|
+
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.w4;
|
|
16
16
|
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.k;
|
|
17
17
|
var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.m;
|
|
18
18
|
var Send_instance = kotlin_io_ktor_ktor_client_core.$_$.b;
|
|
19
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
19
|
+
var Unit_instance = kotlin_kotlin.$_$.g5;
|
|
20
20
|
var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.e;
|
|
21
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
22
|
-
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
21
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.b6;
|
|
22
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.o;
|
|
23
23
|
var parseAuthorizationHeaders = kotlin_io_ktor_ktor_http.$_$.k;
|
|
24
|
-
var flatten = kotlin_kotlin.$_$.
|
|
25
|
-
var emptyList = kotlin_kotlin.$_$.
|
|
26
|
-
var to = kotlin_kotlin.$_$.
|
|
27
|
-
var first = kotlin_kotlin.$_$.
|
|
28
|
-
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.
|
|
29
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
30
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
24
|
+
var flatten = kotlin_kotlin.$_$.a7;
|
|
25
|
+
var emptyList = kotlin_kotlin.$_$.s6;
|
|
26
|
+
var to = kotlin_kotlin.$_$.wf;
|
|
27
|
+
var first = kotlin_kotlin.$_$.z6;
|
|
28
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.y;
|
|
29
|
+
var CoroutineImpl = kotlin_kotlin.$_$.l9;
|
|
30
|
+
var THROW_CCE = kotlin_kotlin.$_$.ue;
|
|
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.$_$.mb;
|
|
34
34
|
var VOID = kotlin_kotlin.$_$.h;
|
|
35
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
36
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.
|
|
35
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.v8;
|
|
36
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.na;
|
|
37
37
|
var Sender = kotlin_io_ktor_ktor_client_core.$_$.f;
|
|
38
38
|
var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.h;
|
|
39
|
-
var HashSet_init_$Create$ = kotlin_kotlin.$_$.
|
|
40
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
39
|
+
var HashSet_init_$Create$ = kotlin_kotlin.$_$.w;
|
|
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.$_$.ff;
|
|
43
43
|
var createClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.i;
|
|
44
|
-
var KtList = kotlin_kotlin.$_$.
|
|
45
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
44
|
+
var KtList = kotlin_kotlin.$_$.n5;
|
|
45
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.ma;
|
|
46
46
|
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q;
|
|
47
|
-
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.
|
|
47
|
+
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.uf;
|
|
48
48
|
var CompletableDeferred_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p;
|
|
49
49
|
var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
|
|
50
50
|
var headers = kotlin_io_ktor_ktor_client_core.$_$.q;
|
|
51
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.
|
|
51
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.y1;
|
|
52
52
|
var Parameterized = kotlin_io_ktor_ktor_http.$_$.j;
|
|
53
53
|
//endregion
|
|
54
54
|
//region block: pre-declaration
|
|
@@ -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.u43();
|
|
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.t43(request, authHeader, $completion) : $super.t43.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.t40_1 = ArrayList_init_$Create$();
|
|
109
109
|
}
|
|
110
110
|
function AtomicCounter() {
|
|
111
|
-
this.
|
|
111
|
+
this.u40_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.y33_1.t40_1);
|
|
123
|
+
$this$createClientPlugin.x33_1.p2t_1.b27(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().fc(), 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.e3m(Auth$lambda$slambda_0(providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
147
147
|
var tmp_2 = Send_instance;
|
|
148
|
-
$this$createClientPlugin.
|
|
148
|
+
$this$createClientPlugin.b34(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.m2u().g2j().p28(HttpHeaders_getInstance().f2i_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().c2d('401 response ' + call.v2x().y2x().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.v40(element)) {
|
|
195
195
|
tmp$ret$4 = element_0;
|
|
196
196
|
break $l$block;
|
|
197
197
|
}
|
|
@@ -221,15 +221,15 @@
|
|
|
221
221
|
}
|
|
222
222
|
function invoke$refreshTokenIfNeeded(tokenVersions, tokenVersionsAttributeKey, call, provider, request, $completion) {
|
|
223
223
|
var tmp = new $invoke$refreshTokenIfNeededCOROUTINE$0(tokenVersions, tokenVersionsAttributeKey, call, provider, request, $completion);
|
|
224
|
-
tmp.
|
|
225
|
-
tmp.
|
|
226
|
-
return tmp.
|
|
224
|
+
tmp.f9_1 = Unit_instance;
|
|
225
|
+
tmp.g9_1 = null;
|
|
226
|
+
return tmp.l9();
|
|
227
227
|
}
|
|
228
228
|
function invoke$executeWithNewToken(_this__u8e3s4, call, provider, oldRequest, authHeader, $completion) {
|
|
229
229
|
var tmp = new $invoke$executeWithNewTokenCOROUTINE$1(_this__u8e3s4, call, provider, oldRequest, authHeader, $completion);
|
|
230
|
-
tmp.
|
|
231
|
-
tmp.
|
|
232
|
-
return tmp.
|
|
230
|
+
tmp.f9_1 = Unit_instance;
|
|
231
|
+
tmp.g9_1 = null;
|
|
232
|
+
return tmp.l9();
|
|
233
233
|
}
|
|
234
234
|
function Auth$lambda$slambda$lambda() {
|
|
235
235
|
return new AtomicCounter();
|
|
@@ -239,224 +239,224 @@
|
|
|
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.i42_1 = $providers;
|
|
243
|
+
this.j42_1 = $tokenVersions;
|
|
244
|
+
this.k42_1 = $tokenVersionsAttributeKey;
|
|
245
245
|
CoroutineImpl.call(this, resultContinuation);
|
|
246
246
|
}
|
|
247
|
-
protoOf(Auth$lambda$slambda).
|
|
248
|
-
var tmp = this.
|
|
249
|
-
tmp.
|
|
250
|
-
tmp.
|
|
251
|
-
return tmp.
|
|
247
|
+
protoOf(Auth$lambda$slambda).r3m = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
248
|
+
var tmp = this.s3m($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
249
|
+
tmp.f9_1 = Unit_instance;
|
|
250
|
+
tmp.g9_1 = null;
|
|
251
|
+
return tmp.l9();
|
|
252
252
|
};
|
|
253
|
-
protoOf(Auth$lambda$slambda).
|
|
253
|
+
protoOf(Auth$lambda$slambda).t3m = 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.r3m(tmp, tmp_0, !(p3 == null) ? p3 : THROW_CCE(), $completion);
|
|
257
257
|
};
|
|
258
|
-
protoOf(Auth$lambda$slambda).
|
|
259
|
-
var suspendResult = this.
|
|
258
|
+
protoOf(Auth$lambda$slambda).l9 = function () {
|
|
259
|
+
var suspendResult = this.f9_1;
|
|
260
260
|
$sm: do
|
|
261
261
|
try {
|
|
262
|
-
var tmp = this.
|
|
262
|
+
var tmp = this.d9_1;
|
|
263
263
|
switch (tmp) {
|
|
264
264
|
case 0:
|
|
265
|
-
this.
|
|
265
|
+
this.e9_1 = 4;
|
|
266
266
|
var tmp_0 = this;
|
|
267
|
-
var tmp0 = this.
|
|
267
|
+
var tmp0 = this.i42_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.w42(this.m42_1)) {
|
|
273
273
|
destination.k(element);
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
tmp_0.
|
|
278
|
-
this.
|
|
279
|
-
this.
|
|
280
|
-
this.
|
|
277
|
+
tmp_0.o42_1 = destination;
|
|
278
|
+
this.p42_1 = this.o42_1;
|
|
279
|
+
this.q42_1 = this.p42_1.p();
|
|
280
|
+
this.d9_1 = 1;
|
|
281
281
|
continue $sm;
|
|
282
282
|
case 1:
|
|
283
|
-
if (!this.
|
|
284
|
-
this.
|
|
283
|
+
if (!this.q42_1.q()) {
|
|
284
|
+
this.d9_1 = 3;
|
|
285
285
|
continue $sm;
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
this.
|
|
288
|
+
this.r42_1 = this.q42_1.r();
|
|
289
289
|
var tmp_1 = this;
|
|
290
|
-
tmp_1.
|
|
291
|
-
this.
|
|
292
|
-
get_LOGGER().
|
|
290
|
+
tmp_1.s42_1 = this.r42_1;
|
|
291
|
+
this.t42_1 = this.s42_1;
|
|
292
|
+
get_LOGGER().c2d('Adding auth headers for ' + this.m42_1.m2v_1.toString() + ' from provider ' + toString(this.t42_1));
|
|
293
293
|
var tmp_2 = this;
|
|
294
|
-
tmp_2.
|
|
294
|
+
tmp_2.u42_1 = this.j42_1.u2c(this.t42_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.v42_1 = this.m42_1.r2v_1.d27(this.k42_1, Auth$lambda$slambda$lambda_0);
|
|
297
|
+
var tmp0_0 = this.v42_1;
|
|
298
|
+
var tmp1 = this.t42_1;
|
|
299
|
+
var value = this.u42_1.u40_1.kotlinx$atomicfu$value;
|
|
300
300
|
tmp0_0.n2(tmp1, value);
|
|
301
|
-
this.
|
|
302
|
-
suspendResult = this.
|
|
301
|
+
this.d9_1 = 2;
|
|
302
|
+
suspendResult = this.t42_1.x42(this.m42_1, VOID, this);
|
|
303
303
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
304
304
|
return suspendResult;
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
continue $sm;
|
|
308
308
|
case 2:
|
|
309
|
-
this.
|
|
309
|
+
this.d9_1 = 1;
|
|
310
310
|
continue $sm;
|
|
311
311
|
case 3:
|
|
312
312
|
return Unit_instance;
|
|
313
313
|
case 4:
|
|
314
|
-
throw this.
|
|
314
|
+
throw this.g9_1;
|
|
315
315
|
}
|
|
316
316
|
} catch ($p) {
|
|
317
317
|
var e = $p;
|
|
318
|
-
if (this.
|
|
318
|
+
if (this.e9_1 === 4) {
|
|
319
319
|
throw e;
|
|
320
320
|
} else {
|
|
321
|
-
this.
|
|
322
|
-
this.
|
|
321
|
+
this.d9_1 = this.e9_1;
|
|
322
|
+
this.g9_1 = e;
|
|
323
323
|
}
|
|
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).s3m = function ($this$onRequest, request, _unused_var__etf5q3, completion) {
|
|
328
|
+
var i = new Auth$lambda$slambda(this.i42_1, this.j42_1, this.k42_1, completion);
|
|
329
|
+
i.l42_1 = $this$onRequest;
|
|
330
|
+
i.m42_1 = request;
|
|
331
|
+
i.n42_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.r3m($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.g43_1 = $providers;
|
|
344
|
+
this.h43_1 = $tokenVersions;
|
|
345
|
+
this.i43_1 = $tokenVersionsAttributeKey;
|
|
346
346
|
CoroutineImpl.call(this, resultContinuation);
|
|
347
347
|
}
|
|
348
|
-
protoOf(Auth$lambda$slambda_1).
|
|
349
|
-
var tmp = this.
|
|
350
|
-
tmp.
|
|
351
|
-
tmp.
|
|
352
|
-
return tmp.
|
|
348
|
+
protoOf(Auth$lambda$slambda_1).y3c = function ($this$on, originalRequest, $completion) {
|
|
349
|
+
var tmp = this.z3c($this$on, originalRequest, $completion);
|
|
350
|
+
tmp.f9_1 = Unit_instance;
|
|
351
|
+
tmp.g9_1 = null;
|
|
352
|
+
return tmp.l9();
|
|
353
353
|
};
|
|
354
|
-
protoOf(Auth$lambda$slambda_1).
|
|
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.y3c(tmp, p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE(), $completion);
|
|
357
357
|
};
|
|
358
|
-
protoOf(Auth$lambda$slambda_1).
|
|
359
|
-
var suspendResult = this.
|
|
358
|
+
protoOf(Auth$lambda$slambda_1).l9 = function () {
|
|
359
|
+
var suspendResult = this.f9_1;
|
|
360
360
|
$sm: do
|
|
361
361
|
try {
|
|
362
|
-
var tmp = this.
|
|
362
|
+
var tmp = this.d9_1;
|
|
363
363
|
switch (tmp) {
|
|
364
364
|
case 0:
|
|
365
|
-
this.
|
|
366
|
-
this.
|
|
367
|
-
suspendResult = this.
|
|
365
|
+
this.e9_1 = 7;
|
|
366
|
+
this.d9_1 = 1;
|
|
367
|
+
suspendResult = this.j43_1.c3d(this.k43_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.
|
|
381
|
-
this.
|
|
374
|
+
this.l43_1 = suspendResult;
|
|
375
|
+
if (!this.l43_1.m2u().z2x().equals(Companion_getInstance().t2k_1))
|
|
376
|
+
return this.l43_1;
|
|
377
|
+
if (this.l43_1.v2x().b2x().a27(get_AuthCircuitBreaker()))
|
|
378
|
+
return this.l43_1;
|
|
379
|
+
this.m43_1 = this.l43_1;
|
|
380
|
+
this.n43_1 = HashSet_init_$Create$(this.g43_1);
|
|
381
|
+
this.d9_1 = 2;
|
|
382
382
|
continue $sm;
|
|
383
383
|
case 2:
|
|
384
|
-
if (!this.
|
|
385
|
-
this.
|
|
384
|
+
if (!this.m43_1.m2u().z2x().equals(Companion_getInstance().t2k_1)) {
|
|
385
|
+
this.d9_1 = 6;
|
|
386
386
|
continue $sm;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
-
get_LOGGER().
|
|
389
|
+
get_LOGGER().c2d('Received 401 for ' + this.m43_1.v2x().y2x().toString());
|
|
390
390
|
var tmp_0 = this;
|
|
391
|
-
var tmp0_elvis_lhs = invoke$findProvider(this.
|
|
391
|
+
var tmp0_elvis_lhs = invoke$findProvider(this.m43_1, this.n43_1);
|
|
392
392
|
var tmp_1;
|
|
393
393
|
if (tmp0_elvis_lhs == null) {
|
|
394
|
-
this.
|
|
395
|
-
get_LOGGER().
|
|
396
|
-
return this.
|
|
394
|
+
this.j43_1;
|
|
395
|
+
get_LOGGER().c2d('Can not find auth provider for ' + this.m43_1.v2x().y2x().toString());
|
|
396
|
+
return this.m43_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.
|
|
406
|
-
this.
|
|
407
|
-
suspendResult = invoke$refreshTokenIfNeeded(this.
|
|
401
|
+
tmp_0.o43_1 = tmp_1;
|
|
402
|
+
this.p43_1 = this.o43_1.cg();
|
|
403
|
+
this.q43_1 = this.o43_1.dg();
|
|
404
|
+
get_LOGGER().c2d('Using provider ' + toString(this.p43_1) + ' for ' + this.m43_1.v2x().y2x().toString());
|
|
405
|
+
this.n43_1.d2(this.p43_1);
|
|
406
|
+
this.d9_1 = 3;
|
|
407
|
+
suspendResult = invoke$refreshTokenIfNeeded(this.h43_1, this.i43_1, this.m43_1, this.p43_1, this.k43_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.r43_1 = suspendResult;
|
|
415
|
+
if (!this.r43_1) {
|
|
416
|
+
return this.m43_1;
|
|
417
417
|
} else {
|
|
418
|
-
this.
|
|
418
|
+
this.d9_1 = 4;
|
|
419
419
|
continue $sm;
|
|
420
420
|
}
|
|
421
421
|
|
|
422
422
|
case 4:
|
|
423
|
-
this.
|
|
424
|
-
suspendResult = invoke$executeWithNewToken(this.
|
|
423
|
+
this.d9_1 = 5;
|
|
424
|
+
suspendResult = invoke$executeWithNewToken(this.j43_1, this.m43_1, this.p43_1, this.k43_1, this.q43_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.
|
|
432
|
-
this.
|
|
431
|
+
this.m43_1 = suspendResult;
|
|
432
|
+
this.d9_1 = 2;
|
|
433
433
|
continue $sm;
|
|
434
434
|
case 6:
|
|
435
|
-
return this.
|
|
435
|
+
return this.m43_1;
|
|
436
436
|
case 7:
|
|
437
|
-
throw this.
|
|
437
|
+
throw this.g9_1;
|
|
438
438
|
}
|
|
439
439
|
} catch ($p) {
|
|
440
440
|
var e = $p;
|
|
441
|
-
if (this.
|
|
441
|
+
if (this.e9_1 === 7) {
|
|
442
442
|
throw e;
|
|
443
443
|
} else {
|
|
444
|
-
this.
|
|
445
|
-
this.
|
|
444
|
+
this.d9_1 = this.e9_1;
|
|
445
|
+
this.g9_1 = e;
|
|
446
446
|
}
|
|
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).z3c = function ($this$on, originalRequest, completion) {
|
|
451
|
+
var i = new Auth$lambda$slambda_1(this.g43_1, this.h43_1, this.i43_1, completion);
|
|
452
|
+
i.j43_1 = $this$on;
|
|
453
|
+
i.k43_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.y3c($this$on, originalRequest, $completion);
|
|
460
460
|
};
|
|
461
461
|
l.$arity = 2;
|
|
462
462
|
return l;
|
|
@@ -472,101 +472,101 @@
|
|
|
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.e41_1 = tokenVersions;
|
|
476
|
+
this.f41_1 = tokenVersionsAttributeKey;
|
|
477
|
+
this.g41_1 = call;
|
|
478
|
+
this.h41_1 = provider;
|
|
479
|
+
this.i41_1 = request;
|
|
480
480
|
}
|
|
481
|
-
protoOf($invoke$refreshTokenIfNeededCOROUTINE$0).
|
|
482
|
-
var suspendResult = this.
|
|
481
|
+
protoOf($invoke$refreshTokenIfNeededCOROUTINE$0).l9 = function () {
|
|
482
|
+
var suspendResult = this.f9_1;
|
|
483
483
|
$sm: do
|
|
484
484
|
try {
|
|
485
|
-
var tmp = this.
|
|
485
|
+
var tmp = this.d9_1;
|
|
486
486
|
switch (tmp) {
|
|
487
487
|
case 0:
|
|
488
|
-
this.
|
|
488
|
+
this.e9_1 = 4;
|
|
489
489
|
var tmp_0 = this;
|
|
490
|
-
tmp_0.
|
|
490
|
+
tmp_0.j41_1 = this.e41_1.u2c(this.h41_1, Auth$lambda$refreshTokenIfNeeded$lambda);
|
|
491
491
|
var tmp_1 = this;
|
|
492
|
-
tmp_1.
|
|
493
|
-
this.
|
|
494
|
-
if (!(this.
|
|
495
|
-
get_LOGGER().
|
|
496
|
-
this.
|
|
497
|
-
suspendResult = this.
|
|
492
|
+
tmp_1.k41_1 = this.i41_1.r2v_1.d27(this.f41_1, Auth$lambda$refreshTokenIfNeeded$lambda_0);
|
|
493
|
+
this.l41_1 = this.k41_1.k2(this.h41_1);
|
|
494
|
+
if (!(this.l41_1 == null) && this.l41_1 >= this.j41_1.u40_1.kotlinx$atomicfu$value) {
|
|
495
|
+
get_LOGGER().c2d('Refreshing token for ' + this.g41_1.v2x().y2x().toString());
|
|
496
|
+
this.d9_1 = 1;
|
|
497
|
+
suspendResult = this.h41_1.s43(this.g41_1.m2u(), this);
|
|
498
498
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
499
499
|
return suspendResult;
|
|
500
500
|
}
|
|
501
501
|
continue $sm;
|
|
502
502
|
} else {
|
|
503
|
-
this.
|
|
503
|
+
this.d9_1 = 3;
|
|
504
504
|
continue $sm;
|
|
505
505
|
}
|
|
506
506
|
|
|
507
507
|
case 1:
|
|
508
508
|
var ARGUMENT = suspendResult;
|
|
509
509
|
if (!ARGUMENT) {
|
|
510
|
-
get_LOGGER().
|
|
510
|
+
get_LOGGER().c2d('Refreshing token failed for ' + this.g41_1.v2x().y2x().toString());
|
|
511
511
|
return false;
|
|
512
512
|
} else {
|
|
513
|
-
var tmp0 = this.
|
|
514
|
-
var tmp1 = this.
|
|
515
|
-
var value = this.
|
|
513
|
+
var tmp0 = this.k41_1;
|
|
514
|
+
var tmp1 = this.h41_1;
|
|
515
|
+
var value = this.j41_1.u40_1.atomicfu$incrementAndGet();
|
|
516
516
|
tmp0.n2(tmp1, value);
|
|
517
|
-
this.
|
|
517
|
+
this.d9_1 = 2;
|
|
518
518
|
continue $sm;
|
|
519
519
|
}
|
|
520
520
|
|
|
521
521
|
case 2:
|
|
522
|
-
this.
|
|
522
|
+
this.d9_1 = 3;
|
|
523
523
|
continue $sm;
|
|
524
524
|
case 3:
|
|
525
525
|
return true;
|
|
526
526
|
case 4:
|
|
527
|
-
throw this.
|
|
527
|
+
throw this.g9_1;
|
|
528
528
|
}
|
|
529
529
|
} catch ($p) {
|
|
530
530
|
var e = $p;
|
|
531
|
-
if (this.
|
|
531
|
+
if (this.e9_1 === 4) {
|
|
532
532
|
throw e;
|
|
533
533
|
} else {
|
|
534
|
-
this.
|
|
535
|
-
this.
|
|
534
|
+
this.d9_1 = this.e9_1;
|
|
535
|
+
this.g9_1 = e;
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
while (true);
|
|
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.u41_1 = _this__u8e3s4;
|
|
543
|
+
this.v41_1 = call;
|
|
544
|
+
this.w41_1 = provider;
|
|
545
|
+
this.x41_1 = oldRequest;
|
|
546
|
+
this.y41_1 = authHeader;
|
|
547
547
|
}
|
|
548
|
-
protoOf($invoke$executeWithNewTokenCOROUTINE$1).
|
|
549
|
-
var suspendResult = this.
|
|
548
|
+
protoOf($invoke$executeWithNewTokenCOROUTINE$1).l9 = function () {
|
|
549
|
+
var suspendResult = this.f9_1;
|
|
550
550
|
$sm: do
|
|
551
551
|
try {
|
|
552
|
-
var tmp = this.
|
|
552
|
+
var tmp = this.d9_1;
|
|
553
553
|
switch (tmp) {
|
|
554
554
|
case 0:
|
|
555
|
-
this.
|
|
556
|
-
this.
|
|
557
|
-
this.
|
|
558
|
-
this.
|
|
559
|
-
suspendResult = this.
|
|
555
|
+
this.e9_1 = 3;
|
|
556
|
+
this.z41_1 = new HttpRequestBuilder();
|
|
557
|
+
this.z41_1.k31(this.x41_1);
|
|
558
|
+
this.d9_1 = 1;
|
|
559
|
+
suspendResult = this.w41_1.t43(this.z41_1, this.y41_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().
|
|
568
|
-
this.
|
|
569
|
-
suspendResult = this.
|
|
566
|
+
this.z41_1.r2v_1.b27(get_AuthCircuitBreaker(), Unit_instance);
|
|
567
|
+
get_LOGGER().c2d('Sending new request to ' + this.v41_1.v2x().y2x().toString());
|
|
568
|
+
this.d9_1 = 2;
|
|
569
|
+
suspendResult = this.u41_1.c3d(this.z41_1, this);
|
|
570
570
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
571
571
|
return suspendResult;
|
|
572
572
|
}
|
|
@@ -575,15 +575,15 @@
|
|
|
575
575
|
case 2:
|
|
576
576
|
return suspendResult;
|
|
577
577
|
case 3:
|
|
578
|
-
throw this.
|
|
578
|
+
throw this.g9_1;
|
|
579
579
|
}
|
|
580
580
|
} catch ($p) {
|
|
581
581
|
var e = $p;
|
|
582
|
-
if (this.
|
|
582
|
+
if (this.e9_1 === 3) {
|
|
583
583
|
throw e;
|
|
584
584
|
} else {
|
|
585
|
-
this.
|
|
586
|
-
this.
|
|
585
|
+
this.d9_1 = this.e9_1;
|
|
586
|
+
this.g9_1 = e;
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
589
|
while (true);
|
|
@@ -643,43 +643,43 @@
|
|
|
643
643
|
}
|
|
644
644
|
function $loadTokenCOROUTINE$2(_this__u8e3s4, resultContinuation) {
|
|
645
645
|
CoroutineImpl.call(this, resultContinuation);
|
|
646
|
-
this.
|
|
646
|
+
this.d44_1 = _this__u8e3s4;
|
|
647
647
|
}
|
|
648
|
-
protoOf($loadTokenCOROUTINE$2).
|
|
649
|
-
var suspendResult = this.
|
|
648
|
+
protoOf($loadTokenCOROUTINE$2).l9 = function () {
|
|
649
|
+
var suspendResult = this.f9_1;
|
|
650
650
|
$sm: do
|
|
651
651
|
try {
|
|
652
|
-
var tmp = this.
|
|
652
|
+
var tmp = this.d9_1;
|
|
653
653
|
switch (tmp) {
|
|
654
654
|
case 0:
|
|
655
|
-
this.
|
|
656
|
-
this.
|
|
655
|
+
this.e9_1 = 5;
|
|
656
|
+
this.f44_1 = null;
|
|
657
657
|
$l$loop: while (true) {
|
|
658
|
-
this.
|
|
659
|
-
var tmp0_elvis_lhs = this.
|
|
658
|
+
this.e44_1 = this.d44_1.i44_1.kotlinx$atomicfu$value;
|
|
659
|
+
var tmp0_elvis_lhs = this.e44_1;
|
|
660
660
|
var newValue = tmp0_elvis_lhs == null ? CompletableDeferred() : tmp0_elvis_lhs;
|
|
661
|
-
if (this.
|
|
662
|
-
this.
|
|
661
|
+
if (this.d44_1.i44_1.atomicfu$compareAndSet(this.e44_1, newValue)) {
|
|
662
|
+
this.f44_1 = newValue;
|
|
663
663
|
break $l$loop;
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
666
|
|
|
667
|
-
if (!(this.
|
|
668
|
-
this.
|
|
669
|
-
suspendResult = this.
|
|
667
|
+
if (!(this.e44_1 == null)) {
|
|
668
|
+
this.d9_1 = 4;
|
|
669
|
+
suspendResult = this.e44_1.cq(this);
|
|
670
670
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
671
671
|
return suspendResult;
|
|
672
672
|
}
|
|
673
673
|
continue $sm;
|
|
674
674
|
} else {
|
|
675
|
-
this.
|
|
675
|
+
this.d9_1 = 1;
|
|
676
676
|
continue $sm;
|
|
677
677
|
}
|
|
678
678
|
|
|
679
679
|
case 1:
|
|
680
|
-
this.
|
|
681
|
-
this.
|
|
682
|
-
suspendResult = this.
|
|
680
|
+
this.e9_1 = 3;
|
|
681
|
+
this.d9_1 = 2;
|
|
682
|
+
suspendResult = this.d44_1.g44_1(this);
|
|
683
683
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
684
684
|
return suspendResult;
|
|
685
685
|
}
|
|
@@ -688,89 +688,89 @@
|
|
|
688
688
|
case 2:
|
|
689
689
|
var newTokens = suspendResult;
|
|
690
690
|
var tmp_0;
|
|
691
|
-
if (this.
|
|
691
|
+
if (this.f44_1 == null) {
|
|
692
692
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
693
693
|
} else {
|
|
694
|
-
tmp_0 = this.
|
|
694
|
+
tmp_0 = this.f44_1;
|
|
695
695
|
}
|
|
696
696
|
|
|
697
|
-
tmp_0.
|
|
697
|
+
tmp_0.au(newTokens);
|
|
698
698
|
return newTokens;
|
|
699
699
|
case 3:
|
|
700
|
-
this.
|
|
701
|
-
var tmp_1 = this.
|
|
700
|
+
this.e9_1 = 5;
|
|
701
|
+
var tmp_1 = this.g9_1;
|
|
702
702
|
if (tmp_1 instanceof Error) {
|
|
703
|
-
var cause = this.
|
|
703
|
+
var cause = this.g9_1;
|
|
704
704
|
var tmp_2;
|
|
705
|
-
if (this.
|
|
705
|
+
if (this.f44_1 == null) {
|
|
706
706
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
707
707
|
} else {
|
|
708
|
-
tmp_2 = this.
|
|
708
|
+
tmp_2 = this.f44_1;
|
|
709
709
|
}
|
|
710
|
-
tmp_2.
|
|
710
|
+
tmp_2.cu(cause);
|
|
711
711
|
var tmp_3;
|
|
712
|
-
if (this.
|
|
712
|
+
if (this.f44_1 == null) {
|
|
713
713
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
714
714
|
} else {
|
|
715
|
-
tmp_3 = this.
|
|
715
|
+
tmp_3 = this.f44_1;
|
|
716
716
|
}
|
|
717
|
-
this.
|
|
717
|
+
this.d44_1.i44_1.atomicfu$compareAndSet(tmp_3, null);
|
|
718
718
|
throw cause;
|
|
719
719
|
} else {
|
|
720
|
-
throw this.
|
|
720
|
+
throw this.g9_1;
|
|
721
721
|
}
|
|
722
722
|
|
|
723
723
|
case 4:
|
|
724
724
|
return suspendResult;
|
|
725
725
|
case 5:
|
|
726
|
-
throw this.
|
|
726
|
+
throw this.g9_1;
|
|
727
727
|
}
|
|
728
728
|
} catch ($p) {
|
|
729
729
|
var e = $p;
|
|
730
|
-
if (this.
|
|
730
|
+
if (this.e9_1 === 5) {
|
|
731
731
|
throw e;
|
|
732
732
|
} else {
|
|
733
|
-
this.
|
|
734
|
-
this.
|
|
733
|
+
this.d9_1 = this.e9_1;
|
|
734
|
+
this.g9_1 = e;
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
737
|
while (true);
|
|
738
738
|
};
|
|
739
739
|
function $setTokenCOROUTINE$3(_this__u8e3s4, block, resultContinuation) {
|
|
740
740
|
CoroutineImpl.call(this, resultContinuation);
|
|
741
|
-
this.
|
|
742
|
-
this.
|
|
741
|
+
this.r44_1 = _this__u8e3s4;
|
|
742
|
+
this.s44_1 = block;
|
|
743
743
|
}
|
|
744
|
-
protoOf($setTokenCOROUTINE$3).
|
|
745
|
-
var suspendResult = this.
|
|
744
|
+
protoOf($setTokenCOROUTINE$3).l9 = function () {
|
|
745
|
+
var suspendResult = this.f9_1;
|
|
746
746
|
$sm: do
|
|
747
747
|
try {
|
|
748
|
-
var tmp = this.
|
|
748
|
+
var tmp = this.d9_1;
|
|
749
749
|
switch (tmp) {
|
|
750
750
|
case 0:
|
|
751
|
-
this.
|
|
752
|
-
this.
|
|
751
|
+
this.e9_1 = 5;
|
|
752
|
+
this.u44_1 = null;
|
|
753
753
|
$l$loop: while (true) {
|
|
754
|
-
this.
|
|
755
|
-
var tmp0_elvis_lhs = this.
|
|
754
|
+
this.t44_1 = this.r44_1.h44_1.kotlinx$atomicfu$value;
|
|
755
|
+
var tmp0_elvis_lhs = this.t44_1;
|
|
756
756
|
var newValue = tmp0_elvis_lhs == null ? CompletableDeferred() : tmp0_elvis_lhs;
|
|
757
|
-
if (this.
|
|
758
|
-
this.
|
|
757
|
+
if (this.r44_1.h44_1.atomicfu$compareAndSet(this.t44_1, newValue)) {
|
|
758
|
+
this.u44_1 = newValue;
|
|
759
759
|
break $l$loop;
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
762
|
|
|
763
|
-
this.
|
|
764
|
-
if (this.
|
|
765
|
-
this.
|
|
766
|
-
suspendResult = this.
|
|
763
|
+
this.e9_1 = 4;
|
|
764
|
+
if (this.t44_1 == null) {
|
|
765
|
+
this.d9_1 = 2;
|
|
766
|
+
suspendResult = this.s44_1(this);
|
|
767
767
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
768
768
|
return suspendResult;
|
|
769
769
|
}
|
|
770
770
|
continue $sm;
|
|
771
771
|
} else {
|
|
772
|
-
this.
|
|
773
|
-
suspendResult = this.
|
|
772
|
+
this.d9_1 = 1;
|
|
773
|
+
suspendResult = this.t44_1.cq(this);
|
|
774
774
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
775
775
|
return suspendResult;
|
|
776
776
|
}
|
|
@@ -778,81 +778,81 @@
|
|
|
778
778
|
}
|
|
779
779
|
|
|
780
780
|
case 1:
|
|
781
|
-
this.
|
|
782
|
-
this.
|
|
781
|
+
this.v44_1 = suspendResult;
|
|
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.u44_1 == null) {
|
|
788
788
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
789
789
|
} else {
|
|
790
|
-
tmp_0 = this.
|
|
790
|
+
tmp_0 = this.u44_1;
|
|
791
791
|
}
|
|
792
792
|
|
|
793
|
-
tmp_0.
|
|
794
|
-
this.
|
|
795
|
-
this.
|
|
796
|
-
this.
|
|
793
|
+
tmp_0.au(newTokens);
|
|
794
|
+
this.r44_1.h44_1.kotlinx$atomicfu$value = null;
|
|
795
|
+
this.v44_1 = newTokens;
|
|
796
|
+
this.d9_1 = 3;
|
|
797
797
|
continue $sm;
|
|
798
798
|
case 3:
|
|
799
|
-
var newToken = this.
|
|
800
|
-
this.
|
|
799
|
+
var newToken = this.v44_1;
|
|
800
|
+
this.r44_1.i44_1.kotlinx$atomicfu$value = CompletableDeferred_0(newToken);
|
|
801
801
|
return newToken;
|
|
802
802
|
case 4:
|
|
803
|
-
this.
|
|
804
|
-
var tmp_1 = this.
|
|
803
|
+
this.e9_1 = 5;
|
|
804
|
+
var tmp_1 = this.g9_1;
|
|
805
805
|
if (tmp_1 instanceof Error) {
|
|
806
|
-
var cause = this.
|
|
806
|
+
var cause = this.g9_1;
|
|
807
807
|
var tmp_2;
|
|
808
|
-
if (this.
|
|
808
|
+
if (this.u44_1 == null) {
|
|
809
809
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
810
810
|
} else {
|
|
811
|
-
tmp_2 = this.
|
|
811
|
+
tmp_2 = this.u44_1;
|
|
812
812
|
}
|
|
813
|
-
tmp_2.
|
|
813
|
+
tmp_2.cu(cause);
|
|
814
814
|
var tmp_3;
|
|
815
|
-
if (this.
|
|
815
|
+
if (this.u44_1 == null) {
|
|
816
816
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
817
817
|
} else {
|
|
818
|
-
tmp_3 = this.
|
|
818
|
+
tmp_3 = this.u44_1;
|
|
819
819
|
}
|
|
820
|
-
this.
|
|
820
|
+
this.r44_1.h44_1.atomicfu$compareAndSet(tmp_3, null);
|
|
821
821
|
throw cause;
|
|
822
822
|
} else {
|
|
823
|
-
throw this.
|
|
823
|
+
throw this.g9_1;
|
|
824
824
|
}
|
|
825
825
|
|
|
826
826
|
case 5:
|
|
827
|
-
throw this.
|
|
827
|
+
throw this.g9_1;
|
|
828
828
|
}
|
|
829
829
|
} catch ($p) {
|
|
830
830
|
var e = $p;
|
|
831
|
-
if (this.
|
|
831
|
+
if (this.e9_1 === 5) {
|
|
832
832
|
throw e;
|
|
833
833
|
} else {
|
|
834
|
-
this.
|
|
835
|
-
this.
|
|
834
|
+
this.d9_1 = this.e9_1;
|
|
835
|
+
this.g9_1 = e;
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
838
|
while (true);
|
|
839
839
|
};
|
|
840
840
|
function AuthTokenHolder(loadTokens) {
|
|
841
|
-
this.
|
|
842
|
-
this.
|
|
843
|
-
this.
|
|
841
|
+
this.g44_1 = loadTokens;
|
|
842
|
+
this.h44_1 = atomic$ref$1(null);
|
|
843
|
+
this.i44_1 = atomic$ref$1(null);
|
|
844
844
|
}
|
|
845
|
-
protoOf(AuthTokenHolder).
|
|
845
|
+
protoOf(AuthTokenHolder).w44 = function ($completion) {
|
|
846
846
|
var tmp = new $loadTokenCOROUTINE$2(this, $completion);
|
|
847
|
-
tmp.
|
|
848
|
-
tmp.
|
|
849
|
-
return tmp.
|
|
847
|
+
tmp.f9_1 = Unit_instance;
|
|
848
|
+
tmp.g9_1 = null;
|
|
849
|
+
return tmp.l9();
|
|
850
850
|
};
|
|
851
|
-
protoOf(AuthTokenHolder).
|
|
851
|
+
protoOf(AuthTokenHolder).x44 = function (block, $completion) {
|
|
852
852
|
var tmp = new $setTokenCOROUTINE$3(this, block, $completion);
|
|
853
|
-
tmp.
|
|
854
|
-
tmp.
|
|
855
|
-
return tmp.
|
|
853
|
+
tmp.f9_1 = Unit_instance;
|
|
854
|
+
tmp.g9_1 = null;
|
|
855
|
+
return tmp.l9();
|
|
856
856
|
};
|
|
857
857
|
function bearer(_this__u8e3s4, block) {
|
|
858
858
|
// Inline function 'kotlin.apply' call
|
|
@@ -860,30 +860,30 @@
|
|
|
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.t40_1.k(new BearerAuthProvider(this_0.y44_1, this_0.z44_1, this_0.a45_1, this_0.b45_1));
|
|
864
864
|
}
|
|
865
865
|
function BearerAuthConfig$_refreshTokens$slambda(resultContinuation) {
|
|
866
866
|
CoroutineImpl.call(this, resultContinuation);
|
|
867
867
|
}
|
|
868
|
-
protoOf(BearerAuthConfig$_refreshTokens$slambda).
|
|
869
|
-
var tmp = this.
|
|
870
|
-
tmp.
|
|
871
|
-
tmp.
|
|
872
|
-
return tmp.
|
|
868
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).l45 = function (_this__u8e3s4, $completion) {
|
|
869
|
+
var tmp = this.m45(_this__u8e3s4, $completion);
|
|
870
|
+
tmp.f9_1 = Unit_instance;
|
|
871
|
+
tmp.g9_1 = null;
|
|
872
|
+
return tmp.l9();
|
|
873
873
|
};
|
|
874
|
-
protoOf(BearerAuthConfig$_refreshTokens$slambda).
|
|
875
|
-
return this.
|
|
874
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).v9 = function (p1, $completion) {
|
|
875
|
+
return this.l45(p1 instanceof RefreshTokensParams ? p1 : THROW_CCE(), $completion);
|
|
876
876
|
};
|
|
877
|
-
protoOf(BearerAuthConfig$_refreshTokens$slambda).
|
|
878
|
-
var suspendResult = this.
|
|
877
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).l9 = function () {
|
|
878
|
+
var suspendResult = this.f9_1;
|
|
879
879
|
$sm: do
|
|
880
880
|
try {
|
|
881
|
-
var tmp = this.
|
|
881
|
+
var tmp = this.d9_1;
|
|
882
882
|
if (tmp === 0) {
|
|
883
|
-
this.
|
|
883
|
+
this.e9_1 = 1;
|
|
884
884
|
return null;
|
|
885
885
|
} else if (tmp === 1) {
|
|
886
|
-
throw this.
|
|
886
|
+
throw this.g9_1;
|
|
887
887
|
}
|
|
888
888
|
} catch ($p) {
|
|
889
889
|
var e = $p;
|
|
@@ -891,15 +891,15 @@
|
|
|
891
891
|
}
|
|
892
892
|
while (true);
|
|
893
893
|
};
|
|
894
|
-
protoOf(BearerAuthConfig$_refreshTokens$slambda).
|
|
894
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).m45 = function (_this__u8e3s4, completion) {
|
|
895
895
|
var i = new BearerAuthConfig$_refreshTokens$slambda(completion);
|
|
896
|
-
i.
|
|
896
|
+
i.k45_1 = _this__u8e3s4;
|
|
897
897
|
return i;
|
|
898
898
|
};
|
|
899
899
|
function BearerAuthConfig$_refreshTokens$slambda_0(resultContinuation) {
|
|
900
900
|
var i = new BearerAuthConfig$_refreshTokens$slambda(resultContinuation);
|
|
901
901
|
var l = function (_this__u8e3s4, $completion) {
|
|
902
|
-
return i.
|
|
902
|
+
return i.l45(_this__u8e3s4, $completion);
|
|
903
903
|
};
|
|
904
904
|
l.$arity = 1;
|
|
905
905
|
return l;
|
|
@@ -907,25 +907,25 @@
|
|
|
907
907
|
function BearerAuthConfig$_loadTokens$slambda(resultContinuation) {
|
|
908
908
|
CoroutineImpl.call(this, resultContinuation);
|
|
909
909
|
}
|
|
910
|
-
protoOf(BearerAuthConfig$_loadTokens$slambda).
|
|
911
|
-
var tmp = this.
|
|
912
|
-
tmp.
|
|
913
|
-
tmp.
|
|
914
|
-
return tmp.
|
|
910
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).v45 = function ($completion) {
|
|
911
|
+
var tmp = this.w45($completion);
|
|
912
|
+
tmp.f9_1 = Unit_instance;
|
|
913
|
+
tmp.g9_1 = null;
|
|
914
|
+
return tmp.l9();
|
|
915
915
|
};
|
|
916
|
-
protoOf(BearerAuthConfig$_loadTokens$slambda).
|
|
917
|
-
return this.
|
|
916
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).ab = function ($completion) {
|
|
917
|
+
return this.v45($completion);
|
|
918
918
|
};
|
|
919
|
-
protoOf(BearerAuthConfig$_loadTokens$slambda).
|
|
920
|
-
var suspendResult = this.
|
|
919
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).l9 = function () {
|
|
920
|
+
var suspendResult = this.f9_1;
|
|
921
921
|
$sm: do
|
|
922
922
|
try {
|
|
923
|
-
var tmp = this.
|
|
923
|
+
var tmp = this.d9_1;
|
|
924
924
|
if (tmp === 0) {
|
|
925
|
-
this.
|
|
925
|
+
this.e9_1 = 1;
|
|
926
926
|
return null;
|
|
927
927
|
} else if (tmp === 1) {
|
|
928
|
-
throw this.
|
|
928
|
+
throw this.g9_1;
|
|
929
929
|
}
|
|
930
930
|
} catch ($p) {
|
|
931
931
|
var e = $p;
|
|
@@ -933,13 +933,13 @@
|
|
|
933
933
|
}
|
|
934
934
|
while (true);
|
|
935
935
|
};
|
|
936
|
-
protoOf(BearerAuthConfig$_loadTokens$slambda).
|
|
936
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).w45 = function (completion) {
|
|
937
937
|
return new BearerAuthConfig$_loadTokens$slambda(completion);
|
|
938
938
|
};
|
|
939
939
|
function BearerAuthConfig$_loadTokens$slambda_0(resultContinuation) {
|
|
940
940
|
var i = new BearerAuthConfig$_loadTokens$slambda(resultContinuation);
|
|
941
941
|
var l = function ($completion) {
|
|
942
|
-
return i.
|
|
942
|
+
return i.v45($completion);
|
|
943
943
|
};
|
|
944
944
|
l.$arity = 0;
|
|
945
945
|
return l;
|
|
@@ -949,76 +949,79 @@
|
|
|
949
949
|
}
|
|
950
950
|
function BearerAuthConfig() {
|
|
951
951
|
var tmp = this;
|
|
952
|
-
tmp.
|
|
952
|
+
tmp.y44_1 = BearerAuthConfig$_refreshTokens$slambda_0(null);
|
|
953
953
|
var tmp_0 = this;
|
|
954
|
-
tmp_0.
|
|
954
|
+
tmp_0.z44_1 = BearerAuthConfig$_loadTokens$slambda_0(null);
|
|
955
955
|
var tmp_1 = this;
|
|
956
|
-
tmp_1.
|
|
957
|
-
this.
|
|
956
|
+
tmp_1.a45_1 = BearerAuthConfig$_sendWithoutRequest$lambda;
|
|
957
|
+
this.b45_1 = null;
|
|
958
958
|
}
|
|
959
|
-
protoOf(BearerAuthConfig).
|
|
960
|
-
this.
|
|
959
|
+
protoOf(BearerAuthConfig).x45 = function (block) {
|
|
960
|
+
this.y44_1 = block;
|
|
961
961
|
};
|
|
962
962
|
function RefreshTokensParams(client, response, oldTokens) {
|
|
963
|
-
this.
|
|
964
|
-
this.
|
|
965
|
-
this.
|
|
963
|
+
this.y45_1 = client;
|
|
964
|
+
this.z45_1 = response;
|
|
965
|
+
this.a46_1 = oldTokens;
|
|
966
966
|
}
|
|
967
|
+
protoOf(RefreshTokensParams).b46 = function (_this__u8e3s4) {
|
|
968
|
+
_this__u8e3s4.r2v_1.b27(get_AuthCircuitBreaker(), Unit_instance);
|
|
969
|
+
};
|
|
967
970
|
function BearerTokens(accessToken, refreshToken) {
|
|
968
|
-
this.
|
|
969
|
-
this.
|
|
971
|
+
this.c46_1 = accessToken;
|
|
972
|
+
this.d46_1 = refreshToken;
|
|
970
973
|
}
|
|
971
974
|
function BearerAuthProvider$_init_$lambda_lcdiwf(it) {
|
|
972
975
|
return true;
|
|
973
976
|
}
|
|
974
977
|
function BearerAuthProvider$addRequestHeaders$lambda($token) {
|
|
975
978
|
return function ($this$headers) {
|
|
976
|
-
var tokenValue = 'Bearer ' + $token.
|
|
979
|
+
var tokenValue = 'Bearer ' + $token.c46_1;
|
|
977
980
|
var tmp;
|
|
978
|
-
if ($this$headers.
|
|
979
|
-
$this$headers.
|
|
981
|
+
if ($this$headers.x28(HttpHeaders_getInstance().m2f_1)) {
|
|
982
|
+
$this$headers.e29(HttpHeaders_getInstance().m2f_1);
|
|
980
983
|
tmp = Unit_instance;
|
|
981
984
|
}
|
|
982
|
-
$this$headers.
|
|
985
|
+
$this$headers.b29(HttpHeaders_getInstance().m2f_1, tokenValue);
|
|
983
986
|
return Unit_instance;
|
|
984
987
|
};
|
|
985
988
|
}
|
|
986
989
|
function BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation) {
|
|
987
|
-
this.
|
|
988
|
-
this.
|
|
990
|
+
this.m46_1 = this$0;
|
|
991
|
+
this.n46_1 = $response;
|
|
989
992
|
CoroutineImpl.call(this, resultContinuation);
|
|
990
993
|
}
|
|
991
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
992
|
-
var tmp = this.
|
|
993
|
-
tmp.
|
|
994
|
-
tmp.
|
|
995
|
-
return tmp.
|
|
994
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).s46 = function ($completion) {
|
|
995
|
+
var tmp = this.w45($completion);
|
|
996
|
+
tmp.f9_1 = Unit_instance;
|
|
997
|
+
tmp.g9_1 = null;
|
|
998
|
+
return tmp.l9();
|
|
996
999
|
};
|
|
997
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
998
|
-
return this.
|
|
1000
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).ab = function ($completion) {
|
|
1001
|
+
return this.s46($completion);
|
|
999
1002
|
};
|
|
1000
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1001
|
-
var suspendResult = this.
|
|
1003
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).l9 = function () {
|
|
1004
|
+
var suspendResult = this.f9_1;
|
|
1002
1005
|
$sm: do
|
|
1003
1006
|
try {
|
|
1004
|
-
var tmp = this.
|
|
1007
|
+
var tmp = this.d9_1;
|
|
1005
1008
|
switch (tmp) {
|
|
1006
1009
|
case 0:
|
|
1007
|
-
this.
|
|
1008
|
-
this.
|
|
1009
|
-
this.
|
|
1010
|
-
this.
|
|
1011
|
-
suspendResult = this.
|
|
1010
|
+
this.e9_1 = 3;
|
|
1011
|
+
this.o46_1 = this.m46_1.t46_1;
|
|
1012
|
+
this.p46_1 = this.n46_1.u2y().h2u_1;
|
|
1013
|
+
this.d9_1 = 1;
|
|
1014
|
+
suspendResult = this.m46_1.w46_1.w44(this);
|
|
1012
1015
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1013
1016
|
return suspendResult;
|
|
1014
1017
|
}
|
|
1015
1018
|
|
|
1016
1019
|
continue $sm;
|
|
1017
1020
|
case 1:
|
|
1018
|
-
this.
|
|
1019
|
-
this.
|
|
1020
|
-
this.
|
|
1021
|
-
suspendResult = this.
|
|
1021
|
+
this.q46_1 = suspendResult;
|
|
1022
|
+
this.r46_1 = new RefreshTokensParams(this.p46_1, this.n46_1, this.q46_1);
|
|
1023
|
+
this.d9_1 = 2;
|
|
1024
|
+
suspendResult = this.o46_1(this.r46_1, this);
|
|
1022
1025
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1023
1026
|
return suspendResult;
|
|
1024
1027
|
}
|
|
@@ -1027,46 +1030,46 @@
|
|
|
1027
1030
|
case 2:
|
|
1028
1031
|
return suspendResult;
|
|
1029
1032
|
case 3:
|
|
1030
|
-
throw this.
|
|
1033
|
+
throw this.g9_1;
|
|
1031
1034
|
}
|
|
1032
1035
|
} catch ($p) {
|
|
1033
1036
|
var e = $p;
|
|
1034
|
-
if (this.
|
|
1037
|
+
if (this.e9_1 === 3) {
|
|
1035
1038
|
throw e;
|
|
1036
1039
|
} else {
|
|
1037
|
-
this.
|
|
1038
|
-
this.
|
|
1040
|
+
this.d9_1 = this.e9_1;
|
|
1041
|
+
this.g9_1 = e;
|
|
1039
1042
|
}
|
|
1040
1043
|
}
|
|
1041
1044
|
while (true);
|
|
1042
1045
|
};
|
|
1043
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1044
|
-
return new BearerAuthProvider$refreshToken$slambda(this.
|
|
1046
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).w45 = function (completion) {
|
|
1047
|
+
return new BearerAuthProvider$refreshToken$slambda(this.m46_1, this.n46_1, completion);
|
|
1045
1048
|
};
|
|
1046
1049
|
function BearerAuthProvider$refreshToken$slambda_0(this$0, $response, resultContinuation) {
|
|
1047
1050
|
var i = new BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation);
|
|
1048
1051
|
var l = function ($completion) {
|
|
1049
|
-
return i.
|
|
1052
|
+
return i.s46($completion);
|
|
1050
1053
|
};
|
|
1051
1054
|
l.$arity = 0;
|
|
1052
1055
|
return l;
|
|
1053
1056
|
}
|
|
1054
1057
|
function $addRequestHeadersCOROUTINE$4(_this__u8e3s4, request, authHeader, resultContinuation) {
|
|
1055
1058
|
CoroutineImpl.call(this, resultContinuation);
|
|
1056
|
-
this.
|
|
1057
|
-
this.
|
|
1058
|
-
this.
|
|
1059
|
+
this.f47_1 = _this__u8e3s4;
|
|
1060
|
+
this.g47_1 = request;
|
|
1061
|
+
this.h47_1 = authHeader;
|
|
1059
1062
|
}
|
|
1060
|
-
protoOf($addRequestHeadersCOROUTINE$4).
|
|
1061
|
-
var suspendResult = this.
|
|
1063
|
+
protoOf($addRequestHeadersCOROUTINE$4).l9 = function () {
|
|
1064
|
+
var suspendResult = this.f9_1;
|
|
1062
1065
|
$sm: do
|
|
1063
1066
|
try {
|
|
1064
|
-
var tmp = this.
|
|
1067
|
+
var tmp = this.d9_1;
|
|
1065
1068
|
switch (tmp) {
|
|
1066
1069
|
case 0:
|
|
1067
|
-
this.
|
|
1068
|
-
this.
|
|
1069
|
-
suspendResult = this.
|
|
1070
|
+
this.e9_1 = 2;
|
|
1071
|
+
this.d9_1 = 1;
|
|
1072
|
+
suspendResult = this.f47_1.w46_1.w44(this);
|
|
1070
1073
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1071
1074
|
return suspendResult;
|
|
1072
1075
|
}
|
|
@@ -1082,37 +1085,37 @@
|
|
|
1082
1085
|
}
|
|
1083
1086
|
|
|
1084
1087
|
var token = tmp_0;
|
|
1085
|
-
headers(this.
|
|
1088
|
+
headers(this.g47_1, BearerAuthProvider$addRequestHeaders$lambda(token));
|
|
1086
1089
|
return Unit_instance;
|
|
1087
1090
|
case 2:
|
|
1088
|
-
throw this.
|
|
1091
|
+
throw this.g9_1;
|
|
1089
1092
|
}
|
|
1090
1093
|
} catch ($p) {
|
|
1091
1094
|
var e = $p;
|
|
1092
|
-
if (this.
|
|
1095
|
+
if (this.e9_1 === 2) {
|
|
1093
1096
|
throw e;
|
|
1094
1097
|
} else {
|
|
1095
|
-
this.
|
|
1096
|
-
this.
|
|
1098
|
+
this.d9_1 = this.e9_1;
|
|
1099
|
+
this.g9_1 = e;
|
|
1097
1100
|
}
|
|
1098
1101
|
}
|
|
1099
1102
|
while (true);
|
|
1100
1103
|
};
|
|
1101
1104
|
function $refreshTokenCOROUTINE$5(_this__u8e3s4, response, resultContinuation) {
|
|
1102
1105
|
CoroutineImpl.call(this, resultContinuation);
|
|
1103
|
-
this.
|
|
1104
|
-
this.
|
|
1106
|
+
this.q47_1 = _this__u8e3s4;
|
|
1107
|
+
this.r47_1 = response;
|
|
1105
1108
|
}
|
|
1106
|
-
protoOf($refreshTokenCOROUTINE$5).
|
|
1107
|
-
var suspendResult = this.
|
|
1109
|
+
protoOf($refreshTokenCOROUTINE$5).l9 = function () {
|
|
1110
|
+
var suspendResult = this.f9_1;
|
|
1108
1111
|
$sm: do
|
|
1109
1112
|
try {
|
|
1110
|
-
var tmp = this.
|
|
1113
|
+
var tmp = this.d9_1;
|
|
1111
1114
|
switch (tmp) {
|
|
1112
1115
|
case 0:
|
|
1113
|
-
this.
|
|
1114
|
-
this.
|
|
1115
|
-
suspendResult = this.
|
|
1116
|
+
this.e9_1 = 2;
|
|
1117
|
+
this.d9_1 = 1;
|
|
1118
|
+
suspendResult = this.q47_1.w46_1.x44(BearerAuthProvider$refreshToken$slambda_0(this.q47_1, this.r47_1, null), this);
|
|
1116
1119
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1117
1120
|
return suspendResult;
|
|
1118
1121
|
}
|
|
@@ -1122,15 +1125,15 @@
|
|
|
1122
1125
|
var newToken = suspendResult;
|
|
1123
1126
|
return !(newToken == null);
|
|
1124
1127
|
case 2:
|
|
1125
|
-
throw this.
|
|
1128
|
+
throw this.g9_1;
|
|
1126
1129
|
}
|
|
1127
1130
|
} catch ($p) {
|
|
1128
1131
|
var e = $p;
|
|
1129
|
-
if (this.
|
|
1132
|
+
if (this.e9_1 === 2) {
|
|
1130
1133
|
throw e;
|
|
1131
1134
|
} else {
|
|
1132
|
-
this.
|
|
1133
|
-
this.
|
|
1135
|
+
this.d9_1 = this.e9_1;
|
|
1136
|
+
this.g9_1 = e;
|
|
1134
1137
|
}
|
|
1135
1138
|
}
|
|
1136
1139
|
while (true);
|
|
@@ -1143,53 +1146,53 @@
|
|
|
1143
1146
|
tmp = sendWithoutRequestCallback;
|
|
1144
1147
|
}
|
|
1145
1148
|
sendWithoutRequestCallback = tmp;
|
|
1146
|
-
this.
|
|
1147
|
-
this.
|
|
1148
|
-
this.
|
|
1149
|
-
this.
|
|
1149
|
+
this.t46_1 = refreshTokens;
|
|
1150
|
+
this.u46_1 = sendWithoutRequestCallback;
|
|
1151
|
+
this.v46_1 = realm;
|
|
1152
|
+
this.w46_1 = new AuthTokenHolder(loadTokens);
|
|
1150
1153
|
}
|
|
1151
|
-
protoOf(BearerAuthProvider).
|
|
1154
|
+
protoOf(BearerAuthProvider).u43 = function () {
|
|
1152
1155
|
var message = 'Deprecated';
|
|
1153
1156
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1154
1157
|
};
|
|
1155
|
-
protoOf(BearerAuthProvider).
|
|
1156
|
-
return this.
|
|
1158
|
+
protoOf(BearerAuthProvider).w42 = function (request) {
|
|
1159
|
+
return this.u46_1(request);
|
|
1157
1160
|
};
|
|
1158
|
-
protoOf(BearerAuthProvider).
|
|
1159
|
-
if (!(auth.
|
|
1160
|
-
get_LOGGER().
|
|
1161
|
+
protoOf(BearerAuthProvider).v40 = function (auth) {
|
|
1162
|
+
if (!(auth.p2o_1 === 'Bearer')) {
|
|
1163
|
+
get_LOGGER().c2d('Bearer Auth Provider is not applicable for ' + auth.toString());
|
|
1161
1164
|
return false;
|
|
1162
1165
|
}
|
|
1163
1166
|
var tmp;
|
|
1164
|
-
if (this.
|
|
1167
|
+
if (this.v46_1 == null) {
|
|
1165
1168
|
tmp = true;
|
|
1166
1169
|
} else {
|
|
1167
1170
|
if (!(auth instanceof Parameterized)) {
|
|
1168
1171
|
tmp = false;
|
|
1169
1172
|
} else {
|
|
1170
|
-
tmp = auth.
|
|
1173
|
+
tmp = auth.y2e('realm') == this.v46_1;
|
|
1171
1174
|
}
|
|
1172
1175
|
}
|
|
1173
1176
|
var isSameRealm = tmp;
|
|
1174
1177
|
if (!isSameRealm) {
|
|
1175
|
-
get_LOGGER().
|
|
1178
|
+
get_LOGGER().c2d('Bearer Auth Provider is not applicable for this realm');
|
|
1176
1179
|
}
|
|
1177
1180
|
return isSameRealm;
|
|
1178
1181
|
};
|
|
1179
|
-
protoOf(BearerAuthProvider).
|
|
1182
|
+
protoOf(BearerAuthProvider).t43 = function (request, authHeader, $completion) {
|
|
1180
1183
|
var tmp = new $addRequestHeadersCOROUTINE$4(this, request, authHeader, $completion);
|
|
1181
|
-
tmp.
|
|
1182
|
-
tmp.
|
|
1183
|
-
return tmp.
|
|
1184
|
+
tmp.f9_1 = Unit_instance;
|
|
1185
|
+
tmp.g9_1 = null;
|
|
1186
|
+
return tmp.l9();
|
|
1184
1187
|
};
|
|
1185
|
-
protoOf(BearerAuthProvider).
|
|
1188
|
+
protoOf(BearerAuthProvider).s43 = function (response, $completion) {
|
|
1186
1189
|
var tmp = new $refreshTokenCOROUTINE$5(this, response, $completion);
|
|
1187
|
-
tmp.
|
|
1188
|
-
tmp.
|
|
1189
|
-
return tmp.
|
|
1190
|
+
tmp.f9_1 = Unit_instance;
|
|
1191
|
+
tmp.g9_1 = null;
|
|
1192
|
+
return tmp.l9();
|
|
1190
1193
|
};
|
|
1191
1194
|
//region block: post-declaration
|
|
1192
|
-
protoOf(BearerAuthProvider).
|
|
1195
|
+
protoOf(BearerAuthProvider).x42 = addRequestHeaders$default;
|
|
1193
1196
|
//endregion
|
|
1194
1197
|
//region block: exports
|
|
1195
1198
|
_.$_$ = _.$_$ || {};
|