@doordeck/doordeck-headless-sdk 0.185.0 → 0.186.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kotlin/Kermit-kermit-core.js +60 -60
- package/kotlin/Kermit-kermit.js +7 -7
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +43 -43
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +23 -23
- package/kotlin/doordeck-sdk.d.ts +798 -674
- package/kotlin/doordeck-sdk.js +12518 -12528
- package/kotlin/kotlin-kotlin-stdlib.js +3965 -3522
- package/kotlin/kotlinx-atomicfu.js +22 -22
- package/kotlin/kotlinx-coroutines-core.js +2333 -2338
- package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +59 -59
- package/kotlin/kotlinx-io-kotlinx-io-core.js +532 -532
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1980 -1979
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1589 -1589
- package/kotlin/ktor-ktor-client-auth.js +471 -473
- package/kotlin/ktor-ktor-client-content-negotiation.js +244 -245
- package/kotlin/ktor-ktor-client-core.js +3207 -3212
- package/kotlin/ktor-ktor-client-logging.js +1319 -1319
- package/kotlin/ktor-ktor-events.js +11 -11
- package/kotlin/ktor-ktor-http-cio.js +575 -575
- package/kotlin/ktor-ktor-http.js +950 -950
- package/kotlin/ktor-ktor-io.js +1120 -1124
- package/kotlin/ktor-ktor-serialization-kotlinx-json.js +6 -6
- package/kotlin/ktor-ktor-serialization-kotlinx.js +272 -272
- package/kotlin/ktor-ktor-serialization.js +122 -122
- package/kotlin/ktor-ktor-utils.js +977 -977
- package/kotlin/ktor-ktor-websockets.js +61 -61
- package/package.json +4 -4
|
@@ -3,57 +3,57 @@
|
|
|
3
3
|
//region block: imports
|
|
4
4
|
var CoroutineImpl = kotlin_kotlin.$_$.j9;
|
|
5
5
|
var Unit_instance = kotlin_kotlin.$_$.b5;
|
|
6
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
7
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
6
|
+
var protoOf = kotlin_kotlin.$_$.cc;
|
|
7
|
+
var THROW_CCE = kotlin_kotlin.$_$.bg;
|
|
8
8
|
var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.i1;
|
|
9
9
|
var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.j;
|
|
10
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.
|
|
10
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.jb;
|
|
11
11
|
var VOID = kotlin_kotlin.$_$.b;
|
|
12
12
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.j;
|
|
13
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
13
|
+
var initMetadataForClass = kotlin_kotlin.$_$.eb;
|
|
14
14
|
var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
|
|
15
15
|
var toList = kotlin_kotlin.$_$.g8;
|
|
16
16
|
var ConcurrentMap = kotlin_io_ktor_ktor_utils.$_$.d;
|
|
17
17
|
var KtMutableMap = kotlin_kotlin.$_$.o5;
|
|
18
|
-
var getKClass = kotlin_kotlin.$_$.
|
|
19
|
-
var arrayOf = kotlin_kotlin.$_$.
|
|
20
|
-
var createKType = kotlin_kotlin.$_$.
|
|
21
|
-
var createInvariantKTypeProjection = kotlin_kotlin.$_$.
|
|
18
|
+
var getKClass = kotlin_kotlin.$_$.tc;
|
|
19
|
+
var arrayOf = kotlin_kotlin.$_$.pg;
|
|
20
|
+
var createKType = kotlin_kotlin.$_$.rc;
|
|
21
|
+
var createInvariantKTypeProjection = kotlin_kotlin.$_$.pc;
|
|
22
22
|
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.p4;
|
|
23
23
|
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.m;
|
|
24
24
|
var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.o;
|
|
25
25
|
var Send_instance = kotlin_io_ktor_ktor_client_core.$_$.b;
|
|
26
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
26
27
|
var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.g;
|
|
27
28
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.w5;
|
|
28
29
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.i;
|
|
29
30
|
var parseAuthorizationHeaders = kotlin_io_ktor_ktor_http.$_$.l;
|
|
30
31
|
var flatten = kotlin_kotlin.$_$.z6;
|
|
31
32
|
var emptyList = kotlin_kotlin.$_$.q6;
|
|
32
|
-
var to = kotlin_kotlin.$_$.
|
|
33
|
+
var to = kotlin_kotlin.$_$.fh;
|
|
33
34
|
var get_isTraceEnabled = kotlin_io_ktor_ktor_utils.$_$.i;
|
|
34
35
|
var first = kotlin_kotlin.$_$.y6;
|
|
35
|
-
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
36
36
|
var OnRequestContext = kotlin_io_ktor_ktor_client_core.$_$.j;
|
|
37
37
|
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.b1;
|
|
38
|
-
var toString = kotlin_kotlin.$_$.
|
|
38
|
+
var toString = kotlin_kotlin.$_$.fc;
|
|
39
39
|
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.t8;
|
|
40
40
|
var Sender = kotlin_io_ktor_ktor_client_core.$_$.k;
|
|
41
41
|
var HashSet_init_$Create$ = kotlin_kotlin.$_$.q;
|
|
42
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
42
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.gb;
|
|
43
43
|
var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.h;
|
|
44
|
-
var Unit = kotlin_kotlin.$_$.
|
|
44
|
+
var Unit = kotlin_kotlin.$_$.mg;
|
|
45
45
|
var createClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.n;
|
|
46
46
|
var KtList = kotlin_kotlin.$_$.i5;
|
|
47
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
48
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
47
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.ib;
|
|
48
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.fb;
|
|
49
49
|
var get = kotlin_kotlin.$_$.f9;
|
|
50
50
|
var fold = kotlin_kotlin.$_$.e9;
|
|
51
51
|
var minusKey = kotlin_kotlin.$_$.g9;
|
|
52
52
|
var plus = kotlin_kotlin.$_$.i9;
|
|
53
53
|
var Element = kotlin_kotlin.$_$.h9;
|
|
54
54
|
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.b1;
|
|
55
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
56
|
-
var equals = kotlin_kotlin.$_$.
|
|
55
|
+
var isInterface = kotlin_kotlin.$_$.tb;
|
|
56
|
+
var equals = kotlin_kotlin.$_$.xa;
|
|
57
57
|
var withContext = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f;
|
|
58
58
|
var Mutex = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.t;
|
|
59
59
|
var headers = kotlin_io_ktor_ktor_client_core.$_$.e1;
|
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
initMetadataForCoroutine($invoke$refreshTokenIfNeededCOROUTINE$, CoroutineImpl);
|
|
70
70
|
initMetadataForCoroutine($invoke$executeWithNewTokenCOROUTINE$, CoroutineImpl);
|
|
71
71
|
function sendWithoutRequest(request) {
|
|
72
|
-
return this.
|
|
72
|
+
return this.c4q();
|
|
73
73
|
}
|
|
74
74
|
function addRequestHeaders$default(request, authHeader, $completion, $super) {
|
|
75
75
|
authHeader = authHeader === VOID ? null : authHeader;
|
|
76
|
-
return $super === VOID ? this.
|
|
76
|
+
return $super === VOID ? this.b4q(request, authHeader, $completion) : $super.b4q.call(this, request, authHeader, $completion);
|
|
77
77
|
}
|
|
78
78
|
function refreshToken(response, $completion) {
|
|
79
79
|
return true;
|
|
@@ -118,25 +118,25 @@
|
|
|
118
118
|
function AuthConfig$isUnauthorizedResponse$slambda(resultContinuation) {
|
|
119
119
|
CoroutineImpl.call(this, resultContinuation);
|
|
120
120
|
}
|
|
121
|
-
protoOf(AuthConfig$isUnauthorizedResponse$slambda).
|
|
122
|
-
var tmp = this.
|
|
123
|
-
tmp.
|
|
124
|
-
tmp.
|
|
125
|
-
return tmp.
|
|
121
|
+
protoOf(AuthConfig$isUnauthorizedResponse$slambda).i4n = function (it, $completion) {
|
|
122
|
+
var tmp = this.d3o(it, $completion);
|
|
123
|
+
tmp.f9_1 = Unit_instance;
|
|
124
|
+
tmp.g9_1 = null;
|
|
125
|
+
return tmp.l9();
|
|
126
126
|
};
|
|
127
|
-
protoOf(AuthConfig$isUnauthorizedResponse$slambda).
|
|
128
|
-
return this.
|
|
127
|
+
protoOf(AuthConfig$isUnauthorizedResponse$slambda).x9 = function (p1, $completion) {
|
|
128
|
+
return this.i4n(p1 instanceof HttpResponse ? p1 : THROW_CCE(), $completion);
|
|
129
129
|
};
|
|
130
|
-
protoOf(AuthConfig$isUnauthorizedResponse$slambda).
|
|
131
|
-
var suspendResult = this.
|
|
130
|
+
protoOf(AuthConfig$isUnauthorizedResponse$slambda).l9 = function () {
|
|
131
|
+
var suspendResult = this.f9_1;
|
|
132
132
|
$sm: do
|
|
133
133
|
try {
|
|
134
|
-
var tmp = this.
|
|
134
|
+
var tmp = this.d9_1;
|
|
135
135
|
if (tmp === 0) {
|
|
136
|
-
this.
|
|
137
|
-
return this.
|
|
136
|
+
this.e9_1 = 1;
|
|
137
|
+
return this.h4n_1.b33().equals(Companion_getInstance().s2y_1);
|
|
138
138
|
} else if (tmp === 1) {
|
|
139
|
-
throw this.
|
|
139
|
+
throw this.g9_1;
|
|
140
140
|
}
|
|
141
141
|
} catch ($p) {
|
|
142
142
|
var e = $p;
|
|
@@ -144,15 +144,15 @@
|
|
|
144
144
|
}
|
|
145
145
|
while (true);
|
|
146
146
|
};
|
|
147
|
-
protoOf(AuthConfig$isUnauthorizedResponse$slambda).
|
|
147
|
+
protoOf(AuthConfig$isUnauthorizedResponse$slambda).d3o = function (it, completion) {
|
|
148
148
|
var i = new AuthConfig$isUnauthorizedResponse$slambda(completion);
|
|
149
|
-
i.
|
|
149
|
+
i.h4n_1 = it;
|
|
150
150
|
return i;
|
|
151
151
|
};
|
|
152
152
|
function AuthConfig$isUnauthorizedResponse$slambda_0(resultContinuation) {
|
|
153
153
|
var i = new AuthConfig$isUnauthorizedResponse$slambda(resultContinuation);
|
|
154
154
|
var l = function (it, $completion) {
|
|
155
|
-
return i.
|
|
155
|
+
return i.i4n(it, $completion);
|
|
156
156
|
};
|
|
157
157
|
l.$arity = 1;
|
|
158
158
|
return l;
|
|
@@ -160,12 +160,12 @@
|
|
|
160
160
|
function AuthConfig() {
|
|
161
161
|
var tmp = this;
|
|
162
162
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
163
|
-
tmp.
|
|
163
|
+
tmp.j4n_1 = ArrayList_init_$Create$();
|
|
164
164
|
var tmp_0 = this;
|
|
165
|
-
tmp_0.
|
|
165
|
+
tmp_0.k4n_1 = AuthConfig$isUnauthorizedResponse$slambda_0(null);
|
|
166
166
|
}
|
|
167
167
|
function AtomicCounter() {
|
|
168
|
-
this.
|
|
168
|
+
this.l4n_1 = atomic$int$1(0);
|
|
169
169
|
}
|
|
170
170
|
function AuthConfig$_init_$ref_ms3pb9() {
|
|
171
171
|
var l = function () {
|
|
@@ -176,8 +176,8 @@
|
|
|
176
176
|
}
|
|
177
177
|
function Auth$lambda($this$createClientPlugin) {
|
|
178
178
|
_init_properties_Auth_kt__9ob1dk();
|
|
179
|
-
var providers = toList($this$createClientPlugin.
|
|
180
|
-
$this$createClientPlugin.
|
|
179
|
+
var providers = toList($this$createClientPlugin.d3n_1.j4n_1);
|
|
180
|
+
$this$createClientPlugin.c3n_1.e3d_1.r2h(get_AuthProvidersKey(), providers);
|
|
181
181
|
var tokenVersions = new ConcurrentMap();
|
|
182
182
|
// Inline function 'io.ktor.util.AttributeKey' call
|
|
183
183
|
var name = 'ProviderVersionAttributeKey';
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
187
187
|
var tmp_0;
|
|
188
188
|
try {
|
|
189
|
-
tmp_0 = createKType(getKClass(KtMutableMap), arrayOf([createInvariantKTypeProjection(createKType(getKClass(AuthProvider), arrayOf([]), false)), createInvariantKTypeProjection(createKType(PrimitiveClasses_getInstance().
|
|
189
|
+
tmp_0 = createKType(getKClass(KtMutableMap), arrayOf([createInvariantKTypeProjection(createKType(getKClass(AuthProvider), arrayOf([]), false)), createInvariantKTypeProjection(createKType(PrimitiveClasses_getInstance().zb(), arrayOf([]), false))]), false);
|
|
190
190
|
} catch ($p) {
|
|
191
191
|
var tmp_1;
|
|
192
192
|
if ($p instanceof Error) {
|
|
@@ -200,13 +200,22 @@
|
|
|
200
200
|
var tmp$ret$0 = tmp_0;
|
|
201
201
|
var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
|
|
202
202
|
var tokenVersionsAttributeKey = new AttributeKey(name, tmp$ret$1);
|
|
203
|
-
$this$createClientPlugin.
|
|
203
|
+
$this$createClientPlugin.e42(Auth$lambda$slambda_0(providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
204
204
|
var tmp_2 = Send_instance;
|
|
205
|
-
$this$createClientPlugin.
|
|
205
|
+
$this$createClientPlugin.g3n(tmp_2, Auth$lambda$slambda_2($this$createClientPlugin, providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
206
206
|
return Unit_instance;
|
|
207
207
|
}
|
|
208
|
+
function Auth$lambda$refreshTokenIfNeeded$lambda() {
|
|
209
|
+
_init_properties_Auth_kt__9ob1dk();
|
|
210
|
+
return new AtomicCounter();
|
|
211
|
+
}
|
|
212
|
+
function Auth$lambda$refreshTokenIfNeeded$lambda_0() {
|
|
213
|
+
_init_properties_Auth_kt__9ob1dk();
|
|
214
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
215
|
+
return LinkedHashMap_init_$Create$();
|
|
216
|
+
}
|
|
208
217
|
function invoke$findProvider(call, candidateProviders) {
|
|
209
|
-
var headerValues = call.
|
|
218
|
+
var headerValues = call.a3e().e2x().s2l(HttpHeaders_getInstance().c2w_1);
|
|
210
219
|
var tmp;
|
|
211
220
|
if (headerValues == null) {
|
|
212
221
|
tmp = null;
|
|
@@ -214,11 +223,11 @@
|
|
|
214
223
|
// Inline function 'kotlin.collections.map' call
|
|
215
224
|
// Inline function 'kotlin.collections.mapTo' call
|
|
216
225
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(headerValues, 10));
|
|
217
|
-
var _iterator__ex2g4s = headerValues.
|
|
218
|
-
while (_iterator__ex2g4s.
|
|
219
|
-
var item = _iterator__ex2g4s.
|
|
226
|
+
var _iterator__ex2g4s = headerValues.t();
|
|
227
|
+
while (_iterator__ex2g4s.u()) {
|
|
228
|
+
var item = _iterator__ex2g4s.v();
|
|
220
229
|
var tmp$ret$0 = parseAuthorizationHeaders(item);
|
|
221
|
-
destination.
|
|
230
|
+
destination.j1(tmp$ret$0);
|
|
222
231
|
}
|
|
223
232
|
tmp = destination;
|
|
224
233
|
}
|
|
@@ -226,31 +235,31 @@
|
|
|
226
235
|
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : flatten(tmp1_safe_receiver);
|
|
227
236
|
var authHeaders = tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;
|
|
228
237
|
var tmp_0;
|
|
229
|
-
if (authHeaders.
|
|
238
|
+
if (authHeaders.r() && candidateProviders.l1() === 1) {
|
|
230
239
|
tmp_0 = to(first(candidateProviders), null);
|
|
231
|
-
} else if (authHeaders.
|
|
240
|
+
} else if (authHeaders.r()) {
|
|
232
241
|
// Inline function 'io.ktor.util.logging.trace' call
|
|
233
242
|
var this_0 = get_LOGGER();
|
|
234
243
|
if (get_isTraceEnabled(this_0)) {
|
|
235
|
-
var tmp$ret$3 = 'Unauthorized response ' + call.
|
|
236
|
-
this_0.
|
|
244
|
+
var tmp$ret$3 = 'Unauthorized response ' + call.i3g().r3g().toString() + ' has no or empty "WWW-Authenticate" header. ' + 'Can not add or refresh token';
|
|
245
|
+
this_0.i2q(tmp$ret$3);
|
|
237
246
|
}
|
|
238
247
|
tmp_0 = null;
|
|
239
248
|
} else {
|
|
240
249
|
var tmp$ret$11;
|
|
241
250
|
$l$block_0: {
|
|
242
251
|
// Inline function 'kotlin.collections.firstNotNullOfOrNull' call
|
|
243
|
-
var _iterator__ex2g4s_0 = authHeaders.
|
|
244
|
-
while (_iterator__ex2g4s_0.
|
|
245
|
-
var element = _iterator__ex2g4s_0.
|
|
252
|
+
var _iterator__ex2g4s_0 = authHeaders.t();
|
|
253
|
+
while (_iterator__ex2g4s_0.u()) {
|
|
254
|
+
var element = _iterator__ex2g4s_0.v();
|
|
246
255
|
// Inline function 'kotlin.collections.find' call
|
|
247
256
|
var tmp$ret$6;
|
|
248
257
|
$l$block: {
|
|
249
258
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
250
|
-
var _iterator__ex2g4s_1 = candidateProviders.
|
|
251
|
-
while (_iterator__ex2g4s_1.
|
|
252
|
-
var element_0 = _iterator__ex2g4s_1.
|
|
253
|
-
if (element_0.
|
|
259
|
+
var _iterator__ex2g4s_1 = candidateProviders.t();
|
|
260
|
+
while (_iterator__ex2g4s_1.u()) {
|
|
261
|
+
var element_0 = _iterator__ex2g4s_1.v();
|
|
262
|
+
if (element_0.m4n(element)) {
|
|
254
263
|
tmp$ret$6 = element_0;
|
|
255
264
|
break $l$block;
|
|
256
265
|
}
|
|
@@ -279,15 +288,15 @@
|
|
|
279
288
|
}
|
|
280
289
|
function invoke$refreshTokenIfNeeded(tokenVersions, tokenVersionsAttributeKey, call, provider, request, $completion) {
|
|
281
290
|
var tmp = new $invoke$refreshTokenIfNeededCOROUTINE$(tokenVersions, tokenVersionsAttributeKey, call, provider, request, $completion);
|
|
282
|
-
tmp.
|
|
283
|
-
tmp.
|
|
284
|
-
return tmp.
|
|
291
|
+
tmp.f9_1 = Unit_instance;
|
|
292
|
+
tmp.g9_1 = null;
|
|
293
|
+
return tmp.l9();
|
|
285
294
|
}
|
|
286
295
|
function invoke$executeWithNewToken(_this__u8e3s4, call, provider, oldRequest, authHeader, $completion) {
|
|
287
296
|
var tmp = new $invoke$executeWithNewTokenCOROUTINE$(_this__u8e3s4, call, provider, oldRequest, authHeader, $completion);
|
|
288
|
-
tmp.
|
|
289
|
-
tmp.
|
|
290
|
-
return tmp.
|
|
297
|
+
tmp.f9_1 = Unit_instance;
|
|
298
|
+
tmp.g9_1 = null;
|
|
299
|
+
return tmp.l9();
|
|
291
300
|
}
|
|
292
301
|
function Auth$lambda$slambda$lambda() {
|
|
293
302
|
return new AtomicCounter();
|
|
@@ -297,136 +306,136 @@
|
|
|
297
306
|
return LinkedHashMap_init_$Create$();
|
|
298
307
|
}
|
|
299
308
|
function Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
300
|
-
this.
|
|
301
|
-
this.
|
|
302
|
-
this.
|
|
309
|
+
this.y4o_1 = $providers;
|
|
310
|
+
this.z4o_1 = $tokenVersions;
|
|
311
|
+
this.a4p_1 = $tokenVersionsAttributeKey;
|
|
303
312
|
CoroutineImpl.call(this, resultContinuation);
|
|
304
313
|
}
|
|
305
|
-
protoOf(Auth$lambda$slambda).
|
|
306
|
-
var tmp = this.
|
|
307
|
-
tmp.
|
|
308
|
-
tmp.
|
|
309
|
-
return tmp.
|
|
314
|
+
protoOf(Auth$lambda$slambda).s42 = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
315
|
+
var tmp = this.t42($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
316
|
+
tmp.f9_1 = Unit_instance;
|
|
317
|
+
tmp.g9_1 = null;
|
|
318
|
+
return tmp.l9();
|
|
310
319
|
};
|
|
311
|
-
protoOf(Auth$lambda$slambda).
|
|
320
|
+
protoOf(Auth$lambda$slambda).u42 = function (p1, p2, p3, $completion) {
|
|
312
321
|
var tmp = p1 instanceof OnRequestContext ? p1 : THROW_CCE();
|
|
313
322
|
var tmp_0 = p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE();
|
|
314
|
-
return this.
|
|
323
|
+
return this.s42(tmp, tmp_0, !(p3 == null) ? p3 : THROW_CCE(), $completion);
|
|
315
324
|
};
|
|
316
|
-
protoOf(Auth$lambda$slambda).
|
|
317
|
-
var suspendResult = this.
|
|
325
|
+
protoOf(Auth$lambda$slambda).l9 = function () {
|
|
326
|
+
var suspendResult = this.f9_1;
|
|
318
327
|
$sm: do
|
|
319
328
|
try {
|
|
320
|
-
var tmp = this.
|
|
329
|
+
var tmp = this.d9_1;
|
|
321
330
|
switch (tmp) {
|
|
322
331
|
case 0:
|
|
323
|
-
this.
|
|
324
|
-
var tmp0 = this.
|
|
332
|
+
this.e9_1 = 4;
|
|
333
|
+
var tmp0 = this.y4o_1;
|
|
325
334
|
var destination = ArrayList_init_$Create$();
|
|
326
|
-
var _iterator__ex2g4s = tmp0.
|
|
327
|
-
while (_iterator__ex2g4s.
|
|
328
|
-
var element = _iterator__ex2g4s.
|
|
329
|
-
if (element.
|
|
330
|
-
destination.
|
|
335
|
+
var _iterator__ex2g4s = tmp0.t();
|
|
336
|
+
while (_iterator__ex2g4s.u()) {
|
|
337
|
+
var element = _iterator__ex2g4s.v();
|
|
338
|
+
if (element.f4p(this.c4p_1)) {
|
|
339
|
+
destination.j1(element);
|
|
331
340
|
}
|
|
332
341
|
}
|
|
333
342
|
|
|
334
|
-
this.
|
|
335
|
-
this.
|
|
343
|
+
this.e4p_1 = destination.t();
|
|
344
|
+
this.d9_1 = 1;
|
|
336
345
|
continue $sm;
|
|
337
346
|
case 1:
|
|
338
|
-
if (!this.
|
|
339
|
-
this.
|
|
347
|
+
if (!this.e4p_1.u()) {
|
|
348
|
+
this.d9_1 = 3;
|
|
340
349
|
continue $sm;
|
|
341
350
|
}
|
|
342
351
|
|
|
343
|
-
var element_0 = this.
|
|
352
|
+
var element_0 = this.e4p_1.v();
|
|
344
353
|
var this_0 = get_LOGGER();
|
|
345
354
|
if (get_isTraceEnabled(this_0)) {
|
|
346
|
-
this_0.
|
|
355
|
+
this_0.i2q('Adding auth headers for ' + this.c4p_1.a3f_1.toString() + ' from provider ' + toString(element_0));
|
|
347
356
|
}
|
|
348
357
|
|
|
349
|
-
var tokenVersion = this.
|
|
350
|
-
var requestTokenVersions = this.
|
|
351
|
-
var value = tokenVersion.
|
|
352
|
-
requestTokenVersions.
|
|
353
|
-
this.
|
|
354
|
-
suspendResult = element_0.
|
|
358
|
+
var tokenVersion = this.z4o_1.x2p(element_0, Auth$lambda$slambda$lambda);
|
|
359
|
+
var requestTokenVersions = this.c4p_1.f3f_1.t2h(this.a4p_1, Auth$lambda$slambda$lambda_0);
|
|
360
|
+
var value = tokenVersion.l4n_1.kotlinx$atomicfu$value;
|
|
361
|
+
requestTokenVersions.y2(element_0, value);
|
|
362
|
+
this.d9_1 = 2;
|
|
363
|
+
suspendResult = element_0.g4p(this.c4p_1, VOID, this);
|
|
355
364
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
356
365
|
return suspendResult;
|
|
357
366
|
}
|
|
358
367
|
|
|
359
368
|
continue $sm;
|
|
360
369
|
case 2:
|
|
361
|
-
this.
|
|
370
|
+
this.d9_1 = 1;
|
|
362
371
|
continue $sm;
|
|
363
372
|
case 3:
|
|
364
373
|
return Unit_instance;
|
|
365
374
|
case 4:
|
|
366
|
-
throw this.
|
|
375
|
+
throw this.g9_1;
|
|
367
376
|
}
|
|
368
377
|
} catch ($p) {
|
|
369
378
|
var e = $p;
|
|
370
|
-
if (this.
|
|
379
|
+
if (this.e9_1 === 4) {
|
|
371
380
|
throw e;
|
|
372
381
|
} else {
|
|
373
|
-
this.
|
|
374
|
-
this.
|
|
382
|
+
this.d9_1 = this.e9_1;
|
|
383
|
+
this.g9_1 = e;
|
|
375
384
|
}
|
|
376
385
|
}
|
|
377
386
|
while (true);
|
|
378
387
|
};
|
|
379
|
-
protoOf(Auth$lambda$slambda).
|
|
380
|
-
var i = new Auth$lambda$slambda(this.
|
|
381
|
-
i.
|
|
382
|
-
i.
|
|
383
|
-
i.
|
|
388
|
+
protoOf(Auth$lambda$slambda).t42 = function ($this$onRequest, request, _unused_var__etf5q3, completion) {
|
|
389
|
+
var i = new Auth$lambda$slambda(this.y4o_1, this.z4o_1, this.a4p_1, completion);
|
|
390
|
+
i.b4p_1 = $this$onRequest;
|
|
391
|
+
i.c4p_1 = request;
|
|
392
|
+
i.d4p_1 = _unused_var__etf5q3;
|
|
384
393
|
return i;
|
|
385
394
|
};
|
|
386
395
|
function Auth$lambda$slambda_0($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
387
396
|
var i = new Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
388
397
|
var l = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
389
|
-
return i.
|
|
398
|
+
return i.s42($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
390
399
|
};
|
|
391
400
|
l.$arity = 3;
|
|
392
401
|
return l;
|
|
393
402
|
}
|
|
394
403
|
function Auth$lambda$slambda_1($this_createClientPlugin, $providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
395
|
-
this.
|
|
396
|
-
this.
|
|
397
|
-
this.
|
|
398
|
-
this.
|
|
404
|
+
this.p4p_1 = $this_createClientPlugin;
|
|
405
|
+
this.q4p_1 = $providers;
|
|
406
|
+
this.r4p_1 = $tokenVersions;
|
|
407
|
+
this.s4p_1 = $tokenVersionsAttributeKey;
|
|
399
408
|
CoroutineImpl.call(this, resultContinuation);
|
|
400
409
|
}
|
|
401
|
-
protoOf(Auth$lambda$slambda_1).
|
|
402
|
-
var tmp = this.
|
|
403
|
-
tmp.
|
|
404
|
-
tmp.
|
|
405
|
-
return tmp.
|
|
410
|
+
protoOf(Auth$lambda$slambda_1).i3u = function ($this$on, originalRequest, $completion) {
|
|
411
|
+
var tmp = this.j3u($this$on, originalRequest, $completion);
|
|
412
|
+
tmp.f9_1 = Unit_instance;
|
|
413
|
+
tmp.g9_1 = null;
|
|
414
|
+
return tmp.l9();
|
|
406
415
|
};
|
|
407
|
-
protoOf(Auth$lambda$slambda_1).
|
|
416
|
+
protoOf(Auth$lambda$slambda_1).y9 = function (p1, p2, $completion) {
|
|
408
417
|
var tmp = p1 instanceof Sender ? p1 : THROW_CCE();
|
|
409
|
-
return this.
|
|
418
|
+
return this.i3u(tmp, p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE(), $completion);
|
|
410
419
|
};
|
|
411
|
-
protoOf(Auth$lambda$slambda_1).
|
|
412
|
-
var suspendResult = this.
|
|
420
|
+
protoOf(Auth$lambda$slambda_1).l9 = function () {
|
|
421
|
+
var suspendResult = this.f9_1;
|
|
413
422
|
$sm: do
|
|
414
423
|
try {
|
|
415
|
-
var tmp = this.
|
|
424
|
+
var tmp = this.d9_1;
|
|
416
425
|
switch (tmp) {
|
|
417
426
|
case 0:
|
|
418
|
-
this.
|
|
419
|
-
this.
|
|
420
|
-
suspendResult = this.
|
|
427
|
+
this.e9_1 = 10;
|
|
428
|
+
this.d9_1 = 1;
|
|
429
|
+
suspendResult = this.t4p_1.m3u(this.u4p_1, this);
|
|
421
430
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
422
431
|
return suspendResult;
|
|
423
432
|
}
|
|
424
433
|
|
|
425
434
|
continue $sm;
|
|
426
435
|
case 1:
|
|
427
|
-
this.
|
|
428
|
-
this.
|
|
429
|
-
suspendResult = this.
|
|
436
|
+
this.z4p_1 = suspendResult;
|
|
437
|
+
this.d9_1 = 2;
|
|
438
|
+
suspendResult = this.p4p_1.d3n_1.k4n_1(this.z4p_1.a3e(), this);
|
|
430
439
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
431
440
|
return suspendResult;
|
|
432
441
|
}
|
|
@@ -434,22 +443,22 @@
|
|
|
434
443
|
continue $sm;
|
|
435
444
|
case 2:
|
|
436
445
|
if (!suspendResult) {
|
|
437
|
-
return this.
|
|
446
|
+
return this.z4p_1;
|
|
438
447
|
} else {
|
|
439
|
-
this.
|
|
448
|
+
this.d9_1 = 3;
|
|
440
449
|
continue $sm;
|
|
441
450
|
}
|
|
442
451
|
|
|
443
452
|
case 3:
|
|
444
|
-
if (this.
|
|
445
|
-
return this.
|
|
446
|
-
this.
|
|
447
|
-
this.
|
|
448
|
-
this.
|
|
453
|
+
if (this.z4p_1.i3g().j3g().q2h(get_AuthCircuitBreaker()))
|
|
454
|
+
return this.z4p_1;
|
|
455
|
+
this.v4p_1 = this.z4p_1;
|
|
456
|
+
this.y4p_1 = HashSet_init_$Create$(this.q4p_1);
|
|
457
|
+
this.d9_1 = 4;
|
|
449
458
|
continue $sm;
|
|
450
459
|
case 4:
|
|
451
|
-
this.
|
|
452
|
-
suspendResult = this.
|
|
460
|
+
this.d9_1 = 5;
|
|
461
|
+
suspendResult = this.p4p_1.d3n_1.k4n_1(this.v4p_1.a3e(), this);
|
|
453
462
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
454
463
|
return suspendResult;
|
|
455
464
|
}
|
|
@@ -457,39 +466,39 @@
|
|
|
457
466
|
continue $sm;
|
|
458
467
|
case 5:
|
|
459
468
|
if (!suspendResult) {
|
|
460
|
-
this.
|
|
469
|
+
this.d9_1 = 9;
|
|
461
470
|
continue $sm;
|
|
462
471
|
}
|
|
463
472
|
|
|
464
473
|
var this_0 = get_LOGGER();
|
|
465
474
|
if (get_isTraceEnabled(this_0)) {
|
|
466
|
-
this_0.
|
|
475
|
+
this_0.i2q('Unauthorized response for ' + this.v4p_1.i3g().r3g().toString());
|
|
467
476
|
}
|
|
468
477
|
|
|
469
|
-
var tmp0_elvis_lhs = invoke$findProvider(this.
|
|
478
|
+
var tmp0_elvis_lhs = invoke$findProvider(this.v4p_1, this.y4p_1);
|
|
470
479
|
var tmp_0;
|
|
471
480
|
if (tmp0_elvis_lhs == null) {
|
|
472
|
-
this.
|
|
481
|
+
this.t4p_1;
|
|
473
482
|
var this_1 = get_LOGGER();
|
|
474
483
|
if (get_isTraceEnabled(this_1)) {
|
|
475
|
-
this_1.
|
|
484
|
+
this_1.i2q('Can not find auth provider for ' + this.v4p_1.i3g().r3g().toString());
|
|
476
485
|
}
|
|
477
|
-
return this.
|
|
486
|
+
return this.v4p_1;
|
|
478
487
|
} else {
|
|
479
488
|
tmp_0 = tmp0_elvis_lhs;
|
|
480
489
|
}
|
|
481
490
|
|
|
482
491
|
var _destruct__k2r9zo = tmp_0;
|
|
483
|
-
this.
|
|
484
|
-
this.
|
|
492
|
+
this.x4p_1 = _destruct__k2r9zo.ig();
|
|
493
|
+
this.w4p_1 = _destruct__k2r9zo.jg();
|
|
485
494
|
var this_2 = get_LOGGER();
|
|
486
495
|
if (get_isTraceEnabled(this_2)) {
|
|
487
|
-
this_2.
|
|
496
|
+
this_2.i2q('Using provider ' + toString(this.x4p_1) + ' for ' + this.v4p_1.i3g().r3g().toString());
|
|
488
497
|
}
|
|
489
498
|
|
|
490
|
-
this.
|
|
491
|
-
this.
|
|
492
|
-
suspendResult = invoke$refreshTokenIfNeeded(this.
|
|
499
|
+
this.y4p_1.i3(this.x4p_1);
|
|
500
|
+
this.d9_1 = 6;
|
|
501
|
+
suspendResult = invoke$refreshTokenIfNeeded(this.r4p_1, this.s4p_1, this.v4p_1, this.x4p_1, this.u4p_1, this);
|
|
493
502
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
494
503
|
return suspendResult;
|
|
495
504
|
}
|
|
@@ -497,97 +506,88 @@
|
|
|
497
506
|
continue $sm;
|
|
498
507
|
case 6:
|
|
499
508
|
if (!suspendResult) {
|
|
500
|
-
return this.
|
|
509
|
+
return this.v4p_1;
|
|
501
510
|
} else {
|
|
502
|
-
this.
|
|
511
|
+
this.d9_1 = 7;
|
|
503
512
|
continue $sm;
|
|
504
513
|
}
|
|
505
514
|
|
|
506
515
|
case 7:
|
|
507
|
-
this.
|
|
508
|
-
suspendResult = invoke$executeWithNewToken(this.
|
|
516
|
+
this.d9_1 = 8;
|
|
517
|
+
suspendResult = invoke$executeWithNewToken(this.t4p_1, this.v4p_1, this.x4p_1, this.u4p_1, this.w4p_1, this);
|
|
509
518
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
510
519
|
return suspendResult;
|
|
511
520
|
}
|
|
512
521
|
|
|
513
522
|
continue $sm;
|
|
514
523
|
case 8:
|
|
515
|
-
this.
|
|
516
|
-
this.
|
|
524
|
+
this.v4p_1 = suspendResult;
|
|
525
|
+
this.d9_1 = 4;
|
|
517
526
|
continue $sm;
|
|
518
527
|
case 9:
|
|
519
|
-
return this.
|
|
528
|
+
return this.v4p_1;
|
|
520
529
|
case 10:
|
|
521
|
-
throw this.
|
|
530
|
+
throw this.g9_1;
|
|
522
531
|
}
|
|
523
532
|
} catch ($p) {
|
|
524
533
|
var e = $p;
|
|
525
|
-
if (this.
|
|
534
|
+
if (this.e9_1 === 10) {
|
|
526
535
|
throw e;
|
|
527
536
|
} else {
|
|
528
|
-
this.
|
|
529
|
-
this.
|
|
537
|
+
this.d9_1 = this.e9_1;
|
|
538
|
+
this.g9_1 = e;
|
|
530
539
|
}
|
|
531
540
|
}
|
|
532
541
|
while (true);
|
|
533
542
|
};
|
|
534
|
-
protoOf(Auth$lambda$slambda_1).
|
|
535
|
-
var i = new Auth$lambda$slambda_1(this.
|
|
536
|
-
i.
|
|
537
|
-
i.
|
|
543
|
+
protoOf(Auth$lambda$slambda_1).j3u = function ($this$on, originalRequest, completion) {
|
|
544
|
+
var i = new Auth$lambda$slambda_1(this.p4p_1, this.q4p_1, this.r4p_1, this.s4p_1, completion);
|
|
545
|
+
i.t4p_1 = $this$on;
|
|
546
|
+
i.u4p_1 = originalRequest;
|
|
538
547
|
return i;
|
|
539
548
|
};
|
|
540
549
|
function Auth$lambda$slambda_2($this_createClientPlugin, $providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
541
550
|
var i = new Auth$lambda$slambda_1($this_createClientPlugin, $providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
542
551
|
var l = function ($this$on, originalRequest, $completion) {
|
|
543
|
-
return i.
|
|
552
|
+
return i.i3u($this$on, originalRequest, $completion);
|
|
544
553
|
};
|
|
545
554
|
l.$arity = 2;
|
|
546
555
|
return l;
|
|
547
556
|
}
|
|
548
|
-
function Auth$lambda$refreshTokenIfNeeded$lambda() {
|
|
549
|
-
_init_properties_Auth_kt__9ob1dk();
|
|
550
|
-
return new AtomicCounter();
|
|
551
|
-
}
|
|
552
|
-
function Auth$lambda$refreshTokenIfNeeded$lambda_0() {
|
|
553
|
-
_init_properties_Auth_kt__9ob1dk();
|
|
554
|
-
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
555
|
-
return LinkedHashMap_init_$Create$();
|
|
556
|
-
}
|
|
557
557
|
function $invoke$refreshTokenIfNeededCOROUTINE$(tokenVersions, tokenVersionsAttributeKey, call, provider, request, resultContinuation) {
|
|
558
558
|
CoroutineImpl.call(this, resultContinuation);
|
|
559
|
-
this.
|
|
560
|
-
this.
|
|
561
|
-
this.
|
|
562
|
-
this.
|
|
563
|
-
this.
|
|
559
|
+
this.v4n_1 = tokenVersions;
|
|
560
|
+
this.w4n_1 = tokenVersionsAttributeKey;
|
|
561
|
+
this.x4n_1 = call;
|
|
562
|
+
this.y4n_1 = provider;
|
|
563
|
+
this.z4n_1 = request;
|
|
564
564
|
}
|
|
565
|
-
protoOf($invoke$refreshTokenIfNeededCOROUTINE$).
|
|
566
|
-
var suspendResult = this.
|
|
565
|
+
protoOf($invoke$refreshTokenIfNeededCOROUTINE$).l9 = function () {
|
|
566
|
+
var suspendResult = this.f9_1;
|
|
567
567
|
$sm: do
|
|
568
568
|
try {
|
|
569
|
-
var tmp = this.
|
|
569
|
+
var tmp = this.d9_1;
|
|
570
570
|
switch (tmp) {
|
|
571
571
|
case 0:
|
|
572
|
-
this.
|
|
572
|
+
this.e9_1 = 4;
|
|
573
573
|
var tmp_0 = this;
|
|
574
|
-
tmp_0.
|
|
574
|
+
tmp_0.a4o_1 = this.v4n_1.x2p(this.y4n_1, Auth$lambda$refreshTokenIfNeeded$lambda);
|
|
575
575
|
var tmp_1 = this;
|
|
576
|
-
tmp_1.
|
|
577
|
-
var requestTokenVersion = this.
|
|
578
|
-
if (!(requestTokenVersion == null) && requestTokenVersion >= this.
|
|
576
|
+
tmp_1.b4o_1 = this.z4n_1.f3f_1.t2h(this.w4n_1, Auth$lambda$refreshTokenIfNeeded$lambda_0);
|
|
577
|
+
var requestTokenVersion = this.b4o_1.g3(this.y4n_1);
|
|
578
|
+
if (!(requestTokenVersion == null) && requestTokenVersion >= this.a4o_1.l4n_1.kotlinx$atomicfu$value) {
|
|
579
579
|
var this_0 = get_LOGGER();
|
|
580
580
|
if (get_isTraceEnabled(this_0)) {
|
|
581
|
-
this_0.
|
|
581
|
+
this_0.i2q('Refreshing token for ' + this.x4n_1.i3g().r3g().toString());
|
|
582
582
|
}
|
|
583
|
-
this.
|
|
584
|
-
suspendResult = this.
|
|
583
|
+
this.d9_1 = 1;
|
|
584
|
+
suspendResult = this.y4n_1.a4q(this.x4n_1.a3e(), this);
|
|
585
585
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
586
586
|
return suspendResult;
|
|
587
587
|
}
|
|
588
588
|
continue $sm;
|
|
589
589
|
} else {
|
|
590
|
-
this.
|
|
590
|
+
this.d9_1 = 3;
|
|
591
591
|
continue $sm;
|
|
592
592
|
}
|
|
593
593
|
|
|
@@ -595,71 +595,71 @@
|
|
|
595
595
|
if (!suspendResult) {
|
|
596
596
|
var this_1 = get_LOGGER();
|
|
597
597
|
if (get_isTraceEnabled(this_1)) {
|
|
598
|
-
this_1.
|
|
598
|
+
this_1.i2q('Refreshing token failed for ' + this.x4n_1.i3g().r3g().toString());
|
|
599
599
|
}
|
|
600
600
|
return false;
|
|
601
601
|
} else {
|
|
602
|
-
var tmp0 = this.
|
|
603
|
-
var tmp2 = this.
|
|
604
|
-
var value = this.
|
|
605
|
-
tmp0.
|
|
606
|
-
this.
|
|
602
|
+
var tmp0 = this.b4o_1;
|
|
603
|
+
var tmp2 = this.y4n_1;
|
|
604
|
+
var value = this.a4o_1.l4n_1.atomicfu$incrementAndGet();
|
|
605
|
+
tmp0.y2(tmp2, value);
|
|
606
|
+
this.d9_1 = 2;
|
|
607
607
|
continue $sm;
|
|
608
608
|
}
|
|
609
609
|
|
|
610
610
|
case 2:
|
|
611
|
-
this.
|
|
611
|
+
this.d9_1 = 3;
|
|
612
612
|
continue $sm;
|
|
613
613
|
case 3:
|
|
614
614
|
return true;
|
|
615
615
|
case 4:
|
|
616
|
-
throw this.
|
|
616
|
+
throw this.g9_1;
|
|
617
617
|
}
|
|
618
618
|
} catch ($p) {
|
|
619
619
|
var e = $p;
|
|
620
|
-
if (this.
|
|
620
|
+
if (this.e9_1 === 4) {
|
|
621
621
|
throw e;
|
|
622
622
|
} else {
|
|
623
|
-
this.
|
|
624
|
-
this.
|
|
623
|
+
this.d9_1 = this.e9_1;
|
|
624
|
+
this.g9_1 = e;
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
627
|
while (true);
|
|
628
628
|
};
|
|
629
629
|
function $invoke$executeWithNewTokenCOROUTINE$(_this__u8e3s4, call, provider, oldRequest, authHeader, resultContinuation) {
|
|
630
630
|
CoroutineImpl.call(this, resultContinuation);
|
|
631
|
-
this.
|
|
632
|
-
this.
|
|
633
|
-
this.
|
|
634
|
-
this.
|
|
635
|
-
this.
|
|
631
|
+
this.k4o_1 = _this__u8e3s4;
|
|
632
|
+
this.l4o_1 = call;
|
|
633
|
+
this.m4o_1 = provider;
|
|
634
|
+
this.n4o_1 = oldRequest;
|
|
635
|
+
this.o4o_1 = authHeader;
|
|
636
636
|
}
|
|
637
|
-
protoOf($invoke$executeWithNewTokenCOROUTINE$).
|
|
638
|
-
var suspendResult = this.
|
|
637
|
+
protoOf($invoke$executeWithNewTokenCOROUTINE$).l9 = function () {
|
|
638
|
+
var suspendResult = this.f9_1;
|
|
639
639
|
$sm: do
|
|
640
640
|
try {
|
|
641
|
-
var tmp = this.
|
|
641
|
+
var tmp = this.d9_1;
|
|
642
642
|
switch (tmp) {
|
|
643
643
|
case 0:
|
|
644
|
-
this.
|
|
645
|
-
this.
|
|
646
|
-
this.
|
|
647
|
-
this.
|
|
648
|
-
suspendResult = this.
|
|
644
|
+
this.e9_1 = 3;
|
|
645
|
+
this.p4o_1 = new HttpRequestBuilder();
|
|
646
|
+
this.p4o_1.s3k(this.n4o_1);
|
|
647
|
+
this.d9_1 = 1;
|
|
648
|
+
suspendResult = this.m4o_1.b4q(this.p4o_1, this.o4o_1, this);
|
|
649
649
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
650
650
|
return suspendResult;
|
|
651
651
|
}
|
|
652
652
|
|
|
653
653
|
continue $sm;
|
|
654
654
|
case 1:
|
|
655
|
-
this.
|
|
655
|
+
this.p4o_1.f3f_1.r2h(get_AuthCircuitBreaker(), Unit_instance);
|
|
656
656
|
var this_0 = get_LOGGER();
|
|
657
657
|
if (get_isTraceEnabled(this_0)) {
|
|
658
|
-
this_0.
|
|
658
|
+
this_0.i2q('Sending new request to ' + this.l4o_1.i3g().r3g().toString());
|
|
659
659
|
}
|
|
660
660
|
|
|
661
|
-
this.
|
|
662
|
-
suspendResult = this.
|
|
661
|
+
this.d9_1 = 2;
|
|
662
|
+
suspendResult = this.k4o_1.m3u(this.p4o_1, this);
|
|
663
663
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
664
664
|
return suspendResult;
|
|
665
665
|
}
|
|
@@ -668,15 +668,15 @@
|
|
|
668
668
|
case 2:
|
|
669
669
|
return suspendResult;
|
|
670
670
|
case 3:
|
|
671
|
-
throw this.
|
|
671
|
+
throw this.g9_1;
|
|
672
672
|
}
|
|
673
673
|
} catch ($p) {
|
|
674
674
|
var e = $p;
|
|
675
|
-
if (this.
|
|
675
|
+
if (this.e9_1 === 3) {
|
|
676
676
|
throw e;
|
|
677
677
|
} else {
|
|
678
|
-
this.
|
|
679
|
-
this.
|
|
678
|
+
this.d9_1 = this.e9_1;
|
|
679
|
+
this.g9_1 = e;
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
682
|
while (true);
|
|
@@ -742,32 +742,32 @@
|
|
|
742
742
|
}
|
|
743
743
|
function SetTokenContext() {
|
|
744
744
|
}
|
|
745
|
-
protoOf(SetTokenContext).
|
|
745
|
+
protoOf(SetTokenContext).q1 = function () {
|
|
746
746
|
return Companion_instance;
|
|
747
747
|
};
|
|
748
748
|
function AuthTokenHolder$setToken$slambda($block, resultContinuation) {
|
|
749
|
-
this.
|
|
749
|
+
this.l4q_1 = $block;
|
|
750
750
|
CoroutineImpl.call(this, resultContinuation);
|
|
751
751
|
}
|
|
752
|
-
protoOf(AuthTokenHolder$setToken$slambda).
|
|
753
|
-
var tmp = this.
|
|
754
|
-
tmp.
|
|
755
|
-
tmp.
|
|
756
|
-
return tmp.
|
|
752
|
+
protoOf(AuthTokenHolder$setToken$slambda).n4q = function ($this$withContext, $completion) {
|
|
753
|
+
var tmp = this.z1u($this$withContext, $completion);
|
|
754
|
+
tmp.f9_1 = Unit_instance;
|
|
755
|
+
tmp.g9_1 = null;
|
|
756
|
+
return tmp.l9();
|
|
757
757
|
};
|
|
758
|
-
protoOf(AuthTokenHolder$setToken$slambda).
|
|
759
|
-
return this.
|
|
758
|
+
protoOf(AuthTokenHolder$setToken$slambda).x9 = function (p1, $completion) {
|
|
759
|
+
return this.n4q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
760
760
|
};
|
|
761
|
-
protoOf(AuthTokenHolder$setToken$slambda).
|
|
762
|
-
var suspendResult = this.
|
|
761
|
+
protoOf(AuthTokenHolder$setToken$slambda).l9 = function () {
|
|
762
|
+
var suspendResult = this.f9_1;
|
|
763
763
|
$sm: do
|
|
764
764
|
try {
|
|
765
|
-
var tmp = this.
|
|
765
|
+
var tmp = this.d9_1;
|
|
766
766
|
switch (tmp) {
|
|
767
767
|
case 0:
|
|
768
|
-
this.
|
|
769
|
-
this.
|
|
770
|
-
suspendResult = this.
|
|
768
|
+
this.e9_1 = 2;
|
|
769
|
+
this.d9_1 = 1;
|
|
770
|
+
suspendResult = this.l4q_1(this);
|
|
771
771
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
772
772
|
return suspendResult;
|
|
773
773
|
}
|
|
@@ -776,60 +776,59 @@
|
|
|
776
776
|
case 1:
|
|
777
777
|
return suspendResult;
|
|
778
778
|
case 2:
|
|
779
|
-
throw this.
|
|
779
|
+
throw this.g9_1;
|
|
780
780
|
}
|
|
781
781
|
} catch ($p) {
|
|
782
782
|
var e = $p;
|
|
783
|
-
if (this.
|
|
783
|
+
if (this.e9_1 === 2) {
|
|
784
784
|
throw e;
|
|
785
785
|
} else {
|
|
786
|
-
this.
|
|
787
|
-
this.
|
|
786
|
+
this.d9_1 = this.e9_1;
|
|
787
|
+
this.g9_1 = e;
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
790
|
while (true);
|
|
791
791
|
};
|
|
792
|
-
protoOf(AuthTokenHolder$setToken$slambda).
|
|
793
|
-
var i = new AuthTokenHolder$setToken$slambda(this.
|
|
794
|
-
i.
|
|
792
|
+
protoOf(AuthTokenHolder$setToken$slambda).z1u = function ($this$withContext, completion) {
|
|
793
|
+
var i = new AuthTokenHolder$setToken$slambda(this.l4q_1, completion);
|
|
794
|
+
i.m4q_1 = $this$withContext;
|
|
795
795
|
return i;
|
|
796
796
|
};
|
|
797
797
|
function AuthTokenHolder$setToken$slambda_0($block, resultContinuation) {
|
|
798
798
|
var i = new AuthTokenHolder$setToken$slambda($block, resultContinuation);
|
|
799
799
|
var l = function ($this$withContext, $completion) {
|
|
800
|
-
return i.
|
|
800
|
+
return i.n4q($this$withContext, $completion);
|
|
801
801
|
};
|
|
802
802
|
l.$arity = 1;
|
|
803
803
|
return l;
|
|
804
804
|
}
|
|
805
805
|
function $loadTokenCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
806
806
|
CoroutineImpl.call(this, resultContinuation);
|
|
807
|
-
this.
|
|
807
|
+
this.w4q_1 = _this__u8e3s4;
|
|
808
808
|
}
|
|
809
|
-
protoOf($loadTokenCOROUTINE$).
|
|
810
|
-
var suspendResult = this.
|
|
809
|
+
protoOf($loadTokenCOROUTINE$).l9 = function () {
|
|
810
|
+
var suspendResult = this.f9_1;
|
|
811
811
|
$sm: do
|
|
812
812
|
try {
|
|
813
|
-
var tmp = this.
|
|
813
|
+
var tmp = this.d9_1;
|
|
814
814
|
switch (tmp) {
|
|
815
815
|
case 0:
|
|
816
|
-
this.
|
|
817
|
-
if (!(this.
|
|
818
|
-
return this.
|
|
819
|
-
this.
|
|
820
|
-
if (!(this.
|
|
821
|
-
this.
|
|
822
|
-
suspendResult = this.
|
|
816
|
+
this.e9_1 = 12;
|
|
817
|
+
if (!(this.w4q_1.d4r_1 == null))
|
|
818
|
+
return this.w4q_1.d4r_1;
|
|
819
|
+
this.b4r_1 = this.w4q_1.d4r_1;
|
|
820
|
+
if (!(this.j9().q9(Companion_instance) == null)) {
|
|
821
|
+
this.d9_1 = 10;
|
|
822
|
+
suspendResult = this.w4q_1.c4r_1(this);
|
|
823
823
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
824
824
|
return suspendResult;
|
|
825
825
|
}
|
|
826
826
|
continue $sm;
|
|
827
827
|
} else {
|
|
828
|
-
this.
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
this.
|
|
832
|
-
suspendResult = this.n4r_1.o1h(this.m4r_1, this);
|
|
828
|
+
this.z4q_1 = this.w4q_1.f4r_1;
|
|
829
|
+
this.y4q_1 = null;
|
|
830
|
+
this.d9_1 = 1;
|
|
831
|
+
suspendResult = this.z4q_1.a1h(this.y4q_1, this);
|
|
833
832
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
834
833
|
return suspendResult;
|
|
835
834
|
}
|
|
@@ -837,208 +836,207 @@
|
|
|
837
836
|
}
|
|
838
837
|
|
|
839
838
|
case 1:
|
|
840
|
-
this.
|
|
841
|
-
this.
|
|
839
|
+
this.a4r_1 = Unit_instance;
|
|
840
|
+
this.d9_1 = 2;
|
|
842
841
|
continue $sm;
|
|
843
842
|
case 2:
|
|
844
|
-
this.
|
|
845
|
-
this.
|
|
846
|
-
this.
|
|
843
|
+
this.e9_1 = 9;
|
|
844
|
+
this.w4q_1.e4r_1 = true;
|
|
845
|
+
this.d9_1 = 3;
|
|
847
846
|
continue $sm;
|
|
848
847
|
case 3:
|
|
849
|
-
this.
|
|
850
|
-
if (equals(this.
|
|
851
|
-
this.
|
|
852
|
-
suspendResult = this.
|
|
848
|
+
this.e9_1 = 8;
|
|
849
|
+
if (equals(this.b4r_1, this.w4q_1.d4r_1)) {
|
|
850
|
+
this.d9_1 = 4;
|
|
851
|
+
suspendResult = this.w4q_1.c4r_1(this);
|
|
853
852
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
854
853
|
return suspendResult;
|
|
855
854
|
}
|
|
856
855
|
continue $sm;
|
|
857
856
|
} else {
|
|
858
|
-
this.
|
|
857
|
+
this.d9_1 = 5;
|
|
859
858
|
continue $sm;
|
|
860
859
|
}
|
|
861
860
|
|
|
862
861
|
case 4:
|
|
863
862
|
var ARGUMENT = suspendResult;
|
|
864
|
-
this.
|
|
865
|
-
this.
|
|
863
|
+
this.w4q_1.d4r_1 = ARGUMENT;
|
|
864
|
+
this.d9_1 = 5;
|
|
866
865
|
continue $sm;
|
|
867
866
|
case 5:
|
|
868
|
-
this.
|
|
867
|
+
this.d9_1 = 6;
|
|
869
868
|
continue $sm;
|
|
870
869
|
case 6:
|
|
871
|
-
this.
|
|
872
|
-
this.
|
|
873
|
-
this.
|
|
874
|
-
this.
|
|
875
|
-
this.
|
|
870
|
+
this.e9_1 = 9;
|
|
871
|
+
this.w4q_1.e4r_1 = false;
|
|
872
|
+
this.a4r_1 = this.w4q_1.d4r_1;
|
|
873
|
+
this.e9_1 = 12;
|
|
874
|
+
this.d9_1 = 7;
|
|
876
875
|
continue $sm;
|
|
877
876
|
case 7:
|
|
878
|
-
var
|
|
879
|
-
this.
|
|
880
|
-
this.
|
|
881
|
-
this.
|
|
882
|
-
this.
|
|
877
|
+
var tmp_0 = this.a4r_1;
|
|
878
|
+
this.e9_1 = 12;
|
|
879
|
+
this.z4q_1.m1g(this.y4q_1);
|
|
880
|
+
this.x4q_1 = tmp_0;
|
|
881
|
+
this.d9_1 = 11;
|
|
883
882
|
continue $sm;
|
|
884
883
|
case 8:
|
|
885
|
-
this.
|
|
886
|
-
var t = this.
|
|
887
|
-
this.
|
|
884
|
+
this.e9_1 = 9;
|
|
885
|
+
var t = this.g9_1;
|
|
886
|
+
this.w4q_1.e4r_1 = false;
|
|
888
887
|
throw t;
|
|
889
888
|
case 9:
|
|
890
|
-
this.
|
|
891
|
-
var t_0 = this.
|
|
892
|
-
this.
|
|
889
|
+
this.e9_1 = 12;
|
|
890
|
+
var t_0 = this.g9_1;
|
|
891
|
+
this.z4q_1.m1g(this.y4q_1);
|
|
893
892
|
throw t_0;
|
|
894
893
|
case 10:
|
|
895
894
|
var ARGUMENT_0 = suspendResult;
|
|
896
|
-
this.
|
|
897
|
-
this.
|
|
898
|
-
this.
|
|
895
|
+
this.w4q_1.d4r_1 = ARGUMENT_0;
|
|
896
|
+
this.x4q_1 = this.w4q_1.d4r_1;
|
|
897
|
+
this.d9_1 = 11;
|
|
899
898
|
continue $sm;
|
|
900
899
|
case 11:
|
|
901
|
-
return this.
|
|
900
|
+
return this.x4q_1;
|
|
902
901
|
case 12:
|
|
903
|
-
throw this.
|
|
902
|
+
throw this.g9_1;
|
|
904
903
|
}
|
|
905
904
|
} catch ($p) {
|
|
906
905
|
var e = $p;
|
|
907
|
-
if (this.
|
|
906
|
+
if (this.e9_1 === 12) {
|
|
908
907
|
throw e;
|
|
909
908
|
} else {
|
|
910
|
-
this.
|
|
911
|
-
this.
|
|
909
|
+
this.d9_1 = this.e9_1;
|
|
910
|
+
this.g9_1 = e;
|
|
912
911
|
}
|
|
913
912
|
}
|
|
914
913
|
while (true);
|
|
915
914
|
};
|
|
916
915
|
function $setTokenCOROUTINE$(_this__u8e3s4, block, resultContinuation) {
|
|
917
916
|
CoroutineImpl.call(this, resultContinuation);
|
|
918
|
-
this.
|
|
919
|
-
this.
|
|
917
|
+
this.p4r_1 = _this__u8e3s4;
|
|
918
|
+
this.q4r_1 = block;
|
|
920
919
|
}
|
|
921
|
-
protoOf($setTokenCOROUTINE$).
|
|
922
|
-
var suspendResult = this.
|
|
920
|
+
protoOf($setTokenCOROUTINE$).l9 = function () {
|
|
921
|
+
var suspendResult = this.f9_1;
|
|
923
922
|
$sm: do
|
|
924
923
|
try {
|
|
925
|
-
var tmp = this.
|
|
924
|
+
var tmp = this.d9_1;
|
|
926
925
|
switch (tmp) {
|
|
927
926
|
case 0:
|
|
928
|
-
this.
|
|
929
|
-
this.
|
|
930
|
-
this.
|
|
931
|
-
this.
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
this.
|
|
935
|
-
suspendResult = this.g4s_1.o1h(this.f4s_1, this);
|
|
927
|
+
this.e9_1 = 7;
|
|
928
|
+
this.v4r_1 = this.p4r_1.d4r_1;
|
|
929
|
+
this.u4r_1 = this.p4r_1.e4r_1;
|
|
930
|
+
this.s4r_1 = this.p4r_1.f4r_1;
|
|
931
|
+
this.r4r_1 = null;
|
|
932
|
+
this.d9_1 = 1;
|
|
933
|
+
suspendResult = this.s4r_1.a1h(this.r4r_1, this);
|
|
936
934
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
937
935
|
return suspendResult;
|
|
938
936
|
}
|
|
939
937
|
|
|
940
938
|
continue $sm;
|
|
941
939
|
case 1:
|
|
942
|
-
this.
|
|
943
|
-
this.
|
|
940
|
+
this.t4r_1 = Unit_instance;
|
|
941
|
+
this.d9_1 = 2;
|
|
944
942
|
continue $sm;
|
|
945
943
|
case 2:
|
|
946
|
-
this.
|
|
947
|
-
if (equals(this.
|
|
948
|
-
this.
|
|
949
|
-
var
|
|
950
|
-
suspendResult = withContext(
|
|
944
|
+
this.e9_1 = 6;
|
|
945
|
+
if (equals(this.v4r_1, this.p4r_1.d4r_1) || this.u4r_1) {
|
|
946
|
+
this.d9_1 = 3;
|
|
947
|
+
var tmp_0 = this.j9().fh(this.p4r_1.g4r_1);
|
|
948
|
+
suspendResult = withContext(tmp_0, AuthTokenHolder$setToken$slambda_0(this.q4r_1, null), this);
|
|
951
949
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
952
950
|
return suspendResult;
|
|
953
951
|
}
|
|
954
952
|
continue $sm;
|
|
955
953
|
} else {
|
|
956
|
-
this.
|
|
954
|
+
this.d9_1 = 4;
|
|
957
955
|
continue $sm;
|
|
958
956
|
}
|
|
959
957
|
|
|
960
958
|
case 3:
|
|
961
959
|
var ARGUMENT = suspendResult;
|
|
962
|
-
this.
|
|
963
|
-
this.
|
|
960
|
+
this.p4r_1.d4r_1 = ARGUMENT;
|
|
961
|
+
this.d9_1 = 4;
|
|
964
962
|
continue $sm;
|
|
965
963
|
case 4:
|
|
966
|
-
this.
|
|
967
|
-
this.
|
|
968
|
-
this.
|
|
964
|
+
this.t4r_1 = this.p4r_1.d4r_1;
|
|
965
|
+
this.e9_1 = 7;
|
|
966
|
+
this.d9_1 = 5;
|
|
969
967
|
continue $sm;
|
|
970
968
|
case 5:
|
|
971
|
-
var
|
|
972
|
-
this.
|
|
973
|
-
this.
|
|
974
|
-
return
|
|
969
|
+
var tmp_1 = this.t4r_1;
|
|
970
|
+
this.e9_1 = 7;
|
|
971
|
+
this.s4r_1.m1g(this.r4r_1);
|
|
972
|
+
return tmp_1;
|
|
975
973
|
case 6:
|
|
976
|
-
this.
|
|
977
|
-
var t = this.
|
|
978
|
-
this.
|
|
974
|
+
this.e9_1 = 7;
|
|
975
|
+
var t = this.g9_1;
|
|
976
|
+
this.s4r_1.m1g(this.r4r_1);
|
|
979
977
|
throw t;
|
|
980
978
|
case 7:
|
|
981
|
-
throw this.
|
|
979
|
+
throw this.g9_1;
|
|
982
980
|
}
|
|
983
981
|
} catch ($p) {
|
|
984
982
|
var e = $p;
|
|
985
|
-
if (this.
|
|
983
|
+
if (this.e9_1 === 7) {
|
|
986
984
|
throw e;
|
|
987
985
|
} else {
|
|
988
|
-
this.
|
|
989
|
-
this.
|
|
986
|
+
this.d9_1 = this.e9_1;
|
|
987
|
+
this.g9_1 = e;
|
|
990
988
|
}
|
|
991
989
|
}
|
|
992
990
|
while (true);
|
|
993
991
|
};
|
|
994
992
|
function AuthTokenHolder(loadTokens) {
|
|
995
|
-
this.
|
|
996
|
-
this.
|
|
997
|
-
this.
|
|
998
|
-
this.
|
|
999
|
-
this.
|
|
993
|
+
this.c4r_1 = loadTokens;
|
|
994
|
+
this.d4r_1 = null;
|
|
995
|
+
this.e4r_1 = false;
|
|
996
|
+
this.f4r_1 = Mutex();
|
|
997
|
+
this.g4r_1 = new SetTokenContext();
|
|
1000
998
|
}
|
|
1001
|
-
protoOf(AuthTokenHolder).
|
|
999
|
+
protoOf(AuthTokenHolder).w4r = function ($completion) {
|
|
1002
1000
|
var tmp = new $loadTokenCOROUTINE$(this, $completion);
|
|
1003
|
-
tmp.
|
|
1004
|
-
tmp.
|
|
1005
|
-
return tmp.
|
|
1001
|
+
tmp.f9_1 = Unit_instance;
|
|
1002
|
+
tmp.g9_1 = null;
|
|
1003
|
+
return tmp.l9();
|
|
1006
1004
|
};
|
|
1007
|
-
protoOf(AuthTokenHolder).
|
|
1005
|
+
protoOf(AuthTokenHolder).x4r = function (block, $completion) {
|
|
1008
1006
|
var tmp = new $setTokenCOROUTINE$(this, block, $completion);
|
|
1009
|
-
tmp.
|
|
1010
|
-
tmp.
|
|
1011
|
-
return tmp.
|
|
1007
|
+
tmp.f9_1 = Unit_instance;
|
|
1008
|
+
tmp.g9_1 = null;
|
|
1009
|
+
return tmp.l9();
|
|
1012
1010
|
};
|
|
1013
1011
|
function bearer(_this__u8e3s4, block) {
|
|
1014
1012
|
// Inline function 'kotlin.apply' call
|
|
1015
1013
|
var this_0 = new BearerAuthConfig();
|
|
1016
1014
|
block(this_0);
|
|
1017
1015
|
// Inline function 'kotlin.with' call
|
|
1018
|
-
_this__u8e3s4.
|
|
1016
|
+
_this__u8e3s4.j4n_1.j1(new BearerAuthProvider(this_0.y4r_1, this_0.z4r_1, this_0.a4s_1, this_0.b4s_1));
|
|
1019
1017
|
}
|
|
1020
1018
|
function BearerAuthConfig$refreshTokens$slambda(resultContinuation) {
|
|
1021
1019
|
CoroutineImpl.call(this, resultContinuation);
|
|
1022
1020
|
}
|
|
1023
|
-
protoOf(BearerAuthConfig$refreshTokens$slambda).
|
|
1024
|
-
var tmp = this.
|
|
1025
|
-
tmp.
|
|
1026
|
-
tmp.
|
|
1027
|
-
return tmp.
|
|
1021
|
+
protoOf(BearerAuthConfig$refreshTokens$slambda).l4s = function (_this__u8e3s4, $completion) {
|
|
1022
|
+
var tmp = this.m4s(_this__u8e3s4, $completion);
|
|
1023
|
+
tmp.f9_1 = Unit_instance;
|
|
1024
|
+
tmp.g9_1 = null;
|
|
1025
|
+
return tmp.l9();
|
|
1028
1026
|
};
|
|
1029
|
-
protoOf(BearerAuthConfig$refreshTokens$slambda).
|
|
1030
|
-
return this.
|
|
1027
|
+
protoOf(BearerAuthConfig$refreshTokens$slambda).x9 = function (p1, $completion) {
|
|
1028
|
+
return this.l4s(p1 instanceof RefreshTokensParams ? p1 : THROW_CCE(), $completion);
|
|
1031
1029
|
};
|
|
1032
|
-
protoOf(BearerAuthConfig$refreshTokens$slambda).
|
|
1033
|
-
var suspendResult = this.
|
|
1030
|
+
protoOf(BearerAuthConfig$refreshTokens$slambda).l9 = function () {
|
|
1031
|
+
var suspendResult = this.f9_1;
|
|
1034
1032
|
$sm: do
|
|
1035
1033
|
try {
|
|
1036
|
-
var tmp = this.
|
|
1034
|
+
var tmp = this.d9_1;
|
|
1037
1035
|
if (tmp === 0) {
|
|
1038
|
-
this.
|
|
1036
|
+
this.e9_1 = 1;
|
|
1039
1037
|
return null;
|
|
1040
1038
|
} else if (tmp === 1) {
|
|
1041
|
-
throw this.
|
|
1039
|
+
throw this.g9_1;
|
|
1042
1040
|
}
|
|
1043
1041
|
} catch ($p) {
|
|
1044
1042
|
var e = $p;
|
|
@@ -1046,15 +1044,15 @@
|
|
|
1046
1044
|
}
|
|
1047
1045
|
while (true);
|
|
1048
1046
|
};
|
|
1049
|
-
protoOf(BearerAuthConfig$refreshTokens$slambda).
|
|
1047
|
+
protoOf(BearerAuthConfig$refreshTokens$slambda).m4s = function (_this__u8e3s4, completion) {
|
|
1050
1048
|
var i = new BearerAuthConfig$refreshTokens$slambda(completion);
|
|
1051
|
-
i.
|
|
1049
|
+
i.k4s_1 = _this__u8e3s4;
|
|
1052
1050
|
return i;
|
|
1053
1051
|
};
|
|
1054
1052
|
function BearerAuthConfig$refreshTokens$slambda_0(resultContinuation) {
|
|
1055
1053
|
var i = new BearerAuthConfig$refreshTokens$slambda(resultContinuation);
|
|
1056
1054
|
var l = function (_this__u8e3s4, $completion) {
|
|
1057
|
-
return i.
|
|
1055
|
+
return i.l4s(_this__u8e3s4, $completion);
|
|
1058
1056
|
};
|
|
1059
1057
|
l.$arity = 1;
|
|
1060
1058
|
return l;
|
|
@@ -1062,25 +1060,25 @@
|
|
|
1062
1060
|
function BearerAuthConfig$loadTokens$slambda(resultContinuation) {
|
|
1063
1061
|
CoroutineImpl.call(this, resultContinuation);
|
|
1064
1062
|
}
|
|
1065
|
-
protoOf(BearerAuthConfig$loadTokens$slambda).
|
|
1066
|
-
var tmp = this.
|
|
1067
|
-
tmp.
|
|
1068
|
-
tmp.
|
|
1069
|
-
return tmp.
|
|
1063
|
+
protoOf(BearerAuthConfig$loadTokens$slambda).v4s = function ($completion) {
|
|
1064
|
+
var tmp = this.w4s($completion);
|
|
1065
|
+
tmp.f9_1 = Unit_instance;
|
|
1066
|
+
tmp.g9_1 = null;
|
|
1067
|
+
return tmp.l9();
|
|
1070
1068
|
};
|
|
1071
|
-
protoOf(BearerAuthConfig$loadTokens$slambda).
|
|
1072
|
-
return this.
|
|
1069
|
+
protoOf(BearerAuthConfig$loadTokens$slambda).ua = function ($completion) {
|
|
1070
|
+
return this.v4s($completion);
|
|
1073
1071
|
};
|
|
1074
|
-
protoOf(BearerAuthConfig$loadTokens$slambda).
|
|
1075
|
-
var suspendResult = this.
|
|
1072
|
+
protoOf(BearerAuthConfig$loadTokens$slambda).l9 = function () {
|
|
1073
|
+
var suspendResult = this.f9_1;
|
|
1076
1074
|
$sm: do
|
|
1077
1075
|
try {
|
|
1078
|
-
var tmp = this.
|
|
1076
|
+
var tmp = this.d9_1;
|
|
1079
1077
|
if (tmp === 0) {
|
|
1080
|
-
this.
|
|
1078
|
+
this.e9_1 = 1;
|
|
1081
1079
|
return null;
|
|
1082
1080
|
} else if (tmp === 1) {
|
|
1083
|
-
throw this.
|
|
1081
|
+
throw this.g9_1;
|
|
1084
1082
|
}
|
|
1085
1083
|
} catch ($p) {
|
|
1086
1084
|
var e = $p;
|
|
@@ -1088,13 +1086,13 @@
|
|
|
1088
1086
|
}
|
|
1089
1087
|
while (true);
|
|
1090
1088
|
};
|
|
1091
|
-
protoOf(BearerAuthConfig$loadTokens$slambda).
|
|
1089
|
+
protoOf(BearerAuthConfig$loadTokens$slambda).w4s = function (completion) {
|
|
1092
1090
|
return new BearerAuthConfig$loadTokens$slambda(completion);
|
|
1093
1091
|
};
|
|
1094
1092
|
function BearerAuthConfig$loadTokens$slambda_0(resultContinuation) {
|
|
1095
1093
|
var i = new BearerAuthConfig$loadTokens$slambda(resultContinuation);
|
|
1096
1094
|
var l = function ($completion) {
|
|
1097
|
-
return i.
|
|
1095
|
+
return i.v4s($completion);
|
|
1098
1096
|
};
|
|
1099
1097
|
l.$arity = 0;
|
|
1100
1098
|
return l;
|
|
@@ -1104,73 +1102,73 @@
|
|
|
1104
1102
|
}
|
|
1105
1103
|
function BearerAuthConfig() {
|
|
1106
1104
|
var tmp = this;
|
|
1107
|
-
tmp.
|
|
1105
|
+
tmp.y4r_1 = BearerAuthConfig$refreshTokens$slambda_0(null);
|
|
1108
1106
|
var tmp_0 = this;
|
|
1109
|
-
tmp_0.
|
|
1107
|
+
tmp_0.z4r_1 = BearerAuthConfig$loadTokens$slambda_0(null);
|
|
1110
1108
|
var tmp_1 = this;
|
|
1111
|
-
tmp_1.
|
|
1112
|
-
this.
|
|
1109
|
+
tmp_1.a4s_1 = BearerAuthConfig$sendWithoutRequest$lambda;
|
|
1110
|
+
this.b4s_1 = null;
|
|
1113
1111
|
}
|
|
1114
|
-
protoOf(BearerAuthConfig).
|
|
1115
|
-
this.
|
|
1112
|
+
protoOf(BearerAuthConfig).x4s = function (block) {
|
|
1113
|
+
this.y4r_1 = block;
|
|
1116
1114
|
};
|
|
1117
1115
|
function RefreshTokensParams(client, response, oldTokens) {
|
|
1118
|
-
this.
|
|
1119
|
-
this.
|
|
1120
|
-
this.
|
|
1116
|
+
this.y4s_1 = client;
|
|
1117
|
+
this.z4s_1 = response;
|
|
1118
|
+
this.a4t_1 = oldTokens;
|
|
1121
1119
|
}
|
|
1122
|
-
protoOf(RefreshTokensParams).
|
|
1123
|
-
_this__u8e3s4.
|
|
1120
|
+
protoOf(RefreshTokensParams).b4t = function (_this__u8e3s4) {
|
|
1121
|
+
_this__u8e3s4.f3f_1.r2h(get_AuthCircuitBreaker(), Unit_instance);
|
|
1124
1122
|
};
|
|
1125
1123
|
function BearerTokens(accessToken, refreshToken) {
|
|
1126
|
-
this.
|
|
1127
|
-
this.
|
|
1124
|
+
this.c4t_1 = accessToken;
|
|
1125
|
+
this.d4t_1 = refreshToken;
|
|
1128
1126
|
}
|
|
1129
1127
|
function BearerAuthProvider$_init_$lambda_lcdiwf(it) {
|
|
1130
1128
|
return true;
|
|
1131
1129
|
}
|
|
1132
1130
|
function BearerAuthProvider$addRequestHeaders$lambda($token, $request) {
|
|
1133
1131
|
return function ($this$headers) {
|
|
1134
|
-
var tokenValue = 'Bearer ' + $token.
|
|
1132
|
+
var tokenValue = 'Bearer ' + $token.c4t_1;
|
|
1135
1133
|
var tmp;
|
|
1136
|
-
if ($this$headers.
|
|
1137
|
-
$this$headers.
|
|
1134
|
+
if ($this$headers.n2l(HttpHeaders_getInstance().j2t_1)) {
|
|
1135
|
+
$this$headers.c2m(HttpHeaders_getInstance().j2t_1);
|
|
1138
1136
|
tmp = Unit_instance;
|
|
1139
1137
|
}
|
|
1140
1138
|
var tmp_0;
|
|
1141
|
-
if (!$request.
|
|
1142
|
-
$this$headers.
|
|
1139
|
+
if (!$request.f3f_1.q2h(get_AuthCircuitBreaker())) {
|
|
1140
|
+
$this$headers.o2l(HttpHeaders_getInstance().j2t_1, tokenValue);
|
|
1143
1141
|
tmp_0 = Unit_instance;
|
|
1144
1142
|
}
|
|
1145
1143
|
return Unit_instance;
|
|
1146
1144
|
};
|
|
1147
1145
|
}
|
|
1148
1146
|
function BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation) {
|
|
1149
|
-
this.
|
|
1150
|
-
this.
|
|
1147
|
+
this.m4t_1 = this$0;
|
|
1148
|
+
this.n4t_1 = $response;
|
|
1151
1149
|
CoroutineImpl.call(this, resultContinuation);
|
|
1152
1150
|
}
|
|
1153
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1154
|
-
var tmp = this.
|
|
1155
|
-
tmp.
|
|
1156
|
-
tmp.
|
|
1157
|
-
return tmp.
|
|
1151
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).q4t = function ($completion) {
|
|
1152
|
+
var tmp = this.w4s($completion);
|
|
1153
|
+
tmp.f9_1 = Unit_instance;
|
|
1154
|
+
tmp.g9_1 = null;
|
|
1155
|
+
return tmp.l9();
|
|
1158
1156
|
};
|
|
1159
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1160
|
-
return this.
|
|
1157
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).ua = function ($completion) {
|
|
1158
|
+
return this.q4t($completion);
|
|
1161
1159
|
};
|
|
1162
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1163
|
-
var suspendResult = this.
|
|
1160
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).l9 = function () {
|
|
1161
|
+
var suspendResult = this.f9_1;
|
|
1164
1162
|
$sm: do
|
|
1165
1163
|
try {
|
|
1166
|
-
var tmp = this.
|
|
1164
|
+
var tmp = this.d9_1;
|
|
1167
1165
|
switch (tmp) {
|
|
1168
1166
|
case 0:
|
|
1169
|
-
this.
|
|
1170
|
-
this.
|
|
1171
|
-
this.
|
|
1172
|
-
this.
|
|
1173
|
-
suspendResult = this.
|
|
1167
|
+
this.e9_1 = 3;
|
|
1168
|
+
this.o4t_1 = this.m4t_1.r4t_1;
|
|
1169
|
+
this.p4t_1 = this.n4t_1.p3g().v3d_1;
|
|
1170
|
+
this.d9_1 = 1;
|
|
1171
|
+
suspendResult = this.m4t_1.u4t_1.w4r(this);
|
|
1174
1172
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1175
1173
|
return suspendResult;
|
|
1176
1174
|
}
|
|
@@ -1178,9 +1176,9 @@
|
|
|
1178
1176
|
continue $sm;
|
|
1179
1177
|
case 1:
|
|
1180
1178
|
var ARGUMENT = suspendResult;
|
|
1181
|
-
var ARGUMENT_0 = new RefreshTokensParams(this.
|
|
1182
|
-
this.
|
|
1183
|
-
suspendResult = this.
|
|
1179
|
+
var ARGUMENT_0 = new RefreshTokensParams(this.p4t_1, this.n4t_1, ARGUMENT);
|
|
1180
|
+
this.d9_1 = 2;
|
|
1181
|
+
suspendResult = this.o4t_1(ARGUMENT_0, this);
|
|
1184
1182
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1185
1183
|
return suspendResult;
|
|
1186
1184
|
}
|
|
@@ -1189,46 +1187,46 @@
|
|
|
1189
1187
|
case 2:
|
|
1190
1188
|
return suspendResult;
|
|
1191
1189
|
case 3:
|
|
1192
|
-
throw this.
|
|
1190
|
+
throw this.g9_1;
|
|
1193
1191
|
}
|
|
1194
1192
|
} catch ($p) {
|
|
1195
1193
|
var e = $p;
|
|
1196
|
-
if (this.
|
|
1194
|
+
if (this.e9_1 === 3) {
|
|
1197
1195
|
throw e;
|
|
1198
1196
|
} else {
|
|
1199
|
-
this.
|
|
1200
|
-
this.
|
|
1197
|
+
this.d9_1 = this.e9_1;
|
|
1198
|
+
this.g9_1 = e;
|
|
1201
1199
|
}
|
|
1202
1200
|
}
|
|
1203
1201
|
while (true);
|
|
1204
1202
|
};
|
|
1205
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1206
|
-
return new BearerAuthProvider$refreshToken$slambda(this.
|
|
1203
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).w4s = function (completion) {
|
|
1204
|
+
return new BearerAuthProvider$refreshToken$slambda(this.m4t_1, this.n4t_1, completion);
|
|
1207
1205
|
};
|
|
1208
1206
|
function BearerAuthProvider$refreshToken$slambda_0(this$0, $response, resultContinuation) {
|
|
1209
1207
|
var i = new BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation);
|
|
1210
1208
|
var l = function ($completion) {
|
|
1211
|
-
return i.
|
|
1209
|
+
return i.q4t($completion);
|
|
1212
1210
|
};
|
|
1213
1211
|
l.$arity = 0;
|
|
1214
1212
|
return l;
|
|
1215
1213
|
}
|
|
1216
1214
|
function $addRequestHeadersCOROUTINE$(_this__u8e3s4, request, authHeader, resultContinuation) {
|
|
1217
1215
|
CoroutineImpl.call(this, resultContinuation);
|
|
1218
|
-
this.
|
|
1219
|
-
this.
|
|
1220
|
-
this.
|
|
1216
|
+
this.d4u_1 = _this__u8e3s4;
|
|
1217
|
+
this.e4u_1 = request;
|
|
1218
|
+
this.f4u_1 = authHeader;
|
|
1221
1219
|
}
|
|
1222
|
-
protoOf($addRequestHeadersCOROUTINE$).
|
|
1223
|
-
var suspendResult = this.
|
|
1220
|
+
protoOf($addRequestHeadersCOROUTINE$).l9 = function () {
|
|
1221
|
+
var suspendResult = this.f9_1;
|
|
1224
1222
|
$sm: do
|
|
1225
1223
|
try {
|
|
1226
|
-
var tmp = this.
|
|
1224
|
+
var tmp = this.d9_1;
|
|
1227
1225
|
switch (tmp) {
|
|
1228
1226
|
case 0:
|
|
1229
|
-
this.
|
|
1230
|
-
this.
|
|
1231
|
-
suspendResult = this.
|
|
1227
|
+
this.e9_1 = 2;
|
|
1228
|
+
this.d9_1 = 1;
|
|
1229
|
+
suspendResult = this.d4u_1.u4t_1.w4r(this);
|
|
1232
1230
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1233
1231
|
return suspendResult;
|
|
1234
1232
|
}
|
|
@@ -1244,37 +1242,37 @@
|
|
|
1244
1242
|
}
|
|
1245
1243
|
|
|
1246
1244
|
var token = tmp_0;
|
|
1247
|
-
headers(this.
|
|
1245
|
+
headers(this.e4u_1, BearerAuthProvider$addRequestHeaders$lambda(token, this.e4u_1));
|
|
1248
1246
|
return Unit_instance;
|
|
1249
1247
|
case 2:
|
|
1250
|
-
throw this.
|
|
1248
|
+
throw this.g9_1;
|
|
1251
1249
|
}
|
|
1252
1250
|
} catch ($p) {
|
|
1253
1251
|
var e = $p;
|
|
1254
|
-
if (this.
|
|
1252
|
+
if (this.e9_1 === 2) {
|
|
1255
1253
|
throw e;
|
|
1256
1254
|
} else {
|
|
1257
|
-
this.
|
|
1258
|
-
this.
|
|
1255
|
+
this.d9_1 = this.e9_1;
|
|
1256
|
+
this.g9_1 = e;
|
|
1259
1257
|
}
|
|
1260
1258
|
}
|
|
1261
1259
|
while (true);
|
|
1262
1260
|
};
|
|
1263
1261
|
function $refreshTokenCOROUTINE$(_this__u8e3s4, response, resultContinuation) {
|
|
1264
1262
|
CoroutineImpl.call(this, resultContinuation);
|
|
1265
|
-
this.
|
|
1266
|
-
this.
|
|
1263
|
+
this.o4u_1 = _this__u8e3s4;
|
|
1264
|
+
this.p4u_1 = response;
|
|
1267
1265
|
}
|
|
1268
|
-
protoOf($refreshTokenCOROUTINE$).
|
|
1269
|
-
var suspendResult = this.
|
|
1266
|
+
protoOf($refreshTokenCOROUTINE$).l9 = function () {
|
|
1267
|
+
var suspendResult = this.f9_1;
|
|
1270
1268
|
$sm: do
|
|
1271
1269
|
try {
|
|
1272
|
-
var tmp = this.
|
|
1270
|
+
var tmp = this.d9_1;
|
|
1273
1271
|
switch (tmp) {
|
|
1274
1272
|
case 0:
|
|
1275
|
-
this.
|
|
1276
|
-
this.
|
|
1277
|
-
suspendResult = this.
|
|
1273
|
+
this.e9_1 = 2;
|
|
1274
|
+
this.d9_1 = 1;
|
|
1275
|
+
suspendResult = this.o4u_1.u4t_1.x4r(BearerAuthProvider$refreshToken$slambda_0(this.o4u_1, this.p4u_1, null), this);
|
|
1278
1276
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1279
1277
|
return suspendResult;
|
|
1280
1278
|
}
|
|
@@ -1284,15 +1282,15 @@
|
|
|
1284
1282
|
var newToken = suspendResult;
|
|
1285
1283
|
return !(newToken == null);
|
|
1286
1284
|
case 2:
|
|
1287
|
-
throw this.
|
|
1285
|
+
throw this.g9_1;
|
|
1288
1286
|
}
|
|
1289
1287
|
} catch ($p) {
|
|
1290
1288
|
var e = $p;
|
|
1291
|
-
if (this.
|
|
1289
|
+
if (this.e9_1 === 2) {
|
|
1292
1290
|
throw e;
|
|
1293
1291
|
} else {
|
|
1294
|
-
this.
|
|
1295
|
-
this.
|
|
1292
|
+
this.d9_1 = this.e9_1;
|
|
1293
|
+
this.g9_1 = e;
|
|
1296
1294
|
}
|
|
1297
1295
|
}
|
|
1298
1296
|
while (true);
|
|
@@ -1305,57 +1303,57 @@
|
|
|
1305
1303
|
tmp = sendWithoutRequestCallback;
|
|
1306
1304
|
}
|
|
1307
1305
|
sendWithoutRequestCallback = tmp;
|
|
1308
|
-
this.
|
|
1309
|
-
this.
|
|
1310
|
-
this.
|
|
1311
|
-
this.
|
|
1306
|
+
this.r4t_1 = refreshTokens;
|
|
1307
|
+
this.s4t_1 = sendWithoutRequestCallback;
|
|
1308
|
+
this.t4t_1 = realm;
|
|
1309
|
+
this.u4t_1 = new AuthTokenHolder(loadTokens);
|
|
1312
1310
|
}
|
|
1313
|
-
protoOf(BearerAuthProvider).
|
|
1311
|
+
protoOf(BearerAuthProvider).c4q = function () {
|
|
1314
1312
|
var message = 'Deprecated';
|
|
1315
1313
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1316
1314
|
};
|
|
1317
|
-
protoOf(BearerAuthProvider).
|
|
1318
|
-
return this.
|
|
1315
|
+
protoOf(BearerAuthProvider).f4p = function (request) {
|
|
1316
|
+
return this.s4t_1(request);
|
|
1319
1317
|
};
|
|
1320
|
-
protoOf(BearerAuthProvider).
|
|
1321
|
-
if (!(auth.
|
|
1322
|
-
get_LOGGER().
|
|
1318
|
+
protoOf(BearerAuthProvider).m4n = function (auth) {
|
|
1319
|
+
if (!(auth.r32_1 === 'Bearer')) {
|
|
1320
|
+
get_LOGGER().i2q('Bearer Auth Provider is not applicable for ' + auth.toString());
|
|
1323
1321
|
return false;
|
|
1324
1322
|
}
|
|
1325
1323
|
var tmp;
|
|
1326
|
-
if (this.
|
|
1324
|
+
if (this.t4t_1 == null) {
|
|
1327
1325
|
tmp = true;
|
|
1328
1326
|
} else {
|
|
1329
1327
|
if (!(auth instanceof Parameterized)) {
|
|
1330
1328
|
tmp = false;
|
|
1331
1329
|
} else {
|
|
1332
|
-
tmp = auth.
|
|
1330
|
+
tmp = auth.v2s('realm') == this.t4t_1;
|
|
1333
1331
|
}
|
|
1334
1332
|
}
|
|
1335
1333
|
var isSameRealm = tmp;
|
|
1336
1334
|
if (!isSameRealm) {
|
|
1337
|
-
get_LOGGER().
|
|
1335
|
+
get_LOGGER().i2q('Bearer Auth Provider is not applicable for this realm');
|
|
1338
1336
|
}
|
|
1339
1337
|
return isSameRealm;
|
|
1340
1338
|
};
|
|
1341
|
-
protoOf(BearerAuthProvider).
|
|
1339
|
+
protoOf(BearerAuthProvider).b4q = function (request, authHeader, $completion) {
|
|
1342
1340
|
var tmp = new $addRequestHeadersCOROUTINE$(this, request, authHeader, $completion);
|
|
1343
|
-
tmp.
|
|
1344
|
-
tmp.
|
|
1345
|
-
return tmp.
|
|
1341
|
+
tmp.f9_1 = Unit_instance;
|
|
1342
|
+
tmp.g9_1 = null;
|
|
1343
|
+
return tmp.l9();
|
|
1346
1344
|
};
|
|
1347
|
-
protoOf(BearerAuthProvider).
|
|
1345
|
+
protoOf(BearerAuthProvider).a4q = function (response, $completion) {
|
|
1348
1346
|
var tmp = new $refreshTokenCOROUTINE$(this, response, $completion);
|
|
1349
|
-
tmp.
|
|
1350
|
-
tmp.
|
|
1351
|
-
return tmp.
|
|
1347
|
+
tmp.f9_1 = Unit_instance;
|
|
1348
|
+
tmp.g9_1 = null;
|
|
1349
|
+
return tmp.l9();
|
|
1352
1350
|
};
|
|
1353
1351
|
//region block: post-declaration
|
|
1354
|
-
protoOf(SetTokenContext).
|
|
1352
|
+
protoOf(SetTokenContext).q9 = get;
|
|
1355
1353
|
protoOf(SetTokenContext).eh = fold;
|
|
1356
1354
|
protoOf(SetTokenContext).dh = minusKey;
|
|
1357
1355
|
protoOf(SetTokenContext).fh = plus;
|
|
1358
|
-
protoOf(BearerAuthProvider).
|
|
1356
|
+
protoOf(BearerAuthProvider).g4p = addRequestHeaders$default;
|
|
1359
1357
|
//endregion
|
|
1360
1358
|
//region block: init
|
|
1361
1359
|
Companion_instance = new Companion();
|