@doordeck/doordeck-headless-sdk 0.71.0 → 0.72.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 +14 -14
- package/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js +1344 -1344
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +35 -35
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +9 -9
- package/kotlin/doordeck-sdk.d.ts +463 -489
- package/kotlin/doordeck-sdk.js +28975 -28999
- package/kotlin/kotlin-kotlin-stdlib.js +2284 -2785
- package/kotlin/kotlin-kotlinx-atomicfu-runtime.js +6 -0
- package/kotlin/kotlinx-atomicfu.js +19 -19
- package/kotlin/kotlinx-coroutines-core.js +2188 -2804
- package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +2 -198
- package/kotlin/kotlinx-io-kotlinx-io-core.js +463 -536
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1939 -1939
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1684 -1733
- package/kotlin/ktor-ktor-client-ktor-client-core.js +3074 -3401
- package/kotlin/ktor-ktor-client-ktor-client-js.js +6 -0
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js +438 -540
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js +271 -372
- package/kotlin/ktor-ktor-http.js +906 -1012
- package/kotlin/ktor-ktor-io.js +880 -1782
- package/kotlin/ktor-ktor-shared-ktor-events.js +13 -13
- 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 +282 -282
- package/kotlin/ktor-ktor-shared-ktor-serialization.js +137 -137
- package/kotlin/ktor-ktor-shared-ktor-websockets.js +57 -57
- package/kotlin/ktor-ktor-utils.js +668 -758
- package/package.json +2 -2
- package/kotlin/ktor-ktor-http-ktor-http-cio.js +0 -2009
|
@@ -1,60 +1,57 @@
|
|
|
1
|
-
(function (_, kotlin_kotlin,
|
|
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 CoroutineImpl = kotlin_kotlin.$_$.t9;
|
|
5
|
-
var Unit_instance = kotlin_kotlin.$_$.j5;
|
|
6
|
-
var protoOf = kotlin_kotlin.$_$.sb;
|
|
7
|
-
var THROW_CCE = kotlin_kotlin.$_$.lf;
|
|
8
|
-
var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.y;
|
|
9
|
-
var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.j;
|
|
10
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.wa;
|
|
11
|
-
var VOID = kotlin_kotlin.$_$.h;
|
|
12
4
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.p;
|
|
13
|
-
var
|
|
5
|
+
var protoOf = kotlin_kotlin.$_$.jb;
|
|
6
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ja;
|
|
14
7
|
var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
|
|
15
|
-
var toList = kotlin_kotlin.$_$.
|
|
8
|
+
var toList = kotlin_kotlin.$_$.k8;
|
|
16
9
|
var ConcurrentMap = kotlin_io_ktor_ktor_utils.$_$.c;
|
|
17
|
-
var KtMutableMap = kotlin_kotlin.$_$.
|
|
10
|
+
var KtMutableMap = kotlin_kotlin.$_$.s5;
|
|
18
11
|
var getKClass = kotlin_kotlin.$_$.f;
|
|
19
|
-
var arrayOf = kotlin_kotlin.$_$.
|
|
12
|
+
var arrayOf = kotlin_kotlin.$_$.jf;
|
|
20
13
|
var createKType = kotlin_kotlin.$_$.c;
|
|
21
14
|
var createInvariantKTypeProjection = kotlin_kotlin.$_$.a;
|
|
22
|
-
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.
|
|
23
|
-
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.
|
|
24
|
-
var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.
|
|
15
|
+
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.w4;
|
|
16
|
+
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.k;
|
|
17
|
+
var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.m;
|
|
25
18
|
var Send_instance = kotlin_io_ktor_ktor_client_core.$_$.b;
|
|
26
|
-
var
|
|
27
|
-
var
|
|
19
|
+
var Unit_instance = kotlin_kotlin.$_$.g5;
|
|
20
|
+
var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.e;
|
|
21
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.b6;
|
|
28
22
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.o;
|
|
29
|
-
var parseAuthorizationHeaders = kotlin_io_ktor_ktor_http.$_$.
|
|
30
|
-
var flatten = kotlin_kotlin.$_$.
|
|
31
|
-
var emptyList = kotlin_kotlin.$_$.
|
|
32
|
-
var to = kotlin_kotlin.$_$.
|
|
33
|
-
var
|
|
34
|
-
var first = kotlin_kotlin.$_$.f7;
|
|
23
|
+
var parseAuthorizationHeaders = kotlin_io_ktor_ktor_http.$_$.k;
|
|
24
|
+
var flatten = kotlin_kotlin.$_$.a7;
|
|
25
|
+
var emptyList = kotlin_kotlin.$_$.s6;
|
|
26
|
+
var to = kotlin_kotlin.$_$.xf;
|
|
27
|
+
var first = kotlin_kotlin.$_$.z6;
|
|
35
28
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.y;
|
|
29
|
+
var CoroutineImpl = kotlin_kotlin.$_$.l9;
|
|
30
|
+
var THROW_CCE = kotlin_kotlin.$_$.ve;
|
|
36
31
|
var OnRequestContext = kotlin_io_ktor_ktor_client_core.$_$.e;
|
|
37
32
|
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.s;
|
|
38
|
-
var toString = kotlin_kotlin.$_$.
|
|
39
|
-
var
|
|
33
|
+
var toString = kotlin_kotlin.$_$.nb;
|
|
34
|
+
var VOID = kotlin_kotlin.$_$.h;
|
|
35
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.v8;
|
|
36
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.oa;
|
|
40
37
|
var Sender = kotlin_io_ktor_ktor_client_core.$_$.f;
|
|
38
|
+
var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.h;
|
|
41
39
|
var HashSet_init_$Create$ = kotlin_kotlin.$_$.w;
|
|
42
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
40
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.la;
|
|
43
41
|
var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.g;
|
|
44
|
-
var Unit = kotlin_kotlin.$_$.
|
|
42
|
+
var Unit = kotlin_kotlin.$_$.gf;
|
|
45
43
|
var createClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.i;
|
|
46
|
-
var KtList = kotlin_kotlin.$_$.
|
|
47
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
48
|
-
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
49
|
-
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.
|
|
50
|
-
var CompletableDeferred_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
44
|
+
var KtList = kotlin_kotlin.$_$.n5;
|
|
45
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.na;
|
|
46
|
+
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q;
|
|
47
|
+
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.vf;
|
|
48
|
+
var CompletableDeferred_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p;
|
|
51
49
|
var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
|
|
52
50
|
var headers = kotlin_io_ktor_ktor_client_core.$_$.v;
|
|
53
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.
|
|
54
|
-
var Parameterized = kotlin_io_ktor_ktor_http.$_$.
|
|
51
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.y1;
|
|
52
|
+
var Parameterized = kotlin_io_ktor_ktor_http.$_$.j;
|
|
55
53
|
//endregion
|
|
56
54
|
//region block: pre-declaration
|
|
57
|
-
initMetadataForLambda(AuthConfig$isUnauthorizedResponse$slambda, CoroutineImpl, VOID, [1]);
|
|
58
55
|
initMetadataForClass(AuthConfig, 'AuthConfig', AuthConfig);
|
|
59
56
|
initMetadataForClass(AtomicCounter, 'AtomicCounter', AtomicCounter);
|
|
60
57
|
initMetadataForLambda(Auth$lambda$slambda, CoroutineImpl, VOID, [3]);
|
|
@@ -62,11 +59,11 @@
|
|
|
62
59
|
initMetadataForCoroutine($invoke$refreshTokenIfNeededCOROUTINE$0, CoroutineImpl);
|
|
63
60
|
initMetadataForCoroutine($invoke$executeWithNewTokenCOROUTINE$1, CoroutineImpl);
|
|
64
61
|
function sendWithoutRequest(request) {
|
|
65
|
-
return this.
|
|
62
|
+
return this.v43();
|
|
66
63
|
}
|
|
67
64
|
function addRequestHeaders$default(request, authHeader, $completion, $super) {
|
|
68
65
|
authHeader = authHeader === VOID ? null : authHeader;
|
|
69
|
-
return $super === VOID ? this.
|
|
66
|
+
return $super === VOID ? this.u43(request, authHeader, $completion) : $super.u43.call(this, request, authHeader, $completion);
|
|
70
67
|
}
|
|
71
68
|
function refreshToken(response, $completion) {
|
|
72
69
|
return true;
|
|
@@ -75,8 +72,8 @@
|
|
|
75
72
|
initMetadataForCoroutine($loadTokenCOROUTINE$2, CoroutineImpl);
|
|
76
73
|
initMetadataForCoroutine($setTokenCOROUTINE$3, CoroutineImpl);
|
|
77
74
|
initMetadataForClass(AuthTokenHolder, 'AuthTokenHolder', VOID, VOID, VOID, [0, 1]);
|
|
78
|
-
initMetadataForLambda(BearerAuthConfig$
|
|
79
|
-
initMetadataForLambda(BearerAuthConfig$
|
|
75
|
+
initMetadataForLambda(BearerAuthConfig$_refreshTokens$slambda, CoroutineImpl, VOID, [1]);
|
|
76
|
+
initMetadataForLambda(BearerAuthConfig$_loadTokens$slambda, CoroutineImpl, VOID, [0]);
|
|
80
77
|
initMetadataForClass(BearerAuthConfig, 'BearerAuthConfig', BearerAuthConfig);
|
|
81
78
|
initMetadataForClass(RefreshTokensParams, 'RefreshTokensParams');
|
|
82
79
|
initMetadataForClass(BearerTokens, 'BearerTokens');
|
|
@@ -105,57 +102,13 @@
|
|
|
105
102
|
return AuthProvidersKey;
|
|
106
103
|
}
|
|
107
104
|
var AuthProvidersKey;
|
|
108
|
-
function AuthConfig$isUnauthorizedResponse$slambda(resultContinuation) {
|
|
109
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
110
|
-
}
|
|
111
|
-
protoOf(AuthConfig$isUnauthorizedResponse$slambda).v4f = function (it, $completion) {
|
|
112
|
-
var tmp = this.r3i(it, $completion);
|
|
113
|
-
tmp.i9_1 = Unit_instance;
|
|
114
|
-
tmp.j9_1 = null;
|
|
115
|
-
return tmp.o9();
|
|
116
|
-
};
|
|
117
|
-
protoOf(AuthConfig$isUnauthorizedResponse$slambda).ca = function (p1, $completion) {
|
|
118
|
-
return this.v4f(p1 instanceof HttpResponse ? p1 : THROW_CCE(), $completion);
|
|
119
|
-
};
|
|
120
|
-
protoOf(AuthConfig$isUnauthorizedResponse$slambda).o9 = function () {
|
|
121
|
-
var suspendResult = this.i9_1;
|
|
122
|
-
$sm: do
|
|
123
|
-
try {
|
|
124
|
-
var tmp = this.g9_1;
|
|
125
|
-
if (tmp === 0) {
|
|
126
|
-
this.h9_1 = 1;
|
|
127
|
-
return this.u4f_1.u3b().equals(Companion_getInstance().g2t_1);
|
|
128
|
-
} else if (tmp === 1) {
|
|
129
|
-
throw this.j9_1;
|
|
130
|
-
}
|
|
131
|
-
} catch ($p) {
|
|
132
|
-
var e = $p;
|
|
133
|
-
throw e;
|
|
134
|
-
}
|
|
135
|
-
while (true);
|
|
136
|
-
};
|
|
137
|
-
protoOf(AuthConfig$isUnauthorizedResponse$slambda).r3i = function (it, completion) {
|
|
138
|
-
var i = new AuthConfig$isUnauthorizedResponse$slambda(completion);
|
|
139
|
-
i.u4f_1 = it;
|
|
140
|
-
return i;
|
|
141
|
-
};
|
|
142
|
-
function AuthConfig$isUnauthorizedResponse$slambda_0(resultContinuation) {
|
|
143
|
-
var i = new AuthConfig$isUnauthorizedResponse$slambda(resultContinuation);
|
|
144
|
-
var l = function (it, $completion) {
|
|
145
|
-
return i.v4f(it, $completion);
|
|
146
|
-
};
|
|
147
|
-
l.$arity = 1;
|
|
148
|
-
return l;
|
|
149
|
-
}
|
|
150
105
|
function AuthConfig() {
|
|
151
106
|
var tmp = this;
|
|
152
107
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
153
|
-
tmp.
|
|
154
|
-
var tmp_0 = this;
|
|
155
|
-
tmp_0.x4f_1 = AuthConfig$isUnauthorizedResponse$slambda_0(null);
|
|
108
|
+
tmp.u40_1 = ArrayList_init_$Create$();
|
|
156
109
|
}
|
|
157
110
|
function AtomicCounter() {
|
|
158
|
-
this.
|
|
111
|
+
this.v40_1 = atomic$int$1(0);
|
|
159
112
|
}
|
|
160
113
|
function AuthConfig$_init_$ref_ms3pb9() {
|
|
161
114
|
var l = function () {
|
|
@@ -166,8 +119,8 @@
|
|
|
166
119
|
}
|
|
167
120
|
function Auth$lambda($this$createClientPlugin) {
|
|
168
121
|
_init_properties_Auth_kt__9ob1dk();
|
|
169
|
-
var providers = toList($this$createClientPlugin.
|
|
170
|
-
$this$createClientPlugin.
|
|
122
|
+
var providers = toList($this$createClientPlugin.y33_1.u40_1);
|
|
123
|
+
$this$createClientPlugin.x33_1.p2t_1.b27(get_AuthProvidersKey(), providers);
|
|
171
124
|
var tokenVersions = new ConcurrentMap();
|
|
172
125
|
// Inline function 'io.ktor.util.AttributeKey' call
|
|
173
126
|
var name = 'ProviderVersionAttributeKey';
|
|
@@ -176,7 +129,7 @@
|
|
|
176
129
|
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
177
130
|
var tmp_0;
|
|
178
131
|
try {
|
|
179
|
-
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);
|
|
180
133
|
} catch ($p) {
|
|
181
134
|
var tmp_1;
|
|
182
135
|
if ($p instanceof Error) {
|
|
@@ -190,13 +143,13 @@
|
|
|
190
143
|
var tmp$ret$0 = tmp_0;
|
|
191
144
|
var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
|
|
192
145
|
var tokenVersionsAttributeKey = new AttributeKey(name, tmp$ret$1);
|
|
193
|
-
$this$createClientPlugin.
|
|
146
|
+
$this$createClientPlugin.f3m(Auth$lambda$slambda_0(providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
194
147
|
var tmp_2 = Send_instance;
|
|
195
|
-
$this$createClientPlugin.
|
|
148
|
+
$this$createClientPlugin.b34(tmp_2, Auth$lambda$slambda_2(providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
196
149
|
return Unit_instance;
|
|
197
150
|
}
|
|
198
151
|
function invoke$findProvider(call, candidateProviders) {
|
|
199
|
-
var headerValues = call.
|
|
152
|
+
var headerValues = call.m2u().g2j().p28(HttpHeaders_getInstance().f2i_1);
|
|
200
153
|
var tmp;
|
|
201
154
|
if (headerValues == null) {
|
|
202
155
|
tmp = null;
|
|
@@ -220,16 +173,10 @@
|
|
|
220
173
|
if (authHeaders.h() && candidateProviders.s() === 1) {
|
|
221
174
|
tmp_0 = to(first(candidateProviders), null);
|
|
222
175
|
} else if (authHeaders.h()) {
|
|
223
|
-
|
|
224
|
-
var this_0 = get_LOGGER();
|
|
225
|
-
if (get_isTraceEnabled(this_0)) {
|
|
226
|
-
// Inline function 'io.ktor.client.plugins.auth.Auth$lambda.invoke.findProvider.<anonymous>' call
|
|
227
|
-
var tmp$ret$3 = 'Unauthorized response ' + call.q3b().t3b().toString() + ' has no or empty "WWW-Authenticate" header. ' + 'Can not add or refresh token';
|
|
228
|
-
this_0.c2l(tmp$ret$3);
|
|
229
|
-
}
|
|
176
|
+
get_LOGGER().c2d('401 response ' + call.v2x().y2x().toString() + ' has no or empty "WWW-Authenticate" header. ' + 'Can not add or refresh token');
|
|
230
177
|
tmp_0 = null;
|
|
231
178
|
} else {
|
|
232
|
-
var tmp$ret$
|
|
179
|
+
var tmp$ret$9;
|
|
233
180
|
$l$block_0: {
|
|
234
181
|
// Inline function 'kotlin.collections.firstNotNullOfOrNull' call
|
|
235
182
|
var _iterator__ex2g4s_0 = authHeaders.p();
|
|
@@ -237,21 +184,21 @@
|
|
|
237
184
|
var element = _iterator__ex2g4s_0.r();
|
|
238
185
|
// Inline function 'io.ktor.client.plugins.auth.Auth$lambda.invoke.findProvider.<anonymous>' call
|
|
239
186
|
// Inline function 'kotlin.collections.find' call
|
|
240
|
-
var tmp$ret$
|
|
187
|
+
var tmp$ret$4;
|
|
241
188
|
$l$block: {
|
|
242
189
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
243
190
|
var _iterator__ex2g4s_1 = candidateProviders.p();
|
|
244
191
|
while (_iterator__ex2g4s_1.q()) {
|
|
245
192
|
var element_0 = _iterator__ex2g4s_1.r();
|
|
246
193
|
// Inline function 'io.ktor.client.plugins.auth.Auth$lambda.invoke.findProvider.<anonymous>.<anonymous>' call
|
|
247
|
-
if (element_0.
|
|
248
|
-
tmp$ret$
|
|
194
|
+
if (element_0.w40(element)) {
|
|
195
|
+
tmp$ret$4 = element_0;
|
|
249
196
|
break $l$block;
|
|
250
197
|
}
|
|
251
198
|
}
|
|
252
|
-
tmp$ret$
|
|
199
|
+
tmp$ret$4 = null;
|
|
253
200
|
}
|
|
254
|
-
var tmp0_safe_receiver = tmp$ret$
|
|
201
|
+
var tmp0_safe_receiver = tmp$ret$4;
|
|
255
202
|
var tmp_1;
|
|
256
203
|
if (tmp0_safe_receiver == null) {
|
|
257
204
|
tmp_1 = null;
|
|
@@ -262,27 +209,27 @@
|
|
|
262
209
|
}
|
|
263
210
|
var result = tmp_1;
|
|
264
211
|
if (!(result == null)) {
|
|
265
|
-
tmp$ret$
|
|
212
|
+
tmp$ret$9 = result;
|
|
266
213
|
break $l$block_0;
|
|
267
214
|
}
|
|
268
215
|
}
|
|
269
|
-
tmp$ret$
|
|
216
|
+
tmp$ret$9 = null;
|
|
270
217
|
}
|
|
271
|
-
tmp_0 = tmp$ret$
|
|
218
|
+
tmp_0 = tmp$ret$9;
|
|
272
219
|
}
|
|
273
220
|
return tmp_0;
|
|
274
221
|
}
|
|
275
222
|
function invoke$refreshTokenIfNeeded(tokenVersions, tokenVersionsAttributeKey, call, provider, request, $completion) {
|
|
276
223
|
var tmp = new $invoke$refreshTokenIfNeededCOROUTINE$0(tokenVersions, tokenVersionsAttributeKey, call, provider, request, $completion);
|
|
277
|
-
tmp.
|
|
278
|
-
tmp.
|
|
279
|
-
return tmp.
|
|
224
|
+
tmp.f9_1 = Unit_instance;
|
|
225
|
+
tmp.g9_1 = null;
|
|
226
|
+
return tmp.l9();
|
|
280
227
|
}
|
|
281
228
|
function invoke$executeWithNewToken(_this__u8e3s4, call, provider, oldRequest, authHeader, $completion) {
|
|
282
229
|
var tmp = new $invoke$executeWithNewTokenCOROUTINE$1(_this__u8e3s4, call, provider, oldRequest, authHeader, $completion);
|
|
283
|
-
tmp.
|
|
284
|
-
tmp.
|
|
285
|
-
return tmp.
|
|
230
|
+
tmp.f9_1 = Unit_instance;
|
|
231
|
+
tmp.g9_1 = null;
|
|
232
|
+
return tmp.l9();
|
|
286
233
|
}
|
|
287
234
|
function Auth$lambda$slambda$lambda() {
|
|
288
235
|
return new AtomicCounter();
|
|
@@ -292,263 +239,224 @@
|
|
|
292
239
|
return LinkedHashMap_init_$Create$();
|
|
293
240
|
}
|
|
294
241
|
function Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
295
|
-
this.
|
|
296
|
-
this.
|
|
297
|
-
this.
|
|
242
|
+
this.j42_1 = $providers;
|
|
243
|
+
this.k42_1 = $tokenVersions;
|
|
244
|
+
this.l42_1 = $tokenVersionsAttributeKey;
|
|
298
245
|
CoroutineImpl.call(this, resultContinuation);
|
|
299
246
|
}
|
|
300
|
-
protoOf(Auth$lambda$slambda).
|
|
301
|
-
var tmp = this.
|
|
302
|
-
tmp.
|
|
303
|
-
tmp.
|
|
304
|
-
return tmp.
|
|
247
|
+
protoOf(Auth$lambda$slambda).s3m = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
248
|
+
var tmp = this.t3m($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
249
|
+
tmp.f9_1 = Unit_instance;
|
|
250
|
+
tmp.g9_1 = null;
|
|
251
|
+
return tmp.l9();
|
|
305
252
|
};
|
|
306
|
-
protoOf(Auth$lambda$slambda).
|
|
253
|
+
protoOf(Auth$lambda$slambda).u3m = function (p1, p2, p3, $completion) {
|
|
307
254
|
var tmp = p1 instanceof OnRequestContext ? p1 : THROW_CCE();
|
|
308
255
|
var tmp_0 = p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE();
|
|
309
|
-
return this.
|
|
256
|
+
return this.s3m(tmp, tmp_0, !(p3 == null) ? p3 : THROW_CCE(), $completion);
|
|
310
257
|
};
|
|
311
|
-
protoOf(Auth$lambda$slambda).
|
|
312
|
-
var suspendResult = this.
|
|
258
|
+
protoOf(Auth$lambda$slambda).l9 = function () {
|
|
259
|
+
var suspendResult = this.f9_1;
|
|
313
260
|
$sm: do
|
|
314
261
|
try {
|
|
315
|
-
var tmp = this.
|
|
262
|
+
var tmp = this.d9_1;
|
|
316
263
|
switch (tmp) {
|
|
317
264
|
case 0:
|
|
318
|
-
this.
|
|
265
|
+
this.e9_1 = 4;
|
|
319
266
|
var tmp_0 = this;
|
|
320
|
-
var tmp0 = this.
|
|
267
|
+
var tmp0 = this.j42_1;
|
|
321
268
|
var destination = ArrayList_init_$Create$();
|
|
322
269
|
var _iterator__ex2g4s = tmp0.p();
|
|
323
270
|
while (_iterator__ex2g4s.q()) {
|
|
324
271
|
var element = _iterator__ex2g4s.r();
|
|
325
|
-
if (element.
|
|
272
|
+
if (element.x42(this.n42_1)) {
|
|
326
273
|
destination.k(element);
|
|
327
274
|
}
|
|
328
275
|
}
|
|
329
276
|
|
|
330
|
-
tmp_0.
|
|
331
|
-
this.
|
|
332
|
-
this.
|
|
333
|
-
this.
|
|
277
|
+
tmp_0.p42_1 = destination;
|
|
278
|
+
this.q42_1 = this.p42_1;
|
|
279
|
+
this.r42_1 = this.q42_1.p();
|
|
280
|
+
this.d9_1 = 1;
|
|
334
281
|
continue $sm;
|
|
335
282
|
case 1:
|
|
336
|
-
if (!this.
|
|
337
|
-
this.
|
|
283
|
+
if (!this.r42_1.q()) {
|
|
284
|
+
this.d9_1 = 3;
|
|
338
285
|
continue $sm;
|
|
339
286
|
}
|
|
340
287
|
|
|
341
|
-
this.
|
|
288
|
+
this.s42_1 = this.r42_1.r();
|
|
342
289
|
var tmp_1 = this;
|
|
343
|
-
tmp_1.
|
|
344
|
-
this.
|
|
345
|
-
|
|
346
|
-
if (get_isTraceEnabled(this_0)) {
|
|
347
|
-
this_0.c2l('Adding auth headers for ' + this.q4h_1.h39_1.toString() + ' from provider ' + toString(this.x4h_1));
|
|
348
|
-
}
|
|
349
|
-
|
|
290
|
+
tmp_1.t42_1 = this.s42_1;
|
|
291
|
+
this.u42_1 = this.t42_1;
|
|
292
|
+
get_LOGGER().c2d('Adding auth headers for ' + this.n42_1.m2v_1.toString() + ' from provider ' + toString(this.u42_1));
|
|
350
293
|
var tmp_2 = this;
|
|
351
|
-
tmp_2.
|
|
294
|
+
tmp_2.v42_1 = this.k42_1.u2c(this.u42_1, Auth$lambda$slambda$lambda);
|
|
352
295
|
var tmp_3 = this;
|
|
353
|
-
tmp_3.
|
|
354
|
-
var
|
|
355
|
-
var
|
|
356
|
-
var value = this.
|
|
357
|
-
|
|
358
|
-
this.
|
|
359
|
-
suspendResult = this.
|
|
296
|
+
tmp_3.w42_1 = this.n42_1.r2v_1.d27(this.l42_1, Auth$lambda$slambda$lambda_0);
|
|
297
|
+
var tmp0_0 = this.w42_1;
|
|
298
|
+
var tmp1 = this.u42_1;
|
|
299
|
+
var value = this.v42_1.v40_1.kotlinx$atomicfu$value;
|
|
300
|
+
tmp0_0.n2(tmp1, value);
|
|
301
|
+
this.d9_1 = 2;
|
|
302
|
+
suspendResult = this.u42_1.y42(this.n42_1, VOID, this);
|
|
360
303
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
361
304
|
return suspendResult;
|
|
362
305
|
}
|
|
363
306
|
|
|
364
307
|
continue $sm;
|
|
365
308
|
case 2:
|
|
366
|
-
this.
|
|
309
|
+
this.d9_1 = 1;
|
|
367
310
|
continue $sm;
|
|
368
311
|
case 3:
|
|
369
312
|
return Unit_instance;
|
|
370
313
|
case 4:
|
|
371
|
-
throw this.
|
|
314
|
+
throw this.g9_1;
|
|
372
315
|
}
|
|
373
316
|
} catch ($p) {
|
|
374
317
|
var e = $p;
|
|
375
|
-
if (this.
|
|
318
|
+
if (this.e9_1 === 4) {
|
|
376
319
|
throw e;
|
|
377
320
|
} else {
|
|
378
|
-
this.
|
|
379
|
-
this.
|
|
321
|
+
this.d9_1 = this.e9_1;
|
|
322
|
+
this.g9_1 = e;
|
|
380
323
|
}
|
|
381
324
|
}
|
|
382
325
|
while (true);
|
|
383
326
|
};
|
|
384
|
-
protoOf(Auth$lambda$slambda).
|
|
385
|
-
var i = new Auth$lambda$slambda(this.
|
|
386
|
-
i.
|
|
387
|
-
i.
|
|
388
|
-
i.
|
|
327
|
+
protoOf(Auth$lambda$slambda).t3m = function ($this$onRequest, request, _unused_var__etf5q3, completion) {
|
|
328
|
+
var i = new Auth$lambda$slambda(this.j42_1, this.k42_1, this.l42_1, completion);
|
|
329
|
+
i.m42_1 = $this$onRequest;
|
|
330
|
+
i.n42_1 = request;
|
|
331
|
+
i.o42_1 = _unused_var__etf5q3;
|
|
389
332
|
return i;
|
|
390
333
|
};
|
|
391
334
|
function Auth$lambda$slambda_0($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
392
335
|
var i = new Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
393
336
|
var l = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
394
|
-
return i.
|
|
337
|
+
return i.s3m($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
395
338
|
};
|
|
396
339
|
l.$arity = 3;
|
|
397
340
|
return l;
|
|
398
341
|
}
|
|
399
|
-
function Auth$lambda$slambda_1($
|
|
400
|
-
this.
|
|
401
|
-
this.
|
|
402
|
-
this.
|
|
403
|
-
this.n4i_1 = $tokenVersionsAttributeKey;
|
|
342
|
+
function Auth$lambda$slambda_1($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
343
|
+
this.h43_1 = $providers;
|
|
344
|
+
this.i43_1 = $tokenVersions;
|
|
345
|
+
this.j43_1 = $tokenVersionsAttributeKey;
|
|
404
346
|
CoroutineImpl.call(this, resultContinuation);
|
|
405
347
|
}
|
|
406
|
-
protoOf(Auth$lambda$slambda_1).
|
|
407
|
-
var tmp = this.
|
|
408
|
-
tmp.
|
|
409
|
-
tmp.
|
|
410
|
-
return tmp.
|
|
348
|
+
protoOf(Auth$lambda$slambda_1).a3d = function ($this$on, originalRequest, $completion) {
|
|
349
|
+
var tmp = this.b3d($this$on, originalRequest, $completion);
|
|
350
|
+
tmp.f9_1 = Unit_instance;
|
|
351
|
+
tmp.g9_1 = null;
|
|
352
|
+
return tmp.l9();
|
|
411
353
|
};
|
|
412
|
-
protoOf(Auth$lambda$slambda_1).
|
|
354
|
+
protoOf(Auth$lambda$slambda_1).w9 = function (p1, p2, $completion) {
|
|
413
355
|
var tmp = p1 instanceof Sender ? p1 : THROW_CCE();
|
|
414
|
-
return this.
|
|
356
|
+
return this.a3d(tmp, p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE(), $completion);
|
|
415
357
|
};
|
|
416
|
-
protoOf(Auth$lambda$slambda_1).
|
|
417
|
-
var suspendResult = this.
|
|
358
|
+
protoOf(Auth$lambda$slambda_1).l9 = function () {
|
|
359
|
+
var suspendResult = this.f9_1;
|
|
418
360
|
$sm: do
|
|
419
361
|
try {
|
|
420
|
-
var tmp = this.
|
|
362
|
+
var tmp = this.d9_1;
|
|
421
363
|
switch (tmp) {
|
|
422
364
|
case 0:
|
|
423
|
-
this.
|
|
424
|
-
this.
|
|
425
|
-
suspendResult = this.
|
|
365
|
+
this.e9_1 = 7;
|
|
366
|
+
this.d9_1 = 1;
|
|
367
|
+
suspendResult = this.k43_1.e3d(this.l43_1, this);
|
|
426
368
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
427
369
|
return suspendResult;
|
|
428
370
|
}
|
|
429
371
|
|
|
430
372
|
continue $sm;
|
|
431
373
|
case 1:
|
|
432
|
-
this.
|
|
433
|
-
this.
|
|
434
|
-
|
|
435
|
-
if (
|
|
436
|
-
return
|
|
437
|
-
|
|
438
|
-
|
|
374
|
+
this.m43_1 = suspendResult;
|
|
375
|
+
if (!this.m43_1.m2u().z2x().equals(Companion_getInstance().t2k_1))
|
|
376
|
+
return this.m43_1;
|
|
377
|
+
if (this.m43_1.v2x().b2x().a27(get_AuthCircuitBreaker()))
|
|
378
|
+
return this.m43_1;
|
|
379
|
+
this.n43_1 = this.m43_1;
|
|
380
|
+
this.o43_1 = HashSet_init_$Create$(this.h43_1);
|
|
381
|
+
this.d9_1 = 2;
|
|
439
382
|
continue $sm;
|
|
440
383
|
case 2:
|
|
441
|
-
this.
|
|
442
|
-
|
|
443
|
-
return this.q4i_1;
|
|
444
|
-
} else {
|
|
445
|
-
this.g9_1 = 3;
|
|
384
|
+
if (!this.n43_1.m2u().z2x().equals(Companion_getInstance().t2k_1)) {
|
|
385
|
+
this.d9_1 = 6;
|
|
446
386
|
continue $sm;
|
|
447
387
|
}
|
|
448
388
|
|
|
449
|
-
|
|
450
|
-
if (this.q4i_1.q3b().p3a().w2e(get_AuthCircuitBreaker()))
|
|
451
|
-
return this.q4i_1;
|
|
452
|
-
this.s4i_1 = this.q4i_1;
|
|
453
|
-
this.t4i_1 = HashSet_init_$Create$(this.l4i_1);
|
|
454
|
-
this.g9_1 = 4;
|
|
455
|
-
continue $sm;
|
|
456
|
-
case 4:
|
|
457
|
-
this.g9_1 = 5;
|
|
458
|
-
suspendResult = this.k4i_1.r3h_1.x4f_1(this.s4i_1.h38(), this);
|
|
459
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
460
|
-
return suspendResult;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
continue $sm;
|
|
464
|
-
case 5:
|
|
465
|
-
if (!suspendResult) {
|
|
466
|
-
this.g9_1 = 9;
|
|
467
|
-
continue $sm;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
var this_0 = get_LOGGER();
|
|
471
|
-
if (get_isTraceEnabled(this_0)) {
|
|
472
|
-
this_0.c2l('Unauthorized response for ' + this.s4i_1.q3b().t3b().toString());
|
|
473
|
-
}
|
|
474
|
-
|
|
389
|
+
get_LOGGER().c2d('Received 401 for ' + this.n43_1.v2x().y2x().toString());
|
|
475
390
|
var tmp_0 = this;
|
|
476
|
-
var tmp0_elvis_lhs = invoke$findProvider(this.
|
|
391
|
+
var tmp0_elvis_lhs = invoke$findProvider(this.n43_1, this.o43_1);
|
|
477
392
|
var tmp_1;
|
|
478
393
|
if (tmp0_elvis_lhs == null) {
|
|
479
|
-
this.
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
this_1.c2l('Can not find auth provider for ' + this.s4i_1.q3b().t3b().toString());
|
|
483
|
-
}
|
|
484
|
-
return this.s4i_1;
|
|
394
|
+
this.k43_1;
|
|
395
|
+
get_LOGGER().c2d('Can not find auth provider for ' + this.n43_1.v2x().y2x().toString());
|
|
396
|
+
return this.n43_1;
|
|
485
397
|
} else {
|
|
486
398
|
tmp_1 = tmp0_elvis_lhs;
|
|
487
399
|
}
|
|
488
400
|
|
|
489
|
-
tmp_0.
|
|
490
|
-
this.
|
|
491
|
-
this.
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
this.t4i_1.d2(this.v4i_1);
|
|
498
|
-
this.g9_1 = 6;
|
|
499
|
-
suspendResult = invoke$refreshTokenIfNeeded(this.m4i_1, this.n4i_1, this.s4i_1, this.v4i_1, this.p4i_1, this);
|
|
401
|
+
tmp_0.p43_1 = tmp_1;
|
|
402
|
+
this.q43_1 = this.p43_1.cg();
|
|
403
|
+
this.r43_1 = this.p43_1.dg();
|
|
404
|
+
get_LOGGER().c2d('Using provider ' + toString(this.q43_1) + ' for ' + this.n43_1.v2x().y2x().toString());
|
|
405
|
+
this.o43_1.d2(this.q43_1);
|
|
406
|
+
this.d9_1 = 3;
|
|
407
|
+
suspendResult = invoke$refreshTokenIfNeeded(this.i43_1, this.j43_1, this.n43_1, this.q43_1, this.l43_1, this);
|
|
500
408
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
501
409
|
return suspendResult;
|
|
502
410
|
}
|
|
503
411
|
|
|
504
412
|
continue $sm;
|
|
505
|
-
case
|
|
506
|
-
this.
|
|
507
|
-
if (!this.
|
|
508
|
-
return this.
|
|
413
|
+
case 3:
|
|
414
|
+
this.s43_1 = suspendResult;
|
|
415
|
+
if (!this.s43_1) {
|
|
416
|
+
return this.n43_1;
|
|
509
417
|
} else {
|
|
510
|
-
this.
|
|
418
|
+
this.d9_1 = 4;
|
|
511
419
|
continue $sm;
|
|
512
420
|
}
|
|
513
421
|
|
|
514
|
-
case
|
|
515
|
-
this.
|
|
516
|
-
suspendResult = invoke$executeWithNewToken(this.
|
|
422
|
+
case 4:
|
|
423
|
+
this.d9_1 = 5;
|
|
424
|
+
suspendResult = invoke$executeWithNewToken(this.k43_1, this.n43_1, this.q43_1, this.l43_1, this.r43_1, this);
|
|
517
425
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
518
426
|
return suspendResult;
|
|
519
427
|
}
|
|
520
428
|
|
|
521
429
|
continue $sm;
|
|
522
|
-
case
|
|
523
|
-
this.
|
|
524
|
-
this.
|
|
430
|
+
case 5:
|
|
431
|
+
this.n43_1 = suspendResult;
|
|
432
|
+
this.d9_1 = 2;
|
|
525
433
|
continue $sm;
|
|
526
|
-
case
|
|
527
|
-
return this.
|
|
528
|
-
case
|
|
529
|
-
throw this.
|
|
434
|
+
case 6:
|
|
435
|
+
return this.n43_1;
|
|
436
|
+
case 7:
|
|
437
|
+
throw this.g9_1;
|
|
530
438
|
}
|
|
531
439
|
} catch ($p) {
|
|
532
440
|
var e = $p;
|
|
533
|
-
if (this.
|
|
441
|
+
if (this.e9_1 === 7) {
|
|
534
442
|
throw e;
|
|
535
443
|
} else {
|
|
536
|
-
this.
|
|
537
|
-
this.
|
|
444
|
+
this.d9_1 = this.e9_1;
|
|
445
|
+
this.g9_1 = e;
|
|
538
446
|
}
|
|
539
447
|
}
|
|
540
448
|
while (true);
|
|
541
449
|
};
|
|
542
|
-
protoOf(Auth$lambda$slambda_1).
|
|
543
|
-
var i = new Auth$lambda$slambda_1(this.
|
|
544
|
-
i.
|
|
545
|
-
i.
|
|
450
|
+
protoOf(Auth$lambda$slambda_1).b3d = function ($this$on, originalRequest, completion) {
|
|
451
|
+
var i = new Auth$lambda$slambda_1(this.h43_1, this.i43_1, this.j43_1, completion);
|
|
452
|
+
i.k43_1 = $this$on;
|
|
453
|
+
i.l43_1 = originalRequest;
|
|
546
454
|
return i;
|
|
547
455
|
};
|
|
548
|
-
function Auth$lambda$slambda_2($
|
|
549
|
-
var i = new Auth$lambda$slambda_1($
|
|
456
|
+
function Auth$lambda$slambda_2($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
457
|
+
var i = new Auth$lambda$slambda_1($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
550
458
|
var l = function ($this$on, originalRequest, $completion) {
|
|
551
|
-
return i.
|
|
459
|
+
return i.a3d($this$on, originalRequest, $completion);
|
|
552
460
|
};
|
|
553
461
|
l.$arity = 2;
|
|
554
462
|
return l;
|
|
@@ -564,111 +472,101 @@
|
|
|
564
472
|
}
|
|
565
473
|
function $invoke$refreshTokenIfNeededCOROUTINE$0(tokenVersions, tokenVersionsAttributeKey, call, provider, request, resultContinuation) {
|
|
566
474
|
CoroutineImpl.call(this, resultContinuation);
|
|
567
|
-
this.
|
|
568
|
-
this.
|
|
569
|
-
this.
|
|
570
|
-
this.
|
|
571
|
-
this.
|
|
475
|
+
this.f41_1 = tokenVersions;
|
|
476
|
+
this.g41_1 = tokenVersionsAttributeKey;
|
|
477
|
+
this.h41_1 = call;
|
|
478
|
+
this.i41_1 = provider;
|
|
479
|
+
this.j41_1 = request;
|
|
572
480
|
}
|
|
573
|
-
protoOf($invoke$refreshTokenIfNeededCOROUTINE$0).
|
|
574
|
-
var suspendResult = this.
|
|
481
|
+
protoOf($invoke$refreshTokenIfNeededCOROUTINE$0).l9 = function () {
|
|
482
|
+
var suspendResult = this.f9_1;
|
|
575
483
|
$sm: do
|
|
576
484
|
try {
|
|
577
|
-
var tmp = this.
|
|
485
|
+
var tmp = this.d9_1;
|
|
578
486
|
switch (tmp) {
|
|
579
487
|
case 0:
|
|
580
|
-
this.
|
|
488
|
+
this.e9_1 = 4;
|
|
581
489
|
var tmp_0 = this;
|
|
582
|
-
tmp_0.
|
|
490
|
+
tmp_0.k41_1 = this.f41_1.u2c(this.i41_1, Auth$lambda$refreshTokenIfNeeded$lambda);
|
|
583
491
|
var tmp_1 = this;
|
|
584
|
-
tmp_1.
|
|
585
|
-
this.
|
|
586
|
-
if (!(this.
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
}
|
|
591
|
-
this.g9_1 = 1;
|
|
592
|
-
suspendResult = this.l4g_1.y4i(this.k4g_1.h38(), this);
|
|
492
|
+
tmp_1.l41_1 = this.j41_1.r2v_1.d27(this.g41_1, Auth$lambda$refreshTokenIfNeeded$lambda_0);
|
|
493
|
+
this.m41_1 = this.l41_1.k2(this.i41_1);
|
|
494
|
+
if (!(this.m41_1 == null) && this.m41_1 >= this.k41_1.v40_1.kotlinx$atomicfu$value) {
|
|
495
|
+
get_LOGGER().c2d('Refreshing token for ' + this.h41_1.v2x().y2x().toString());
|
|
496
|
+
this.d9_1 = 1;
|
|
497
|
+
suspendResult = this.i41_1.t43(this.h41_1.m2u(), this);
|
|
593
498
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
594
499
|
return suspendResult;
|
|
595
500
|
}
|
|
596
501
|
continue $sm;
|
|
597
502
|
} else {
|
|
598
|
-
this.
|
|
503
|
+
this.d9_1 = 3;
|
|
599
504
|
continue $sm;
|
|
600
505
|
}
|
|
601
506
|
|
|
602
507
|
case 1:
|
|
603
508
|
var ARGUMENT = suspendResult;
|
|
604
509
|
if (!ARGUMENT) {
|
|
605
|
-
|
|
606
|
-
if (get_isTraceEnabled(this_1)) {
|
|
607
|
-
this_1.c2l('Refreshing token failed for ' + this.k4g_1.q3b().t3b().toString());
|
|
608
|
-
}
|
|
510
|
+
get_LOGGER().c2d('Refreshing token failed for ' + this.h41_1.v2x().y2x().toString());
|
|
609
511
|
return false;
|
|
610
512
|
} else {
|
|
611
|
-
var
|
|
612
|
-
var
|
|
613
|
-
var value = this.
|
|
614
|
-
|
|
615
|
-
this.
|
|
513
|
+
var tmp0 = this.l41_1;
|
|
514
|
+
var tmp1 = this.i41_1;
|
|
515
|
+
var value = this.k41_1.v40_1.atomicfu$incrementAndGet();
|
|
516
|
+
tmp0.n2(tmp1, value);
|
|
517
|
+
this.d9_1 = 2;
|
|
616
518
|
continue $sm;
|
|
617
519
|
}
|
|
618
520
|
|
|
619
521
|
case 2:
|
|
620
|
-
this.
|
|
522
|
+
this.d9_1 = 3;
|
|
621
523
|
continue $sm;
|
|
622
524
|
case 3:
|
|
623
525
|
return true;
|
|
624
526
|
case 4:
|
|
625
|
-
throw this.
|
|
527
|
+
throw this.g9_1;
|
|
626
528
|
}
|
|
627
529
|
} catch ($p) {
|
|
628
530
|
var e = $p;
|
|
629
|
-
if (this.
|
|
531
|
+
if (this.e9_1 === 4) {
|
|
630
532
|
throw e;
|
|
631
533
|
} else {
|
|
632
|
-
this.
|
|
633
|
-
this.
|
|
534
|
+
this.d9_1 = this.e9_1;
|
|
535
|
+
this.g9_1 = e;
|
|
634
536
|
}
|
|
635
537
|
}
|
|
636
538
|
while (true);
|
|
637
539
|
};
|
|
638
540
|
function $invoke$executeWithNewTokenCOROUTINE$1(_this__u8e3s4, call, provider, oldRequest, authHeader, resultContinuation) {
|
|
639
541
|
CoroutineImpl.call(this, resultContinuation);
|
|
640
|
-
this.
|
|
641
|
-
this.
|
|
642
|
-
this.
|
|
643
|
-
this.
|
|
644
|
-
this.
|
|
542
|
+
this.v41_1 = _this__u8e3s4;
|
|
543
|
+
this.w41_1 = call;
|
|
544
|
+
this.x41_1 = provider;
|
|
545
|
+
this.y41_1 = oldRequest;
|
|
546
|
+
this.z41_1 = authHeader;
|
|
645
547
|
}
|
|
646
|
-
protoOf($invoke$executeWithNewTokenCOROUTINE$1).
|
|
647
|
-
var suspendResult = this.
|
|
548
|
+
protoOf($invoke$executeWithNewTokenCOROUTINE$1).l9 = function () {
|
|
549
|
+
var suspendResult = this.f9_1;
|
|
648
550
|
$sm: do
|
|
649
551
|
try {
|
|
650
|
-
var tmp = this.
|
|
552
|
+
var tmp = this.d9_1;
|
|
651
553
|
switch (tmp) {
|
|
652
554
|
case 0:
|
|
653
|
-
this.
|
|
654
|
-
this.
|
|
655
|
-
this.
|
|
656
|
-
this.
|
|
657
|
-
suspendResult = this.
|
|
555
|
+
this.e9_1 = 3;
|
|
556
|
+
this.a42_1 = new HttpRequestBuilder();
|
|
557
|
+
this.a42_1.k31(this.y41_1);
|
|
558
|
+
this.d9_1 = 1;
|
|
559
|
+
suspendResult = this.x41_1.u43(this.a42_1, this.z41_1, this);
|
|
658
560
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
659
561
|
return suspendResult;
|
|
660
562
|
}
|
|
661
563
|
|
|
662
564
|
continue $sm;
|
|
663
565
|
case 1:
|
|
664
|
-
this.
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
this.g9_1 = 2;
|
|
671
|
-
suspendResult = this.y4g_1.d3r(this.d4h_1, this);
|
|
566
|
+
this.a42_1.r2v_1.b27(get_AuthCircuitBreaker(), Unit_instance);
|
|
567
|
+
get_LOGGER().c2d('Sending new request to ' + this.w41_1.v2x().y2x().toString());
|
|
568
|
+
this.d9_1 = 2;
|
|
569
|
+
suspendResult = this.v41_1.e3d(this.a42_1, this);
|
|
672
570
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
673
571
|
return suspendResult;
|
|
674
572
|
}
|
|
@@ -677,15 +575,15 @@
|
|
|
677
575
|
case 2:
|
|
678
576
|
return suspendResult;
|
|
679
577
|
case 3:
|
|
680
|
-
throw this.
|
|
578
|
+
throw this.g9_1;
|
|
681
579
|
}
|
|
682
580
|
} catch ($p) {
|
|
683
581
|
var e = $p;
|
|
684
|
-
if (this.
|
|
582
|
+
if (this.e9_1 === 3) {
|
|
685
583
|
throw e;
|
|
686
584
|
} else {
|
|
687
|
-
this.
|
|
688
|
-
this.
|
|
585
|
+
this.d9_1 = this.e9_1;
|
|
586
|
+
this.g9_1 = e;
|
|
689
587
|
}
|
|
690
588
|
}
|
|
691
589
|
while (true);
|
|
@@ -745,43 +643,43 @@
|
|
|
745
643
|
}
|
|
746
644
|
function $loadTokenCOROUTINE$2(_this__u8e3s4, resultContinuation) {
|
|
747
645
|
CoroutineImpl.call(this, resultContinuation);
|
|
748
|
-
this.
|
|
646
|
+
this.e44_1 = _this__u8e3s4;
|
|
749
647
|
}
|
|
750
|
-
protoOf($loadTokenCOROUTINE$2).
|
|
751
|
-
var suspendResult = this.
|
|
648
|
+
protoOf($loadTokenCOROUTINE$2).l9 = function () {
|
|
649
|
+
var suspendResult = this.f9_1;
|
|
752
650
|
$sm: do
|
|
753
651
|
try {
|
|
754
|
-
var tmp = this.
|
|
652
|
+
var tmp = this.d9_1;
|
|
755
653
|
switch (tmp) {
|
|
756
654
|
case 0:
|
|
757
|
-
this.
|
|
758
|
-
this.
|
|
655
|
+
this.e9_1 = 5;
|
|
656
|
+
this.g44_1 = null;
|
|
759
657
|
$l$loop: while (true) {
|
|
760
|
-
this.
|
|
761
|
-
var tmp0_elvis_lhs = this.
|
|
658
|
+
this.f44_1 = this.e44_1.j44_1.kotlinx$atomicfu$value;
|
|
659
|
+
var tmp0_elvis_lhs = this.f44_1;
|
|
762
660
|
var newValue = tmp0_elvis_lhs == null ? CompletableDeferred() : tmp0_elvis_lhs;
|
|
763
|
-
if (this.
|
|
764
|
-
this.
|
|
661
|
+
if (this.e44_1.j44_1.atomicfu$compareAndSet(this.f44_1, newValue)) {
|
|
662
|
+
this.g44_1 = newValue;
|
|
765
663
|
break $l$loop;
|
|
766
664
|
}
|
|
767
665
|
}
|
|
768
666
|
|
|
769
|
-
if (!(this.
|
|
770
|
-
this.
|
|
771
|
-
suspendResult = this.
|
|
667
|
+
if (!(this.f44_1 == null)) {
|
|
668
|
+
this.d9_1 = 4;
|
|
669
|
+
suspendResult = this.f44_1.cq(this);
|
|
772
670
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
773
671
|
return suspendResult;
|
|
774
672
|
}
|
|
775
673
|
continue $sm;
|
|
776
674
|
} else {
|
|
777
|
-
this.
|
|
675
|
+
this.d9_1 = 1;
|
|
778
676
|
continue $sm;
|
|
779
677
|
}
|
|
780
678
|
|
|
781
679
|
case 1:
|
|
782
|
-
this.
|
|
783
|
-
this.
|
|
784
|
-
suspendResult = this.
|
|
680
|
+
this.e9_1 = 3;
|
|
681
|
+
this.d9_1 = 2;
|
|
682
|
+
suspendResult = this.e44_1.h44_1(this);
|
|
785
683
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
786
684
|
return suspendResult;
|
|
787
685
|
}
|
|
@@ -790,89 +688,89 @@
|
|
|
790
688
|
case 2:
|
|
791
689
|
var newTokens = suspendResult;
|
|
792
690
|
var tmp_0;
|
|
793
|
-
if (this.
|
|
691
|
+
if (this.g44_1 == null) {
|
|
794
692
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
795
693
|
} else {
|
|
796
|
-
tmp_0 = this.
|
|
694
|
+
tmp_0 = this.g44_1;
|
|
797
695
|
}
|
|
798
696
|
|
|
799
|
-
tmp_0.
|
|
697
|
+
tmp_0.au(newTokens);
|
|
800
698
|
return newTokens;
|
|
801
699
|
case 3:
|
|
802
|
-
this.
|
|
803
|
-
var tmp_1 = this.
|
|
700
|
+
this.e9_1 = 5;
|
|
701
|
+
var tmp_1 = this.g9_1;
|
|
804
702
|
if (tmp_1 instanceof Error) {
|
|
805
|
-
var cause = this.
|
|
703
|
+
var cause = this.g9_1;
|
|
806
704
|
var tmp_2;
|
|
807
|
-
if (this.
|
|
705
|
+
if (this.g44_1 == null) {
|
|
808
706
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
809
707
|
} else {
|
|
810
|
-
tmp_2 = this.
|
|
708
|
+
tmp_2 = this.g44_1;
|
|
811
709
|
}
|
|
812
|
-
tmp_2.
|
|
710
|
+
tmp_2.cu(cause);
|
|
813
711
|
var tmp_3;
|
|
814
|
-
if (this.
|
|
712
|
+
if (this.g44_1 == null) {
|
|
815
713
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
816
714
|
} else {
|
|
817
|
-
tmp_3 = this.
|
|
715
|
+
tmp_3 = this.g44_1;
|
|
818
716
|
}
|
|
819
|
-
this.
|
|
717
|
+
this.e44_1.j44_1.atomicfu$compareAndSet(tmp_3, null);
|
|
820
718
|
throw cause;
|
|
821
719
|
} else {
|
|
822
|
-
throw this.
|
|
720
|
+
throw this.g9_1;
|
|
823
721
|
}
|
|
824
722
|
|
|
825
723
|
case 4:
|
|
826
724
|
return suspendResult;
|
|
827
725
|
case 5:
|
|
828
|
-
throw this.
|
|
726
|
+
throw this.g9_1;
|
|
829
727
|
}
|
|
830
728
|
} catch ($p) {
|
|
831
729
|
var e = $p;
|
|
832
|
-
if (this.
|
|
730
|
+
if (this.e9_1 === 5) {
|
|
833
731
|
throw e;
|
|
834
732
|
} else {
|
|
835
|
-
this.
|
|
836
|
-
this.
|
|
733
|
+
this.d9_1 = this.e9_1;
|
|
734
|
+
this.g9_1 = e;
|
|
837
735
|
}
|
|
838
736
|
}
|
|
839
737
|
while (true);
|
|
840
738
|
};
|
|
841
739
|
function $setTokenCOROUTINE$3(_this__u8e3s4, block, resultContinuation) {
|
|
842
740
|
CoroutineImpl.call(this, resultContinuation);
|
|
843
|
-
this.
|
|
844
|
-
this.
|
|
741
|
+
this.s44_1 = _this__u8e3s4;
|
|
742
|
+
this.t44_1 = block;
|
|
845
743
|
}
|
|
846
|
-
protoOf($setTokenCOROUTINE$3).
|
|
847
|
-
var suspendResult = this.
|
|
744
|
+
protoOf($setTokenCOROUTINE$3).l9 = function () {
|
|
745
|
+
var suspendResult = this.f9_1;
|
|
848
746
|
$sm: do
|
|
849
747
|
try {
|
|
850
|
-
var tmp = this.
|
|
748
|
+
var tmp = this.d9_1;
|
|
851
749
|
switch (tmp) {
|
|
852
750
|
case 0:
|
|
853
|
-
this.
|
|
854
|
-
this.
|
|
751
|
+
this.e9_1 = 5;
|
|
752
|
+
this.v44_1 = null;
|
|
855
753
|
$l$loop: while (true) {
|
|
856
|
-
this.
|
|
857
|
-
var tmp0_elvis_lhs = this.
|
|
754
|
+
this.u44_1 = this.s44_1.i44_1.kotlinx$atomicfu$value;
|
|
755
|
+
var tmp0_elvis_lhs = this.u44_1;
|
|
858
756
|
var newValue = tmp0_elvis_lhs == null ? CompletableDeferred() : tmp0_elvis_lhs;
|
|
859
|
-
if (this.
|
|
860
|
-
this.
|
|
757
|
+
if (this.s44_1.i44_1.atomicfu$compareAndSet(this.u44_1, newValue)) {
|
|
758
|
+
this.v44_1 = newValue;
|
|
861
759
|
break $l$loop;
|
|
862
760
|
}
|
|
863
761
|
}
|
|
864
762
|
|
|
865
|
-
this.
|
|
866
|
-
if (this.
|
|
867
|
-
this.
|
|
868
|
-
suspendResult = this.
|
|
763
|
+
this.e9_1 = 4;
|
|
764
|
+
if (this.u44_1 == null) {
|
|
765
|
+
this.d9_1 = 2;
|
|
766
|
+
suspendResult = this.t44_1(this);
|
|
869
767
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
870
768
|
return suspendResult;
|
|
871
769
|
}
|
|
872
770
|
continue $sm;
|
|
873
771
|
} else {
|
|
874
|
-
this.
|
|
875
|
-
suspendResult = this.
|
|
772
|
+
this.d9_1 = 1;
|
|
773
|
+
suspendResult = this.u44_1.cq(this);
|
|
876
774
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
877
775
|
return suspendResult;
|
|
878
776
|
}
|
|
@@ -880,81 +778,81 @@
|
|
|
880
778
|
}
|
|
881
779
|
|
|
882
780
|
case 1:
|
|
883
|
-
this.
|
|
884
|
-
this.
|
|
781
|
+
this.w44_1 = suspendResult;
|
|
782
|
+
this.d9_1 = 3;
|
|
885
783
|
continue $sm;
|
|
886
784
|
case 2:
|
|
887
785
|
var newTokens = suspendResult;
|
|
888
786
|
var tmp_0;
|
|
889
|
-
if (this.
|
|
787
|
+
if (this.v44_1 == null) {
|
|
890
788
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
891
789
|
} else {
|
|
892
|
-
tmp_0 = this.
|
|
790
|
+
tmp_0 = this.v44_1;
|
|
893
791
|
}
|
|
894
792
|
|
|
895
|
-
tmp_0.
|
|
896
|
-
this.
|
|
897
|
-
this.
|
|
898
|
-
this.
|
|
793
|
+
tmp_0.au(newTokens);
|
|
794
|
+
this.s44_1.i44_1.kotlinx$atomicfu$value = null;
|
|
795
|
+
this.w44_1 = newTokens;
|
|
796
|
+
this.d9_1 = 3;
|
|
899
797
|
continue $sm;
|
|
900
798
|
case 3:
|
|
901
|
-
var newToken = this.
|
|
902
|
-
this.
|
|
799
|
+
var newToken = this.w44_1;
|
|
800
|
+
this.s44_1.j44_1.kotlinx$atomicfu$value = CompletableDeferred_0(newToken);
|
|
903
801
|
return newToken;
|
|
904
802
|
case 4:
|
|
905
|
-
this.
|
|
906
|
-
var tmp_1 = this.
|
|
803
|
+
this.e9_1 = 5;
|
|
804
|
+
var tmp_1 = this.g9_1;
|
|
907
805
|
if (tmp_1 instanceof Error) {
|
|
908
|
-
var cause = this.
|
|
806
|
+
var cause = this.g9_1;
|
|
909
807
|
var tmp_2;
|
|
910
|
-
if (this.
|
|
808
|
+
if (this.v44_1 == null) {
|
|
911
809
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
912
810
|
} else {
|
|
913
|
-
tmp_2 = this.
|
|
811
|
+
tmp_2 = this.v44_1;
|
|
914
812
|
}
|
|
915
|
-
tmp_2.
|
|
813
|
+
tmp_2.cu(cause);
|
|
916
814
|
var tmp_3;
|
|
917
|
-
if (this.
|
|
815
|
+
if (this.v44_1 == null) {
|
|
918
816
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
919
817
|
} else {
|
|
920
|
-
tmp_3 = this.
|
|
818
|
+
tmp_3 = this.v44_1;
|
|
921
819
|
}
|
|
922
|
-
this.
|
|
820
|
+
this.s44_1.i44_1.atomicfu$compareAndSet(tmp_3, null);
|
|
923
821
|
throw cause;
|
|
924
822
|
} else {
|
|
925
|
-
throw this.
|
|
823
|
+
throw this.g9_1;
|
|
926
824
|
}
|
|
927
825
|
|
|
928
826
|
case 5:
|
|
929
|
-
throw this.
|
|
827
|
+
throw this.g9_1;
|
|
930
828
|
}
|
|
931
829
|
} catch ($p) {
|
|
932
830
|
var e = $p;
|
|
933
|
-
if (this.
|
|
831
|
+
if (this.e9_1 === 5) {
|
|
934
832
|
throw e;
|
|
935
833
|
} else {
|
|
936
|
-
this.
|
|
937
|
-
this.
|
|
834
|
+
this.d9_1 = this.e9_1;
|
|
835
|
+
this.g9_1 = e;
|
|
938
836
|
}
|
|
939
837
|
}
|
|
940
838
|
while (true);
|
|
941
839
|
};
|
|
942
840
|
function AuthTokenHolder(loadTokens) {
|
|
943
|
-
this.
|
|
944
|
-
this.
|
|
945
|
-
this.
|
|
841
|
+
this.h44_1 = loadTokens;
|
|
842
|
+
this.i44_1 = atomic$ref$1(null);
|
|
843
|
+
this.j44_1 = atomic$ref$1(null);
|
|
946
844
|
}
|
|
947
|
-
protoOf(AuthTokenHolder).
|
|
845
|
+
protoOf(AuthTokenHolder).x44 = function ($completion) {
|
|
948
846
|
var tmp = new $loadTokenCOROUTINE$2(this, $completion);
|
|
949
|
-
tmp.
|
|
950
|
-
tmp.
|
|
951
|
-
return tmp.
|
|
847
|
+
tmp.f9_1 = Unit_instance;
|
|
848
|
+
tmp.g9_1 = null;
|
|
849
|
+
return tmp.l9();
|
|
952
850
|
};
|
|
953
|
-
protoOf(AuthTokenHolder).
|
|
851
|
+
protoOf(AuthTokenHolder).y44 = function (block, $completion) {
|
|
954
852
|
var tmp = new $setTokenCOROUTINE$3(this, block, $completion);
|
|
955
|
-
tmp.
|
|
956
|
-
tmp.
|
|
957
|
-
return tmp.
|
|
853
|
+
tmp.f9_1 = Unit_instance;
|
|
854
|
+
tmp.g9_1 = null;
|
|
855
|
+
return tmp.l9();
|
|
958
856
|
};
|
|
959
857
|
function bearer(_this__u8e3s4, block) {
|
|
960
858
|
// Inline function 'kotlin.apply' call
|
|
@@ -962,30 +860,30 @@
|
|
|
962
860
|
block(this_0);
|
|
963
861
|
// Inline function 'kotlin.with' call
|
|
964
862
|
// Inline function 'io.ktor.client.plugins.auth.providers.bearer.<anonymous>' call
|
|
965
|
-
_this__u8e3s4.
|
|
863
|
+
_this__u8e3s4.u40_1.k(new BearerAuthProvider(this_0.z44_1, this_0.a45_1, this_0.b45_1, this_0.c45_1));
|
|
966
864
|
}
|
|
967
|
-
function BearerAuthConfig$
|
|
865
|
+
function BearerAuthConfig$_refreshTokens$slambda(resultContinuation) {
|
|
968
866
|
CoroutineImpl.call(this, resultContinuation);
|
|
969
867
|
}
|
|
970
|
-
protoOf(BearerAuthConfig$
|
|
971
|
-
var tmp = this.
|
|
972
|
-
tmp.
|
|
973
|
-
tmp.
|
|
974
|
-
return tmp.
|
|
868
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).m45 = function (_this__u8e3s4, $completion) {
|
|
869
|
+
var tmp = this.n45(_this__u8e3s4, $completion);
|
|
870
|
+
tmp.f9_1 = Unit_instance;
|
|
871
|
+
tmp.g9_1 = null;
|
|
872
|
+
return tmp.l9();
|
|
975
873
|
};
|
|
976
|
-
protoOf(BearerAuthConfig$
|
|
977
|
-
return this.
|
|
874
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).v9 = function (p1, $completion) {
|
|
875
|
+
return this.m45(p1 instanceof RefreshTokensParams ? p1 : THROW_CCE(), $completion);
|
|
978
876
|
};
|
|
979
|
-
protoOf(BearerAuthConfig$
|
|
980
|
-
var suspendResult = this.
|
|
877
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).l9 = function () {
|
|
878
|
+
var suspendResult = this.f9_1;
|
|
981
879
|
$sm: do
|
|
982
880
|
try {
|
|
983
|
-
var tmp = this.
|
|
881
|
+
var tmp = this.d9_1;
|
|
984
882
|
if (tmp === 0) {
|
|
985
|
-
this.
|
|
883
|
+
this.e9_1 = 1;
|
|
986
884
|
return null;
|
|
987
885
|
} else if (tmp === 1) {
|
|
988
|
-
throw this.
|
|
886
|
+
throw this.g9_1;
|
|
989
887
|
}
|
|
990
888
|
} catch ($p) {
|
|
991
889
|
var e = $p;
|
|
@@ -993,41 +891,41 @@
|
|
|
993
891
|
}
|
|
994
892
|
while (true);
|
|
995
893
|
};
|
|
996
|
-
protoOf(BearerAuthConfig$
|
|
997
|
-
var i = new BearerAuthConfig$
|
|
998
|
-
i.
|
|
894
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).n45 = function (_this__u8e3s4, completion) {
|
|
895
|
+
var i = new BearerAuthConfig$_refreshTokens$slambda(completion);
|
|
896
|
+
i.l45_1 = _this__u8e3s4;
|
|
999
897
|
return i;
|
|
1000
898
|
};
|
|
1001
|
-
function BearerAuthConfig$
|
|
1002
|
-
var i = new BearerAuthConfig$
|
|
899
|
+
function BearerAuthConfig$_refreshTokens$slambda_0(resultContinuation) {
|
|
900
|
+
var i = new BearerAuthConfig$_refreshTokens$slambda(resultContinuation);
|
|
1003
901
|
var l = function (_this__u8e3s4, $completion) {
|
|
1004
|
-
return i.
|
|
902
|
+
return i.m45(_this__u8e3s4, $completion);
|
|
1005
903
|
};
|
|
1006
904
|
l.$arity = 1;
|
|
1007
905
|
return l;
|
|
1008
906
|
}
|
|
1009
|
-
function BearerAuthConfig$
|
|
907
|
+
function BearerAuthConfig$_loadTokens$slambda(resultContinuation) {
|
|
1010
908
|
CoroutineImpl.call(this, resultContinuation);
|
|
1011
909
|
}
|
|
1012
|
-
protoOf(BearerAuthConfig$
|
|
1013
|
-
var tmp = this.
|
|
1014
|
-
tmp.
|
|
1015
|
-
tmp.
|
|
1016
|
-
return tmp.
|
|
910
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).w45 = function ($completion) {
|
|
911
|
+
var tmp = this.x45($completion);
|
|
912
|
+
tmp.f9_1 = Unit_instance;
|
|
913
|
+
tmp.g9_1 = null;
|
|
914
|
+
return tmp.l9();
|
|
1017
915
|
};
|
|
1018
|
-
protoOf(BearerAuthConfig$
|
|
1019
|
-
return this.
|
|
916
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).ab = function ($completion) {
|
|
917
|
+
return this.w45($completion);
|
|
1020
918
|
};
|
|
1021
|
-
protoOf(BearerAuthConfig$
|
|
1022
|
-
var suspendResult = this.
|
|
919
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).l9 = function () {
|
|
920
|
+
var suspendResult = this.f9_1;
|
|
1023
921
|
$sm: do
|
|
1024
922
|
try {
|
|
1025
|
-
var tmp = this.
|
|
923
|
+
var tmp = this.d9_1;
|
|
1026
924
|
if (tmp === 0) {
|
|
1027
|
-
this.
|
|
925
|
+
this.e9_1 = 1;
|
|
1028
926
|
return null;
|
|
1029
927
|
} else if (tmp === 1) {
|
|
1030
|
-
throw this.
|
|
928
|
+
throw this.g9_1;
|
|
1031
929
|
}
|
|
1032
930
|
} catch ($p) {
|
|
1033
931
|
var e = $p;
|
|
@@ -1035,95 +933,95 @@
|
|
|
1035
933
|
}
|
|
1036
934
|
while (true);
|
|
1037
935
|
};
|
|
1038
|
-
protoOf(BearerAuthConfig$
|
|
1039
|
-
return new BearerAuthConfig$
|
|
936
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).x45 = function (completion) {
|
|
937
|
+
return new BearerAuthConfig$_loadTokens$slambda(completion);
|
|
1040
938
|
};
|
|
1041
|
-
function BearerAuthConfig$
|
|
1042
|
-
var i = new BearerAuthConfig$
|
|
939
|
+
function BearerAuthConfig$_loadTokens$slambda_0(resultContinuation) {
|
|
940
|
+
var i = new BearerAuthConfig$_loadTokens$slambda(resultContinuation);
|
|
1043
941
|
var l = function ($completion) {
|
|
1044
|
-
return i.
|
|
942
|
+
return i.w45($completion);
|
|
1045
943
|
};
|
|
1046
944
|
l.$arity = 0;
|
|
1047
945
|
return l;
|
|
1048
946
|
}
|
|
1049
|
-
function BearerAuthConfig$
|
|
947
|
+
function BearerAuthConfig$_sendWithoutRequest$lambda(it) {
|
|
1050
948
|
return true;
|
|
1051
949
|
}
|
|
1052
950
|
function BearerAuthConfig() {
|
|
1053
951
|
var tmp = this;
|
|
1054
|
-
tmp.
|
|
952
|
+
tmp.z44_1 = BearerAuthConfig$_refreshTokens$slambda_0(null);
|
|
1055
953
|
var tmp_0 = this;
|
|
1056
|
-
tmp_0.
|
|
954
|
+
tmp_0.a45_1 = BearerAuthConfig$_loadTokens$slambda_0(null);
|
|
1057
955
|
var tmp_1 = this;
|
|
1058
|
-
tmp_1.
|
|
1059
|
-
this.
|
|
956
|
+
tmp_1.b45_1 = BearerAuthConfig$_sendWithoutRequest$lambda;
|
|
957
|
+
this.c45_1 = null;
|
|
1060
958
|
}
|
|
1061
|
-
protoOf(BearerAuthConfig).
|
|
1062
|
-
this.
|
|
959
|
+
protoOf(BearerAuthConfig).y45 = function (block) {
|
|
960
|
+
this.z44_1 = block;
|
|
1063
961
|
};
|
|
1064
962
|
function RefreshTokensParams(client, response, oldTokens) {
|
|
1065
|
-
this.
|
|
1066
|
-
this.
|
|
1067
|
-
this.
|
|
963
|
+
this.z45_1 = client;
|
|
964
|
+
this.a46_1 = response;
|
|
965
|
+
this.b46_1 = oldTokens;
|
|
1068
966
|
}
|
|
1069
|
-
protoOf(RefreshTokensParams).
|
|
1070
|
-
_this__u8e3s4.
|
|
967
|
+
protoOf(RefreshTokensParams).c46 = function (_this__u8e3s4) {
|
|
968
|
+
_this__u8e3s4.r2v_1.b27(get_AuthCircuitBreaker(), Unit_instance);
|
|
1071
969
|
};
|
|
1072
970
|
function BearerTokens(accessToken, refreshToken) {
|
|
1073
|
-
this.
|
|
1074
|
-
this.
|
|
971
|
+
this.d46_1 = accessToken;
|
|
972
|
+
this.e46_1 = refreshToken;
|
|
1075
973
|
}
|
|
1076
974
|
function BearerAuthProvider$_init_$lambda_lcdiwf(it) {
|
|
1077
975
|
return true;
|
|
1078
976
|
}
|
|
1079
977
|
function BearerAuthProvider$addRequestHeaders$lambda($token) {
|
|
1080
978
|
return function ($this$headers) {
|
|
1081
|
-
var tokenValue = 'Bearer ' + $token.
|
|
979
|
+
var tokenValue = 'Bearer ' + $token.d46_1;
|
|
1082
980
|
var tmp;
|
|
1083
|
-
if ($this$headers.
|
|
1084
|
-
$this$headers.
|
|
981
|
+
if ($this$headers.x28(HttpHeaders_getInstance().m2f_1)) {
|
|
982
|
+
$this$headers.e29(HttpHeaders_getInstance().m2f_1);
|
|
1085
983
|
tmp = Unit_instance;
|
|
1086
984
|
}
|
|
1087
|
-
$this$headers.
|
|
985
|
+
$this$headers.b29(HttpHeaders_getInstance().m2f_1, tokenValue);
|
|
1088
986
|
return Unit_instance;
|
|
1089
987
|
};
|
|
1090
988
|
}
|
|
1091
989
|
function BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation) {
|
|
1092
|
-
this.
|
|
1093
|
-
this.
|
|
990
|
+
this.n46_1 = this$0;
|
|
991
|
+
this.o46_1 = $response;
|
|
1094
992
|
CoroutineImpl.call(this, resultContinuation);
|
|
1095
993
|
}
|
|
1096
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1097
|
-
var tmp = this.
|
|
1098
|
-
tmp.
|
|
1099
|
-
tmp.
|
|
1100
|
-
return tmp.
|
|
994
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).t46 = function ($completion) {
|
|
995
|
+
var tmp = this.x45($completion);
|
|
996
|
+
tmp.f9_1 = Unit_instance;
|
|
997
|
+
tmp.g9_1 = null;
|
|
998
|
+
return tmp.l9();
|
|
1101
999
|
};
|
|
1102
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1103
|
-
return this.
|
|
1000
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).ab = function ($completion) {
|
|
1001
|
+
return this.t46($completion);
|
|
1104
1002
|
};
|
|
1105
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1106
|
-
var suspendResult = this.
|
|
1003
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).l9 = function () {
|
|
1004
|
+
var suspendResult = this.f9_1;
|
|
1107
1005
|
$sm: do
|
|
1108
1006
|
try {
|
|
1109
|
-
var tmp = this.
|
|
1007
|
+
var tmp = this.d9_1;
|
|
1110
1008
|
switch (tmp) {
|
|
1111
1009
|
case 0:
|
|
1112
|
-
this.
|
|
1113
|
-
this.
|
|
1114
|
-
this.
|
|
1115
|
-
this.
|
|
1116
|
-
suspendResult = this.
|
|
1010
|
+
this.e9_1 = 3;
|
|
1011
|
+
this.p46_1 = this.n46_1.u46_1;
|
|
1012
|
+
this.q46_1 = this.o46_1.u2y().h2u_1;
|
|
1013
|
+
this.d9_1 = 1;
|
|
1014
|
+
suspendResult = this.n46_1.x46_1.x44(this);
|
|
1117
1015
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1118
1016
|
return suspendResult;
|
|
1119
1017
|
}
|
|
1120
1018
|
|
|
1121
1019
|
continue $sm;
|
|
1122
1020
|
case 1:
|
|
1123
|
-
this.
|
|
1124
|
-
this.
|
|
1125
|
-
this.
|
|
1126
|
-
suspendResult = this.
|
|
1021
|
+
this.r46_1 = suspendResult;
|
|
1022
|
+
this.s46_1 = new RefreshTokensParams(this.q46_1, this.o46_1, this.r46_1);
|
|
1023
|
+
this.d9_1 = 2;
|
|
1024
|
+
suspendResult = this.p46_1(this.s46_1, this);
|
|
1127
1025
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1128
1026
|
return suspendResult;
|
|
1129
1027
|
}
|
|
@@ -1132,46 +1030,46 @@
|
|
|
1132
1030
|
case 2:
|
|
1133
1031
|
return suspendResult;
|
|
1134
1032
|
case 3:
|
|
1135
|
-
throw this.
|
|
1033
|
+
throw this.g9_1;
|
|
1136
1034
|
}
|
|
1137
1035
|
} catch ($p) {
|
|
1138
1036
|
var e = $p;
|
|
1139
|
-
if (this.
|
|
1037
|
+
if (this.e9_1 === 3) {
|
|
1140
1038
|
throw e;
|
|
1141
1039
|
} else {
|
|
1142
|
-
this.
|
|
1143
|
-
this.
|
|
1040
|
+
this.d9_1 = this.e9_1;
|
|
1041
|
+
this.g9_1 = e;
|
|
1144
1042
|
}
|
|
1145
1043
|
}
|
|
1146
1044
|
while (true);
|
|
1147
1045
|
};
|
|
1148
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1149
|
-
return new BearerAuthProvider$refreshToken$slambda(this.
|
|
1046
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).x45 = function (completion) {
|
|
1047
|
+
return new BearerAuthProvider$refreshToken$slambda(this.n46_1, this.o46_1, completion);
|
|
1150
1048
|
};
|
|
1151
1049
|
function BearerAuthProvider$refreshToken$slambda_0(this$0, $response, resultContinuation) {
|
|
1152
1050
|
var i = new BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation);
|
|
1153
1051
|
var l = function ($completion) {
|
|
1154
|
-
return i.
|
|
1052
|
+
return i.t46($completion);
|
|
1155
1053
|
};
|
|
1156
1054
|
l.$arity = 0;
|
|
1157
1055
|
return l;
|
|
1158
1056
|
}
|
|
1159
1057
|
function $addRequestHeadersCOROUTINE$4(_this__u8e3s4, request, authHeader, resultContinuation) {
|
|
1160
1058
|
CoroutineImpl.call(this, resultContinuation);
|
|
1161
|
-
this.
|
|
1162
|
-
this.
|
|
1163
|
-
this.
|
|
1059
|
+
this.g47_1 = _this__u8e3s4;
|
|
1060
|
+
this.h47_1 = request;
|
|
1061
|
+
this.i47_1 = authHeader;
|
|
1164
1062
|
}
|
|
1165
|
-
protoOf($addRequestHeadersCOROUTINE$4).
|
|
1166
|
-
var suspendResult = this.
|
|
1063
|
+
protoOf($addRequestHeadersCOROUTINE$4).l9 = function () {
|
|
1064
|
+
var suspendResult = this.f9_1;
|
|
1167
1065
|
$sm: do
|
|
1168
1066
|
try {
|
|
1169
|
-
var tmp = this.
|
|
1067
|
+
var tmp = this.d9_1;
|
|
1170
1068
|
switch (tmp) {
|
|
1171
1069
|
case 0:
|
|
1172
|
-
this.
|
|
1173
|
-
this.
|
|
1174
|
-
suspendResult = this.
|
|
1070
|
+
this.e9_1 = 2;
|
|
1071
|
+
this.d9_1 = 1;
|
|
1072
|
+
suspendResult = this.g47_1.x46_1.x44(this);
|
|
1175
1073
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1176
1074
|
return suspendResult;
|
|
1177
1075
|
}
|
|
@@ -1187,37 +1085,37 @@
|
|
|
1187
1085
|
}
|
|
1188
1086
|
|
|
1189
1087
|
var token = tmp_0;
|
|
1190
|
-
headers(this.
|
|
1088
|
+
headers(this.h47_1, BearerAuthProvider$addRequestHeaders$lambda(token));
|
|
1191
1089
|
return Unit_instance;
|
|
1192
1090
|
case 2:
|
|
1193
|
-
throw this.
|
|
1091
|
+
throw this.g9_1;
|
|
1194
1092
|
}
|
|
1195
1093
|
} catch ($p) {
|
|
1196
1094
|
var e = $p;
|
|
1197
|
-
if (this.
|
|
1095
|
+
if (this.e9_1 === 2) {
|
|
1198
1096
|
throw e;
|
|
1199
1097
|
} else {
|
|
1200
|
-
this.
|
|
1201
|
-
this.
|
|
1098
|
+
this.d9_1 = this.e9_1;
|
|
1099
|
+
this.g9_1 = e;
|
|
1202
1100
|
}
|
|
1203
1101
|
}
|
|
1204
1102
|
while (true);
|
|
1205
1103
|
};
|
|
1206
1104
|
function $refreshTokenCOROUTINE$5(_this__u8e3s4, response, resultContinuation) {
|
|
1207
1105
|
CoroutineImpl.call(this, resultContinuation);
|
|
1208
|
-
this.
|
|
1209
|
-
this.
|
|
1106
|
+
this.r47_1 = _this__u8e3s4;
|
|
1107
|
+
this.s47_1 = response;
|
|
1210
1108
|
}
|
|
1211
|
-
protoOf($refreshTokenCOROUTINE$5).
|
|
1212
|
-
var suspendResult = this.
|
|
1109
|
+
protoOf($refreshTokenCOROUTINE$5).l9 = function () {
|
|
1110
|
+
var suspendResult = this.f9_1;
|
|
1213
1111
|
$sm: do
|
|
1214
1112
|
try {
|
|
1215
|
-
var tmp = this.
|
|
1113
|
+
var tmp = this.d9_1;
|
|
1216
1114
|
switch (tmp) {
|
|
1217
1115
|
case 0:
|
|
1218
|
-
this.
|
|
1219
|
-
this.
|
|
1220
|
-
suspendResult = this.
|
|
1116
|
+
this.e9_1 = 2;
|
|
1117
|
+
this.d9_1 = 1;
|
|
1118
|
+
suspendResult = this.r47_1.x46_1.y44(BearerAuthProvider$refreshToken$slambda_0(this.r47_1, this.s47_1, null), this);
|
|
1221
1119
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1222
1120
|
return suspendResult;
|
|
1223
1121
|
}
|
|
@@ -1227,15 +1125,15 @@
|
|
|
1227
1125
|
var newToken = suspendResult;
|
|
1228
1126
|
return !(newToken == null);
|
|
1229
1127
|
case 2:
|
|
1230
|
-
throw this.
|
|
1128
|
+
throw this.g9_1;
|
|
1231
1129
|
}
|
|
1232
1130
|
} catch ($p) {
|
|
1233
1131
|
var e = $p;
|
|
1234
|
-
if (this.
|
|
1132
|
+
if (this.e9_1 === 2) {
|
|
1235
1133
|
throw e;
|
|
1236
1134
|
} else {
|
|
1237
|
-
this.
|
|
1238
|
-
this.
|
|
1135
|
+
this.d9_1 = this.e9_1;
|
|
1136
|
+
this.g9_1 = e;
|
|
1239
1137
|
}
|
|
1240
1138
|
}
|
|
1241
1139
|
while (true);
|
|
@@ -1248,53 +1146,53 @@
|
|
|
1248
1146
|
tmp = sendWithoutRequestCallback;
|
|
1249
1147
|
}
|
|
1250
1148
|
sendWithoutRequestCallback = tmp;
|
|
1251
|
-
this.
|
|
1252
|
-
this.
|
|
1253
|
-
this.
|
|
1254
|
-
this.
|
|
1149
|
+
this.u46_1 = refreshTokens;
|
|
1150
|
+
this.v46_1 = sendWithoutRequestCallback;
|
|
1151
|
+
this.w46_1 = realm;
|
|
1152
|
+
this.x46_1 = new AuthTokenHolder(loadTokens);
|
|
1255
1153
|
}
|
|
1256
|
-
protoOf(BearerAuthProvider).
|
|
1154
|
+
protoOf(BearerAuthProvider).v43 = function () {
|
|
1257
1155
|
var message = 'Deprecated';
|
|
1258
1156
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1259
1157
|
};
|
|
1260
|
-
protoOf(BearerAuthProvider).
|
|
1261
|
-
return this.
|
|
1158
|
+
protoOf(BearerAuthProvider).x42 = function (request) {
|
|
1159
|
+
return this.v46_1(request);
|
|
1262
1160
|
};
|
|
1263
|
-
protoOf(BearerAuthProvider).
|
|
1264
|
-
if (!(auth.
|
|
1265
|
-
get_LOGGER().
|
|
1161
|
+
protoOf(BearerAuthProvider).w40 = function (auth) {
|
|
1162
|
+
if (!(auth.p2o_1 === 'Bearer')) {
|
|
1163
|
+
get_LOGGER().c2d('Bearer Auth Provider is not applicable for ' + auth.toString());
|
|
1266
1164
|
return false;
|
|
1267
1165
|
}
|
|
1268
1166
|
var tmp;
|
|
1269
|
-
if (this.
|
|
1167
|
+
if (this.w46_1 == null) {
|
|
1270
1168
|
tmp = true;
|
|
1271
1169
|
} else {
|
|
1272
1170
|
if (!(auth instanceof Parameterized)) {
|
|
1273
1171
|
tmp = false;
|
|
1274
1172
|
} else {
|
|
1275
|
-
tmp = auth.
|
|
1173
|
+
tmp = auth.y2e('realm') == this.w46_1;
|
|
1276
1174
|
}
|
|
1277
1175
|
}
|
|
1278
1176
|
var isSameRealm = tmp;
|
|
1279
1177
|
if (!isSameRealm) {
|
|
1280
|
-
get_LOGGER().
|
|
1178
|
+
get_LOGGER().c2d('Bearer Auth Provider is not applicable for this realm');
|
|
1281
1179
|
}
|
|
1282
1180
|
return isSameRealm;
|
|
1283
1181
|
};
|
|
1284
|
-
protoOf(BearerAuthProvider).
|
|
1182
|
+
protoOf(BearerAuthProvider).u43 = function (request, authHeader, $completion) {
|
|
1285
1183
|
var tmp = new $addRequestHeadersCOROUTINE$4(this, request, authHeader, $completion);
|
|
1286
|
-
tmp.
|
|
1287
|
-
tmp.
|
|
1288
|
-
return tmp.
|
|
1184
|
+
tmp.f9_1 = Unit_instance;
|
|
1185
|
+
tmp.g9_1 = null;
|
|
1186
|
+
return tmp.l9();
|
|
1289
1187
|
};
|
|
1290
|
-
protoOf(BearerAuthProvider).
|
|
1188
|
+
protoOf(BearerAuthProvider).t43 = function (response, $completion) {
|
|
1291
1189
|
var tmp = new $refreshTokenCOROUTINE$5(this, response, $completion);
|
|
1292
|
-
tmp.
|
|
1293
|
-
tmp.
|
|
1294
|
-
return tmp.
|
|
1190
|
+
tmp.f9_1 = Unit_instance;
|
|
1191
|
+
tmp.g9_1 = null;
|
|
1192
|
+
return tmp.l9();
|
|
1295
1193
|
};
|
|
1296
1194
|
//region block: post-declaration
|
|
1297
|
-
protoOf(BearerAuthProvider).
|
|
1195
|
+
protoOf(BearerAuthProvider).y42 = addRequestHeaders$default;
|
|
1298
1196
|
//endregion
|
|
1299
1197
|
//region block: exports
|
|
1300
1198
|
_.$_$ = _.$_$ || {};
|
|
@@ -1304,4 +1202,4 @@
|
|
|
1304
1202
|
_.$_$.d = get_Auth;
|
|
1305
1203
|
//endregion
|
|
1306
1204
|
return _;
|
|
1307
|
-
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./
|
|
1205
|
+
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-atomicfu.js'), require('./ktor-ktor-utils.js'), require('./ktor-ktor-client-ktor-client-core.js'), require('./ktor-ktor-http.js'), require('./kotlinx-coroutines-core.js')));
|