@doordeck/doordeck-headless-sdk 0.78.0 → 0.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js +1343 -1343
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +35 -35
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +9 -9
- package/kotlin/doordeck-sdk.d.ts +4 -0
- package/kotlin/doordeck-sdk.js +11570 -11569
- package/kotlin/kotlin-kotlin-stdlib.js +2792 -2291
- package/kotlin/kotlinx-atomicfu.js +19 -19
- package/kotlin/kotlinx-coroutines-core.js +2805 -2189
- package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +198 -2
- package/kotlin/kotlinx-io-kotlinx-io-core.js +536 -463
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1939 -1939
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1733 -1684
- package/kotlin/ktor-ktor-client-ktor-client-core.js +3455 -3134
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js +540 -438
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js +372 -271
- package/kotlin/ktor-ktor-http-ktor-http-cio.js +2017 -0
- package/kotlin/ktor-ktor-http.js +1012 -906
- package/kotlin/ktor-ktor-io.js +1853 -859
- 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 +758 -669
- package/package.json +2 -2
- package/kotlin/kotlin-kotlinx-atomicfu-runtime.js +0 -6
- package/kotlin/ktor-ktor-client-ktor-client-js.js +0 -6
|
@@ -1,57 +1,60 @@
|
|
|
1
|
-
(function (_, kotlin_kotlin,
|
|
1
|
+
(function (_, kotlin_kotlin, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_http, kotlin_org_jetbrains_kotlinx_atomicfu, kotlin_io_ktor_ktor_utils, 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;
|
|
4
12
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.p;
|
|
5
|
-
var
|
|
6
|
-
var initMetadataForClass = kotlin_kotlin.$_$.ja;
|
|
13
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ra;
|
|
7
14
|
var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
|
|
8
|
-
var toList = kotlin_kotlin.$_$.
|
|
15
|
+
var toList = kotlin_kotlin.$_$.r8;
|
|
9
16
|
var ConcurrentMap = kotlin_io_ktor_ktor_utils.$_$.c;
|
|
10
|
-
var KtMutableMap = kotlin_kotlin.$_$.
|
|
17
|
+
var KtMutableMap = kotlin_kotlin.$_$.v5;
|
|
11
18
|
var getKClass = kotlin_kotlin.$_$.f;
|
|
12
|
-
var arrayOf = kotlin_kotlin.$_$.
|
|
19
|
+
var arrayOf = kotlin_kotlin.$_$.zf;
|
|
13
20
|
var createKType = kotlin_kotlin.$_$.c;
|
|
14
21
|
var createInvariantKTypeProjection = kotlin_kotlin.$_$.a;
|
|
15
|
-
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.
|
|
16
|
-
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.
|
|
17
|
-
var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.
|
|
22
|
+
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.z4;
|
|
23
|
+
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.l;
|
|
24
|
+
var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.n;
|
|
18
25
|
var Send_instance = kotlin_io_ktor_ktor_client_core.$_$.b;
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.b6;
|
|
26
|
+
var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.g;
|
|
27
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.e6;
|
|
22
28
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.o;
|
|
23
|
-
var parseAuthorizationHeaders = kotlin_io_ktor_ktor_http.$_$.
|
|
24
|
-
var flatten = kotlin_kotlin.$_$.
|
|
25
|
-
var emptyList = kotlin_kotlin.$_$.
|
|
26
|
-
var to = kotlin_kotlin.$_$.
|
|
27
|
-
var
|
|
29
|
+
var parseAuthorizationHeaders = kotlin_io_ktor_ktor_http.$_$.m;
|
|
30
|
+
var flatten = kotlin_kotlin.$_$.g7;
|
|
31
|
+
var emptyList = kotlin_kotlin.$_$.y6;
|
|
32
|
+
var to = kotlin_kotlin.$_$.pg;
|
|
33
|
+
var get_isTraceEnabled = kotlin_io_ktor_ktor_utils.$_$.h;
|
|
34
|
+
var first = kotlin_kotlin.$_$.f7;
|
|
28
35
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.y;
|
|
29
|
-
var CoroutineImpl = kotlin_kotlin.$_$.l9;
|
|
30
|
-
var THROW_CCE = kotlin_kotlin.$_$.ve;
|
|
31
36
|
var OnRequestContext = kotlin_io_ktor_ktor_client_core.$_$.e;
|
|
32
37
|
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.s;
|
|
33
|
-
var toString = kotlin_kotlin.$_$.
|
|
34
|
-
var
|
|
35
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.v8;
|
|
36
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.oa;
|
|
38
|
+
var toString = kotlin_kotlin.$_$.wb;
|
|
39
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.d9;
|
|
37
40
|
var Sender = kotlin_io_ktor_ktor_client_core.$_$.f;
|
|
38
|
-
var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.h;
|
|
39
41
|
var HashSet_init_$Create$ = kotlin_kotlin.$_$.w;
|
|
40
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
42
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.ta;
|
|
41
43
|
var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.g;
|
|
42
|
-
var Unit = kotlin_kotlin.$_$.
|
|
44
|
+
var Unit = kotlin_kotlin.$_$.wf;
|
|
43
45
|
var createClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.i;
|
|
44
|
-
var KtList = kotlin_kotlin.$_$.
|
|
45
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
46
|
-
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
47
|
-
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.
|
|
48
|
-
var CompletableDeferred_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
46
|
+
var KtList = kotlin_kotlin.$_$.q5;
|
|
47
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.va;
|
|
48
|
+
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.t;
|
|
49
|
+
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.ng;
|
|
50
|
+
var CompletableDeferred_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.s;
|
|
49
51
|
var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
|
|
50
52
|
var headers = kotlin_io_ktor_ktor_client_core.$_$.v;
|
|
51
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.
|
|
52
|
-
var Parameterized = kotlin_io_ktor_ktor_http.$_$.
|
|
53
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.a2;
|
|
54
|
+
var Parameterized = kotlin_io_ktor_ktor_http.$_$.l;
|
|
53
55
|
//endregion
|
|
54
56
|
//region block: pre-declaration
|
|
57
|
+
initMetadataForLambda(AuthConfig$isUnauthorizedResponse$slambda, CoroutineImpl, VOID, [1]);
|
|
55
58
|
initMetadataForClass(AuthConfig, 'AuthConfig', AuthConfig);
|
|
56
59
|
initMetadataForClass(AtomicCounter, 'AtomicCounter', AtomicCounter);
|
|
57
60
|
initMetadataForLambda(Auth$lambda$slambda, CoroutineImpl, VOID, [3]);
|
|
@@ -59,11 +62,11 @@
|
|
|
59
62
|
initMetadataForCoroutine($invoke$refreshTokenIfNeededCOROUTINE$0, CoroutineImpl);
|
|
60
63
|
initMetadataForCoroutine($invoke$executeWithNewTokenCOROUTINE$1, CoroutineImpl);
|
|
61
64
|
function sendWithoutRequest(request) {
|
|
62
|
-
return this.
|
|
65
|
+
return this.h4j();
|
|
63
66
|
}
|
|
64
67
|
function addRequestHeaders$default(request, authHeader, $completion, $super) {
|
|
65
68
|
authHeader = authHeader === VOID ? null : authHeader;
|
|
66
|
-
return $super === VOID ? this.
|
|
69
|
+
return $super === VOID ? this.g4j(request, authHeader, $completion) : $super.g4j.call(this, request, authHeader, $completion);
|
|
67
70
|
}
|
|
68
71
|
function refreshToken(response, $completion) {
|
|
69
72
|
return true;
|
|
@@ -72,8 +75,8 @@
|
|
|
72
75
|
initMetadataForCoroutine($loadTokenCOROUTINE$2, CoroutineImpl);
|
|
73
76
|
initMetadataForCoroutine($setTokenCOROUTINE$3, CoroutineImpl);
|
|
74
77
|
initMetadataForClass(AuthTokenHolder, 'AuthTokenHolder', VOID, VOID, VOID, [0, 1]);
|
|
75
|
-
initMetadataForLambda(BearerAuthConfig$
|
|
76
|
-
initMetadataForLambda(BearerAuthConfig$
|
|
78
|
+
initMetadataForLambda(BearerAuthConfig$refreshTokens$slambda, CoroutineImpl, VOID, [1]);
|
|
79
|
+
initMetadataForLambda(BearerAuthConfig$loadTokens$slambda, CoroutineImpl, VOID, [0]);
|
|
77
80
|
initMetadataForClass(BearerAuthConfig, 'BearerAuthConfig', BearerAuthConfig);
|
|
78
81
|
initMetadataForClass(RefreshTokensParams, 'RefreshTokensParams');
|
|
79
82
|
initMetadataForClass(BearerTokens, 'BearerTokens');
|
|
@@ -102,13 +105,57 @@
|
|
|
102
105
|
return AuthProvidersKey;
|
|
103
106
|
}
|
|
104
107
|
var AuthProvidersKey;
|
|
108
|
+
function AuthConfig$isUnauthorizedResponse$slambda(resultContinuation) {
|
|
109
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
110
|
+
}
|
|
111
|
+
protoOf(AuthConfig$isUnauthorizedResponse$slambda).c4g = function (it, $completion) {
|
|
112
|
+
var tmp = this.y3i(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.c4g(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.b4g_1.b3c().equals(Companion_getInstance().n2t_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).y3i = function (it, completion) {
|
|
138
|
+
var i = new AuthConfig$isUnauthorizedResponse$slambda(completion);
|
|
139
|
+
i.b4g_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.c4g(it, $completion);
|
|
146
|
+
};
|
|
147
|
+
l.$arity = 1;
|
|
148
|
+
return l;
|
|
149
|
+
}
|
|
105
150
|
function AuthConfig() {
|
|
106
151
|
var tmp = this;
|
|
107
152
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
108
|
-
tmp.
|
|
153
|
+
tmp.d4g_1 = ArrayList_init_$Create$();
|
|
154
|
+
var tmp_0 = this;
|
|
155
|
+
tmp_0.e4g_1 = AuthConfig$isUnauthorizedResponse$slambda_0(null);
|
|
109
156
|
}
|
|
110
157
|
function AtomicCounter() {
|
|
111
|
-
this.
|
|
158
|
+
this.f4g_1 = atomic$int$1(0);
|
|
112
159
|
}
|
|
113
160
|
function AuthConfig$_init_$ref_ms3pb9() {
|
|
114
161
|
var l = function () {
|
|
@@ -119,8 +166,8 @@
|
|
|
119
166
|
}
|
|
120
167
|
function Auth$lambda($this$createClientPlugin) {
|
|
121
168
|
_init_properties_Auth_kt__9ob1dk();
|
|
122
|
-
var providers = toList($this$createClientPlugin.
|
|
123
|
-
$this$createClientPlugin.
|
|
169
|
+
var providers = toList($this$createClientPlugin.y3h_1.d4g_1);
|
|
170
|
+
$this$createClientPlugin.x3h_1.r37_1.e2f(get_AuthProvidersKey(), providers);
|
|
124
171
|
var tokenVersions = new ConcurrentMap();
|
|
125
172
|
// Inline function 'io.ktor.util.AttributeKey' call
|
|
126
173
|
var name = 'ProviderVersionAttributeKey';
|
|
@@ -129,7 +176,7 @@
|
|
|
129
176
|
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
130
177
|
var tmp_0;
|
|
131
178
|
try {
|
|
132
|
-
tmp_0 = createKType(getKClass(KtMutableMap), arrayOf([createInvariantKTypeProjection(createKType(getKClass(AuthProvider), arrayOf([]), false)), createInvariantKTypeProjection(createKType(PrimitiveClasses_getInstance().
|
|
179
|
+
tmp_0 = createKType(getKClass(KtMutableMap), arrayOf([createInvariantKTypeProjection(createKType(getKClass(AuthProvider), arrayOf([]), false)), createInvariantKTypeProjection(createKType(PrimitiveClasses_getInstance().mc(), arrayOf([]), false))]), false);
|
|
133
180
|
} catch ($p) {
|
|
134
181
|
var tmp_1;
|
|
135
182
|
if ($p instanceof Error) {
|
|
@@ -143,13 +190,13 @@
|
|
|
143
190
|
var tmp$ret$0 = tmp_0;
|
|
144
191
|
var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
|
|
145
192
|
var tokenVersionsAttributeKey = new AttributeKey(name, tmp$ret$1);
|
|
146
|
-
$this$createClientPlugin.
|
|
193
|
+
$this$createClientPlugin.l40(Auth$lambda$slambda_0(providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
147
194
|
var tmp_2 = Send_instance;
|
|
148
|
-
$this$createClientPlugin.
|
|
195
|
+
$this$createClientPlugin.b3i(tmp_2, Auth$lambda$slambda_2($this$createClientPlugin, providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
149
196
|
return Unit_instance;
|
|
150
197
|
}
|
|
151
198
|
function invoke$findProvider(call, candidateProviders) {
|
|
152
|
-
var headerValues = call.
|
|
199
|
+
var headerValues = call.o38().a2s().s2g(HttpHeaders_getInstance().z2q_1);
|
|
153
200
|
var tmp;
|
|
154
201
|
if (headerValues == null) {
|
|
155
202
|
tmp = null;
|
|
@@ -173,10 +220,16 @@
|
|
|
173
220
|
if (authHeaders.h() && candidateProviders.s() === 1) {
|
|
174
221
|
tmp_0 = to(first(candidateProviders), null);
|
|
175
222
|
} else if (authHeaders.h()) {
|
|
176
|
-
|
|
223
|
+
// Inline function 'io.ktor.util.logging.trace' call
|
|
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.x3b().a3c().toString() + ' has no or empty "WWW-Authenticate" header. ' + 'Can not add or refresh token';
|
|
228
|
+
this_0.j2l(tmp$ret$3);
|
|
229
|
+
}
|
|
177
230
|
tmp_0 = null;
|
|
178
231
|
} else {
|
|
179
|
-
var tmp$ret$
|
|
232
|
+
var tmp$ret$10;
|
|
180
233
|
$l$block_0: {
|
|
181
234
|
// Inline function 'kotlin.collections.firstNotNullOfOrNull' call
|
|
182
235
|
var _iterator__ex2g4s_0 = authHeaders.p();
|
|
@@ -184,21 +237,21 @@
|
|
|
184
237
|
var element = _iterator__ex2g4s_0.r();
|
|
185
238
|
// Inline function 'io.ktor.client.plugins.auth.Auth$lambda.invoke.findProvider.<anonymous>' call
|
|
186
239
|
// Inline function 'kotlin.collections.find' call
|
|
187
|
-
var tmp$ret$
|
|
240
|
+
var tmp$ret$5;
|
|
188
241
|
$l$block: {
|
|
189
242
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
190
243
|
var _iterator__ex2g4s_1 = candidateProviders.p();
|
|
191
244
|
while (_iterator__ex2g4s_1.q()) {
|
|
192
245
|
var element_0 = _iterator__ex2g4s_1.r();
|
|
193
246
|
// Inline function 'io.ktor.client.plugins.auth.Auth$lambda.invoke.findProvider.<anonymous>.<anonymous>' call
|
|
194
|
-
if (element_0.
|
|
195
|
-
tmp$ret$
|
|
247
|
+
if (element_0.g4g(element)) {
|
|
248
|
+
tmp$ret$5 = element_0;
|
|
196
249
|
break $l$block;
|
|
197
250
|
}
|
|
198
251
|
}
|
|
199
|
-
tmp$ret$
|
|
252
|
+
tmp$ret$5 = null;
|
|
200
253
|
}
|
|
201
|
-
var tmp0_safe_receiver = tmp$ret$
|
|
254
|
+
var tmp0_safe_receiver = tmp$ret$5;
|
|
202
255
|
var tmp_1;
|
|
203
256
|
if (tmp0_safe_receiver == null) {
|
|
204
257
|
tmp_1 = null;
|
|
@@ -209,27 +262,27 @@
|
|
|
209
262
|
}
|
|
210
263
|
var result = tmp_1;
|
|
211
264
|
if (!(result == null)) {
|
|
212
|
-
tmp$ret$
|
|
265
|
+
tmp$ret$10 = result;
|
|
213
266
|
break $l$block_0;
|
|
214
267
|
}
|
|
215
268
|
}
|
|
216
|
-
tmp$ret$
|
|
269
|
+
tmp$ret$10 = null;
|
|
217
270
|
}
|
|
218
|
-
tmp_0 = tmp$ret$
|
|
271
|
+
tmp_0 = tmp$ret$10;
|
|
219
272
|
}
|
|
220
273
|
return tmp_0;
|
|
221
274
|
}
|
|
222
275
|
function invoke$refreshTokenIfNeeded(tokenVersions, tokenVersionsAttributeKey, call, provider, request, $completion) {
|
|
223
276
|
var tmp = new $invoke$refreshTokenIfNeededCOROUTINE$0(tokenVersions, tokenVersionsAttributeKey, call, provider, request, $completion);
|
|
224
|
-
tmp.
|
|
225
|
-
tmp.
|
|
226
|
-
return tmp.
|
|
277
|
+
tmp.i9_1 = Unit_instance;
|
|
278
|
+
tmp.j9_1 = null;
|
|
279
|
+
return tmp.o9();
|
|
227
280
|
}
|
|
228
281
|
function invoke$executeWithNewToken(_this__u8e3s4, call, provider, oldRequest, authHeader, $completion) {
|
|
229
282
|
var tmp = new $invoke$executeWithNewTokenCOROUTINE$1(_this__u8e3s4, call, provider, oldRequest, authHeader, $completion);
|
|
230
|
-
tmp.
|
|
231
|
-
tmp.
|
|
232
|
-
return tmp.
|
|
283
|
+
tmp.i9_1 = Unit_instance;
|
|
284
|
+
tmp.j9_1 = null;
|
|
285
|
+
return tmp.o9();
|
|
233
286
|
}
|
|
234
287
|
function Auth$lambda$slambda$lambda() {
|
|
235
288
|
return new AtomicCounter();
|
|
@@ -239,224 +292,263 @@
|
|
|
239
292
|
return LinkedHashMap_init_$Create$();
|
|
240
293
|
}
|
|
241
294
|
function Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
242
|
-
this.
|
|
243
|
-
this.
|
|
244
|
-
this.
|
|
295
|
+
this.t4h_1 = $providers;
|
|
296
|
+
this.u4h_1 = $tokenVersions;
|
|
297
|
+
this.v4h_1 = $tokenVersionsAttributeKey;
|
|
245
298
|
CoroutineImpl.call(this, resultContinuation);
|
|
246
299
|
}
|
|
247
|
-
protoOf(Auth$lambda$slambda).
|
|
248
|
-
var tmp = this.
|
|
249
|
-
tmp.
|
|
250
|
-
tmp.
|
|
251
|
-
return tmp.
|
|
300
|
+
protoOf(Auth$lambda$slambda).y40 = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
301
|
+
var tmp = this.z40($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
302
|
+
tmp.i9_1 = Unit_instance;
|
|
303
|
+
tmp.j9_1 = null;
|
|
304
|
+
return tmp.o9();
|
|
252
305
|
};
|
|
253
|
-
protoOf(Auth$lambda$slambda).
|
|
306
|
+
protoOf(Auth$lambda$slambda).a41 = function (p1, p2, p3, $completion) {
|
|
254
307
|
var tmp = p1 instanceof OnRequestContext ? p1 : THROW_CCE();
|
|
255
308
|
var tmp_0 = p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE();
|
|
256
|
-
return this.
|
|
309
|
+
return this.y40(tmp, tmp_0, !(p3 == null) ? p3 : THROW_CCE(), $completion);
|
|
257
310
|
};
|
|
258
|
-
protoOf(Auth$lambda$slambda).
|
|
259
|
-
var suspendResult = this.
|
|
311
|
+
protoOf(Auth$lambda$slambda).o9 = function () {
|
|
312
|
+
var suspendResult = this.i9_1;
|
|
260
313
|
$sm: do
|
|
261
314
|
try {
|
|
262
|
-
var tmp = this.
|
|
315
|
+
var tmp = this.g9_1;
|
|
263
316
|
switch (tmp) {
|
|
264
317
|
case 0:
|
|
265
|
-
this.
|
|
318
|
+
this.h9_1 = 4;
|
|
266
319
|
var tmp_0 = this;
|
|
267
|
-
var tmp0 = this.
|
|
320
|
+
var tmp0 = this.t4h_1;
|
|
268
321
|
var destination = ArrayList_init_$Create$();
|
|
269
322
|
var _iterator__ex2g4s = tmp0.p();
|
|
270
323
|
while (_iterator__ex2g4s.q()) {
|
|
271
324
|
var element = _iterator__ex2g4s.r();
|
|
272
|
-
if (element.
|
|
325
|
+
if (element.h4i(this.x4h_1)) {
|
|
273
326
|
destination.k(element);
|
|
274
327
|
}
|
|
275
328
|
}
|
|
276
329
|
|
|
277
|
-
tmp_0.
|
|
278
|
-
this.
|
|
279
|
-
this.
|
|
280
|
-
this.
|
|
330
|
+
tmp_0.z4h_1 = destination;
|
|
331
|
+
this.a4i_1 = this.z4h_1;
|
|
332
|
+
this.b4i_1 = this.a4i_1.p();
|
|
333
|
+
this.g9_1 = 1;
|
|
281
334
|
continue $sm;
|
|
282
335
|
case 1:
|
|
283
|
-
if (!this.
|
|
284
|
-
this.
|
|
336
|
+
if (!this.b4i_1.q()) {
|
|
337
|
+
this.g9_1 = 3;
|
|
285
338
|
continue $sm;
|
|
286
339
|
}
|
|
287
340
|
|
|
288
|
-
this.
|
|
341
|
+
this.c4i_1 = this.b4i_1.r();
|
|
289
342
|
var tmp_1 = this;
|
|
290
|
-
tmp_1.
|
|
291
|
-
this.
|
|
292
|
-
|
|
343
|
+
tmp_1.d4i_1 = this.c4i_1;
|
|
344
|
+
this.e4i_1 = this.d4i_1;
|
|
345
|
+
var this_0 = get_LOGGER();
|
|
346
|
+
if (get_isTraceEnabled(this_0)) {
|
|
347
|
+
this_0.j2l('Adding auth headers for ' + this.x4h_1.o39_1.toString() + ' from provider ' + toString(this.e4i_1));
|
|
348
|
+
}
|
|
349
|
+
|
|
293
350
|
var tmp_2 = this;
|
|
294
|
-
tmp_2.
|
|
351
|
+
tmp_2.f4i_1 = this.u4h_1.b2l(this.e4i_1, Auth$lambda$slambda$lambda);
|
|
295
352
|
var tmp_3 = this;
|
|
296
|
-
tmp_3.
|
|
297
|
-
var
|
|
298
|
-
var
|
|
299
|
-
var value = this.
|
|
300
|
-
|
|
301
|
-
this.
|
|
302
|
-
suspendResult = this.
|
|
353
|
+
tmp_3.g4i_1 = this.x4h_1.t39_1.g2f(this.v4h_1, Auth$lambda$slambda$lambda_0);
|
|
354
|
+
var tmp1 = this.g4i_1;
|
|
355
|
+
var tmp2 = this.e4i_1;
|
|
356
|
+
var value = this.f4i_1.f4g_1.kotlinx$atomicfu$value;
|
|
357
|
+
tmp1.n2(tmp2, value);
|
|
358
|
+
this.g9_1 = 2;
|
|
359
|
+
suspendResult = this.e4i_1.i4i(this.x4h_1, VOID, this);
|
|
303
360
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
304
361
|
return suspendResult;
|
|
305
362
|
}
|
|
306
363
|
|
|
307
364
|
continue $sm;
|
|
308
365
|
case 2:
|
|
309
|
-
this.
|
|
366
|
+
this.g9_1 = 1;
|
|
310
367
|
continue $sm;
|
|
311
368
|
case 3:
|
|
312
369
|
return Unit_instance;
|
|
313
370
|
case 4:
|
|
314
|
-
throw this.
|
|
371
|
+
throw this.j9_1;
|
|
315
372
|
}
|
|
316
373
|
} catch ($p) {
|
|
317
374
|
var e = $p;
|
|
318
|
-
if (this.
|
|
375
|
+
if (this.h9_1 === 4) {
|
|
319
376
|
throw e;
|
|
320
377
|
} else {
|
|
321
|
-
this.
|
|
322
|
-
this.
|
|
378
|
+
this.g9_1 = this.h9_1;
|
|
379
|
+
this.j9_1 = e;
|
|
323
380
|
}
|
|
324
381
|
}
|
|
325
382
|
while (true);
|
|
326
383
|
};
|
|
327
|
-
protoOf(Auth$lambda$slambda).
|
|
328
|
-
var i = new Auth$lambda$slambda(this.
|
|
329
|
-
i.
|
|
330
|
-
i.
|
|
331
|
-
i.
|
|
384
|
+
protoOf(Auth$lambda$slambda).z40 = function ($this$onRequest, request, _unused_var__etf5q3, completion) {
|
|
385
|
+
var i = new Auth$lambda$slambda(this.t4h_1, this.u4h_1, this.v4h_1, completion);
|
|
386
|
+
i.w4h_1 = $this$onRequest;
|
|
387
|
+
i.x4h_1 = request;
|
|
388
|
+
i.y4h_1 = _unused_var__etf5q3;
|
|
332
389
|
return i;
|
|
333
390
|
};
|
|
334
391
|
function Auth$lambda$slambda_0($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
335
392
|
var i = new Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
336
393
|
var l = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
337
|
-
return i.
|
|
394
|
+
return i.y40($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
338
395
|
};
|
|
339
396
|
l.$arity = 3;
|
|
340
397
|
return l;
|
|
341
398
|
}
|
|
342
|
-
function Auth$lambda$slambda_1($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
343
|
-
this.
|
|
344
|
-
this.
|
|
345
|
-
this.
|
|
399
|
+
function Auth$lambda$slambda_1($this_createClientPlugin, $providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
400
|
+
this.r4i_1 = $this_createClientPlugin;
|
|
401
|
+
this.s4i_1 = $providers;
|
|
402
|
+
this.t4i_1 = $tokenVersions;
|
|
403
|
+
this.u4i_1 = $tokenVersionsAttributeKey;
|
|
346
404
|
CoroutineImpl.call(this, resultContinuation);
|
|
347
405
|
}
|
|
348
|
-
protoOf(Auth$lambda$slambda_1).
|
|
349
|
-
var tmp = this.
|
|
350
|
-
tmp.
|
|
351
|
-
tmp.
|
|
352
|
-
return tmp.
|
|
406
|
+
protoOf(Auth$lambda$slambda_1).g3r = function ($this$on, originalRequest, $completion) {
|
|
407
|
+
var tmp = this.h3r($this$on, originalRequest, $completion);
|
|
408
|
+
tmp.i9_1 = Unit_instance;
|
|
409
|
+
tmp.j9_1 = null;
|
|
410
|
+
return tmp.o9();
|
|
353
411
|
};
|
|
354
|
-
protoOf(Auth$lambda$slambda_1).
|
|
412
|
+
protoOf(Auth$lambda$slambda_1).da = function (p1, p2, $completion) {
|
|
355
413
|
var tmp = p1 instanceof Sender ? p1 : THROW_CCE();
|
|
356
|
-
return this.
|
|
414
|
+
return this.g3r(tmp, p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE(), $completion);
|
|
357
415
|
};
|
|
358
|
-
protoOf(Auth$lambda$slambda_1).
|
|
359
|
-
var suspendResult = this.
|
|
416
|
+
protoOf(Auth$lambda$slambda_1).o9 = function () {
|
|
417
|
+
var suspendResult = this.i9_1;
|
|
360
418
|
$sm: do
|
|
361
419
|
try {
|
|
362
|
-
var tmp = this.
|
|
420
|
+
var tmp = this.g9_1;
|
|
363
421
|
switch (tmp) {
|
|
364
422
|
case 0:
|
|
365
|
-
this.
|
|
366
|
-
this.
|
|
367
|
-
suspendResult = this.
|
|
423
|
+
this.h9_1 = 10;
|
|
424
|
+
this.g9_1 = 1;
|
|
425
|
+
suspendResult = this.v4i_1.k3r(this.w4i_1, this);
|
|
368
426
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
369
427
|
return suspendResult;
|
|
370
428
|
}
|
|
371
429
|
|
|
372
430
|
continue $sm;
|
|
373
431
|
case 1:
|
|
374
|
-
this.
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
if (
|
|
378
|
-
return
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
this.d9_1 = 2;
|
|
432
|
+
this.x4i_1 = suspendResult;
|
|
433
|
+
this.g9_1 = 2;
|
|
434
|
+
suspendResult = this.r4i_1.y3h_1.e4g_1(this.x4i_1.o38(), this);
|
|
435
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
436
|
+
return suspendResult;
|
|
437
|
+
}
|
|
438
|
+
|
|
382
439
|
continue $sm;
|
|
383
440
|
case 2:
|
|
384
|
-
|
|
385
|
-
|
|
441
|
+
this.y4i_1 = suspendResult;
|
|
442
|
+
if (!this.y4i_1) {
|
|
443
|
+
return this.x4i_1;
|
|
444
|
+
} else {
|
|
445
|
+
this.g9_1 = 3;
|
|
386
446
|
continue $sm;
|
|
387
447
|
}
|
|
388
448
|
|
|
389
|
-
|
|
449
|
+
case 3:
|
|
450
|
+
if (this.x4i_1.x3b().w3a().d2f(get_AuthCircuitBreaker()))
|
|
451
|
+
return this.x4i_1;
|
|
452
|
+
this.z4i_1 = this.x4i_1;
|
|
453
|
+
this.a4j_1 = HashSet_init_$Create$(this.s4i_1);
|
|
454
|
+
this.g9_1 = 4;
|
|
455
|
+
continue $sm;
|
|
456
|
+
case 4:
|
|
457
|
+
this.g9_1 = 5;
|
|
458
|
+
suspendResult = this.r4i_1.y3h_1.e4g_1(this.z4i_1.o38(), 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.j2l('Unauthorized response for ' + this.z4i_1.x3b().a3c().toString());
|
|
473
|
+
}
|
|
474
|
+
|
|
390
475
|
var tmp_0 = this;
|
|
391
|
-
var tmp0_elvis_lhs = invoke$findProvider(this.
|
|
476
|
+
var tmp0_elvis_lhs = invoke$findProvider(this.z4i_1, this.a4j_1);
|
|
392
477
|
var tmp_1;
|
|
393
478
|
if (tmp0_elvis_lhs == null) {
|
|
394
|
-
this.
|
|
395
|
-
|
|
396
|
-
|
|
479
|
+
this.v4i_1;
|
|
480
|
+
var this_1 = get_LOGGER();
|
|
481
|
+
if (get_isTraceEnabled(this_1)) {
|
|
482
|
+
this_1.j2l('Can not find auth provider for ' + this.z4i_1.x3b().a3c().toString());
|
|
483
|
+
}
|
|
484
|
+
return this.z4i_1;
|
|
397
485
|
} else {
|
|
398
486
|
tmp_1 = tmp0_elvis_lhs;
|
|
399
487
|
}
|
|
400
488
|
|
|
401
|
-
tmp_0.
|
|
402
|
-
this.
|
|
403
|
-
this.
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
489
|
+
tmp_0.b4j_1 = tmp_1;
|
|
490
|
+
this.c4j_1 = this.b4j_1.pg();
|
|
491
|
+
this.d4j_1 = this.b4j_1.qg();
|
|
492
|
+
var this_2 = get_LOGGER();
|
|
493
|
+
if (get_isTraceEnabled(this_2)) {
|
|
494
|
+
this_2.j2l('Using provider ' + toString(this.c4j_1) + ' for ' + this.z4i_1.x3b().a3c().toString());
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
this.a4j_1.d2(this.c4j_1);
|
|
498
|
+
this.g9_1 = 6;
|
|
499
|
+
suspendResult = invoke$refreshTokenIfNeeded(this.t4i_1, this.u4i_1, this.z4i_1, this.c4j_1, this.w4i_1, this);
|
|
408
500
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
409
501
|
return suspendResult;
|
|
410
502
|
}
|
|
411
503
|
|
|
412
504
|
continue $sm;
|
|
413
|
-
case
|
|
414
|
-
this.
|
|
415
|
-
if (!this.
|
|
416
|
-
return this.
|
|
505
|
+
case 6:
|
|
506
|
+
this.e4j_1 = suspendResult;
|
|
507
|
+
if (!this.e4j_1) {
|
|
508
|
+
return this.z4i_1;
|
|
417
509
|
} else {
|
|
418
|
-
this.
|
|
510
|
+
this.g9_1 = 7;
|
|
419
511
|
continue $sm;
|
|
420
512
|
}
|
|
421
513
|
|
|
422
|
-
case
|
|
423
|
-
this.
|
|
424
|
-
suspendResult = invoke$executeWithNewToken(this.
|
|
514
|
+
case 7:
|
|
515
|
+
this.g9_1 = 8;
|
|
516
|
+
suspendResult = invoke$executeWithNewToken(this.v4i_1, this.z4i_1, this.c4j_1, this.w4i_1, this.d4j_1, this);
|
|
425
517
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
426
518
|
return suspendResult;
|
|
427
519
|
}
|
|
428
520
|
|
|
429
521
|
continue $sm;
|
|
430
|
-
case
|
|
431
|
-
this.
|
|
432
|
-
this.
|
|
522
|
+
case 8:
|
|
523
|
+
this.z4i_1 = suspendResult;
|
|
524
|
+
this.g9_1 = 4;
|
|
433
525
|
continue $sm;
|
|
434
|
-
case
|
|
435
|
-
return this.
|
|
436
|
-
case
|
|
437
|
-
throw this.
|
|
526
|
+
case 9:
|
|
527
|
+
return this.z4i_1;
|
|
528
|
+
case 10:
|
|
529
|
+
throw this.j9_1;
|
|
438
530
|
}
|
|
439
531
|
} catch ($p) {
|
|
440
532
|
var e = $p;
|
|
441
|
-
if (this.
|
|
533
|
+
if (this.h9_1 === 10) {
|
|
442
534
|
throw e;
|
|
443
535
|
} else {
|
|
444
|
-
this.
|
|
445
|
-
this.
|
|
536
|
+
this.g9_1 = this.h9_1;
|
|
537
|
+
this.j9_1 = e;
|
|
446
538
|
}
|
|
447
539
|
}
|
|
448
540
|
while (true);
|
|
449
541
|
};
|
|
450
|
-
protoOf(Auth$lambda$slambda_1).
|
|
451
|
-
var i = new Auth$lambda$slambda_1(this.
|
|
452
|
-
i.
|
|
453
|
-
i.
|
|
542
|
+
protoOf(Auth$lambda$slambda_1).h3r = function ($this$on, originalRequest, completion) {
|
|
543
|
+
var i = new Auth$lambda$slambda_1(this.r4i_1, this.s4i_1, this.t4i_1, this.u4i_1, completion);
|
|
544
|
+
i.v4i_1 = $this$on;
|
|
545
|
+
i.w4i_1 = originalRequest;
|
|
454
546
|
return i;
|
|
455
547
|
};
|
|
456
|
-
function Auth$lambda$slambda_2($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
457
|
-
var i = new Auth$lambda$slambda_1($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
548
|
+
function Auth$lambda$slambda_2($this_createClientPlugin, $providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
549
|
+
var i = new Auth$lambda$slambda_1($this_createClientPlugin, $providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
458
550
|
var l = function ($this$on, originalRequest, $completion) {
|
|
459
|
-
return i.
|
|
551
|
+
return i.g3r($this$on, originalRequest, $completion);
|
|
460
552
|
};
|
|
461
553
|
l.$arity = 2;
|
|
462
554
|
return l;
|
|
@@ -472,101 +564,111 @@
|
|
|
472
564
|
}
|
|
473
565
|
function $invoke$refreshTokenIfNeededCOROUTINE$0(tokenVersions, tokenVersionsAttributeKey, call, provider, request, resultContinuation) {
|
|
474
566
|
CoroutineImpl.call(this, resultContinuation);
|
|
475
|
-
this.
|
|
476
|
-
this.
|
|
477
|
-
this.
|
|
478
|
-
this.
|
|
479
|
-
this.
|
|
567
|
+
this.p4g_1 = tokenVersions;
|
|
568
|
+
this.q4g_1 = tokenVersionsAttributeKey;
|
|
569
|
+
this.r4g_1 = call;
|
|
570
|
+
this.s4g_1 = provider;
|
|
571
|
+
this.t4g_1 = request;
|
|
480
572
|
}
|
|
481
|
-
protoOf($invoke$refreshTokenIfNeededCOROUTINE$0).
|
|
482
|
-
var suspendResult = this.
|
|
573
|
+
protoOf($invoke$refreshTokenIfNeededCOROUTINE$0).o9 = function () {
|
|
574
|
+
var suspendResult = this.i9_1;
|
|
483
575
|
$sm: do
|
|
484
576
|
try {
|
|
485
|
-
var tmp = this.
|
|
577
|
+
var tmp = this.g9_1;
|
|
486
578
|
switch (tmp) {
|
|
487
579
|
case 0:
|
|
488
|
-
this.
|
|
580
|
+
this.h9_1 = 4;
|
|
489
581
|
var tmp_0 = this;
|
|
490
|
-
tmp_0.
|
|
582
|
+
tmp_0.u4g_1 = this.p4g_1.b2l(this.s4g_1, Auth$lambda$refreshTokenIfNeeded$lambda);
|
|
491
583
|
var tmp_1 = this;
|
|
492
|
-
tmp_1.
|
|
493
|
-
this.
|
|
494
|
-
if (!(this.
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
584
|
+
tmp_1.v4g_1 = this.t4g_1.t39_1.g2f(this.q4g_1, Auth$lambda$refreshTokenIfNeeded$lambda_0);
|
|
585
|
+
this.w4g_1 = this.v4g_1.k2(this.s4g_1);
|
|
586
|
+
if (!(this.w4g_1 == null) && this.w4g_1 >= this.u4g_1.f4g_1.kotlinx$atomicfu$value) {
|
|
587
|
+
var this_0 = get_LOGGER();
|
|
588
|
+
if (get_isTraceEnabled(this_0)) {
|
|
589
|
+
this_0.j2l('Refreshing token for ' + this.r4g_1.x3b().a3c().toString());
|
|
590
|
+
}
|
|
591
|
+
this.g9_1 = 1;
|
|
592
|
+
suspendResult = this.s4g_1.f4j(this.r4g_1.o38(), this);
|
|
498
593
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
499
594
|
return suspendResult;
|
|
500
595
|
}
|
|
501
596
|
continue $sm;
|
|
502
597
|
} else {
|
|
503
|
-
this.
|
|
598
|
+
this.g9_1 = 3;
|
|
504
599
|
continue $sm;
|
|
505
600
|
}
|
|
506
601
|
|
|
507
602
|
case 1:
|
|
508
603
|
var ARGUMENT = suspendResult;
|
|
509
604
|
if (!ARGUMENT) {
|
|
510
|
-
|
|
605
|
+
var this_1 = get_LOGGER();
|
|
606
|
+
if (get_isTraceEnabled(this_1)) {
|
|
607
|
+
this_1.j2l('Refreshing token failed for ' + this.r4g_1.x3b().a3c().toString());
|
|
608
|
+
}
|
|
511
609
|
return false;
|
|
512
610
|
} else {
|
|
513
|
-
var
|
|
514
|
-
var
|
|
515
|
-
var value = this.
|
|
516
|
-
|
|
517
|
-
this.
|
|
611
|
+
var tmp2 = this.v4g_1;
|
|
612
|
+
var tmp3 = this.s4g_1;
|
|
613
|
+
var value = this.u4g_1.f4g_1.atomicfu$incrementAndGet();
|
|
614
|
+
tmp2.n2(tmp3, value);
|
|
615
|
+
this.g9_1 = 2;
|
|
518
616
|
continue $sm;
|
|
519
617
|
}
|
|
520
618
|
|
|
521
619
|
case 2:
|
|
522
|
-
this.
|
|
620
|
+
this.g9_1 = 3;
|
|
523
621
|
continue $sm;
|
|
524
622
|
case 3:
|
|
525
623
|
return true;
|
|
526
624
|
case 4:
|
|
527
|
-
throw this.
|
|
625
|
+
throw this.j9_1;
|
|
528
626
|
}
|
|
529
627
|
} catch ($p) {
|
|
530
628
|
var e = $p;
|
|
531
|
-
if (this.
|
|
629
|
+
if (this.h9_1 === 4) {
|
|
532
630
|
throw e;
|
|
533
631
|
} else {
|
|
534
|
-
this.
|
|
535
|
-
this.
|
|
632
|
+
this.g9_1 = this.h9_1;
|
|
633
|
+
this.j9_1 = e;
|
|
536
634
|
}
|
|
537
635
|
}
|
|
538
636
|
while (true);
|
|
539
637
|
};
|
|
540
638
|
function $invoke$executeWithNewTokenCOROUTINE$1(_this__u8e3s4, call, provider, oldRequest, authHeader, resultContinuation) {
|
|
541
639
|
CoroutineImpl.call(this, resultContinuation);
|
|
542
|
-
this.
|
|
543
|
-
this.
|
|
544
|
-
this.
|
|
545
|
-
this.
|
|
546
|
-
this.
|
|
640
|
+
this.f4h_1 = _this__u8e3s4;
|
|
641
|
+
this.g4h_1 = call;
|
|
642
|
+
this.h4h_1 = provider;
|
|
643
|
+
this.i4h_1 = oldRequest;
|
|
644
|
+
this.j4h_1 = authHeader;
|
|
547
645
|
}
|
|
548
|
-
protoOf($invoke$executeWithNewTokenCOROUTINE$1).
|
|
549
|
-
var suspendResult = this.
|
|
646
|
+
protoOf($invoke$executeWithNewTokenCOROUTINE$1).o9 = function () {
|
|
647
|
+
var suspendResult = this.i9_1;
|
|
550
648
|
$sm: do
|
|
551
649
|
try {
|
|
552
|
-
var tmp = this.
|
|
650
|
+
var tmp = this.g9_1;
|
|
553
651
|
switch (tmp) {
|
|
554
652
|
case 0:
|
|
555
|
-
this.
|
|
556
|
-
this.
|
|
557
|
-
this.
|
|
558
|
-
this.
|
|
559
|
-
suspendResult = this.
|
|
653
|
+
this.h9_1 = 3;
|
|
654
|
+
this.k4h_1 = new HttpRequestBuilder();
|
|
655
|
+
this.k4h_1.k3f(this.i4h_1);
|
|
656
|
+
this.g9_1 = 1;
|
|
657
|
+
suspendResult = this.h4h_1.g4j(this.k4h_1, this.j4h_1, this);
|
|
560
658
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
561
659
|
return suspendResult;
|
|
562
660
|
}
|
|
563
661
|
|
|
564
662
|
continue $sm;
|
|
565
663
|
case 1:
|
|
566
|
-
this.
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
664
|
+
this.k4h_1.t39_1.e2f(get_AuthCircuitBreaker(), Unit_instance);
|
|
665
|
+
var this_0 = get_LOGGER();
|
|
666
|
+
if (get_isTraceEnabled(this_0)) {
|
|
667
|
+
this_0.j2l('Sending new request to ' + this.g4h_1.x3b().a3c().toString());
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
this.g9_1 = 2;
|
|
671
|
+
suspendResult = this.f4h_1.k3r(this.k4h_1, this);
|
|
570
672
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
571
673
|
return suspendResult;
|
|
572
674
|
}
|
|
@@ -575,15 +677,15 @@
|
|
|
575
677
|
case 2:
|
|
576
678
|
return suspendResult;
|
|
577
679
|
case 3:
|
|
578
|
-
throw this.
|
|
680
|
+
throw this.j9_1;
|
|
579
681
|
}
|
|
580
682
|
} catch ($p) {
|
|
581
683
|
var e = $p;
|
|
582
|
-
if (this.
|
|
684
|
+
if (this.h9_1 === 3) {
|
|
583
685
|
throw e;
|
|
584
686
|
} else {
|
|
585
|
-
this.
|
|
586
|
-
this.
|
|
687
|
+
this.g9_1 = this.h9_1;
|
|
688
|
+
this.j9_1 = e;
|
|
587
689
|
}
|
|
588
690
|
}
|
|
589
691
|
while (true);
|
|
@@ -643,43 +745,43 @@
|
|
|
643
745
|
}
|
|
644
746
|
function $loadTokenCOROUTINE$2(_this__u8e3s4, resultContinuation) {
|
|
645
747
|
CoroutineImpl.call(this, resultContinuation);
|
|
646
|
-
this.
|
|
748
|
+
this.q4j_1 = _this__u8e3s4;
|
|
647
749
|
}
|
|
648
|
-
protoOf($loadTokenCOROUTINE$2).
|
|
649
|
-
var suspendResult = this.
|
|
750
|
+
protoOf($loadTokenCOROUTINE$2).o9 = function () {
|
|
751
|
+
var suspendResult = this.i9_1;
|
|
650
752
|
$sm: do
|
|
651
753
|
try {
|
|
652
|
-
var tmp = this.
|
|
754
|
+
var tmp = this.g9_1;
|
|
653
755
|
switch (tmp) {
|
|
654
756
|
case 0:
|
|
655
|
-
this.
|
|
656
|
-
this.
|
|
757
|
+
this.h9_1 = 5;
|
|
758
|
+
this.s4j_1 = null;
|
|
657
759
|
$l$loop: while (true) {
|
|
658
|
-
this.
|
|
659
|
-
var tmp0_elvis_lhs = this.
|
|
760
|
+
this.r4j_1 = this.q4j_1.v4j_1.kotlinx$atomicfu$value;
|
|
761
|
+
var tmp0_elvis_lhs = this.r4j_1;
|
|
660
762
|
var newValue = tmp0_elvis_lhs == null ? CompletableDeferred() : tmp0_elvis_lhs;
|
|
661
|
-
if (this.
|
|
662
|
-
this.
|
|
763
|
+
if (this.q4j_1.v4j_1.atomicfu$compareAndSet(this.r4j_1, newValue)) {
|
|
764
|
+
this.s4j_1 = newValue;
|
|
663
765
|
break $l$loop;
|
|
664
766
|
}
|
|
665
767
|
}
|
|
666
768
|
|
|
667
|
-
if (!(this.
|
|
668
|
-
this.
|
|
669
|
-
suspendResult = this.
|
|
769
|
+
if (!(this.r4j_1 == null)) {
|
|
770
|
+
this.g9_1 = 4;
|
|
771
|
+
suspendResult = this.r4j_1.cr(this);
|
|
670
772
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
671
773
|
return suspendResult;
|
|
672
774
|
}
|
|
673
775
|
continue $sm;
|
|
674
776
|
} else {
|
|
675
|
-
this.
|
|
777
|
+
this.g9_1 = 1;
|
|
676
778
|
continue $sm;
|
|
677
779
|
}
|
|
678
780
|
|
|
679
781
|
case 1:
|
|
680
|
-
this.
|
|
681
|
-
this.
|
|
682
|
-
suspendResult = this.
|
|
782
|
+
this.h9_1 = 3;
|
|
783
|
+
this.g9_1 = 2;
|
|
784
|
+
suspendResult = this.q4j_1.t4j_1(this);
|
|
683
785
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
684
786
|
return suspendResult;
|
|
685
787
|
}
|
|
@@ -688,89 +790,89 @@
|
|
|
688
790
|
case 2:
|
|
689
791
|
var newTokens = suspendResult;
|
|
690
792
|
var tmp_0;
|
|
691
|
-
if (this.
|
|
793
|
+
if (this.s4j_1 == null) {
|
|
692
794
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
693
795
|
} else {
|
|
694
|
-
tmp_0 = this.
|
|
796
|
+
tmp_0 = this.s4j_1;
|
|
695
797
|
}
|
|
696
798
|
|
|
697
|
-
tmp_0.
|
|
799
|
+
tmp_0.av(newTokens);
|
|
698
800
|
return newTokens;
|
|
699
801
|
case 3:
|
|
700
|
-
this.
|
|
701
|
-
var tmp_1 = this.
|
|
802
|
+
this.h9_1 = 5;
|
|
803
|
+
var tmp_1 = this.j9_1;
|
|
702
804
|
if (tmp_1 instanceof Error) {
|
|
703
|
-
var cause = this.
|
|
805
|
+
var cause = this.j9_1;
|
|
704
806
|
var tmp_2;
|
|
705
|
-
if (this.
|
|
807
|
+
if (this.s4j_1 == null) {
|
|
706
808
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
707
809
|
} else {
|
|
708
|
-
tmp_2 = this.
|
|
810
|
+
tmp_2 = this.s4j_1;
|
|
709
811
|
}
|
|
710
|
-
tmp_2.
|
|
812
|
+
tmp_2.cv(cause);
|
|
711
813
|
var tmp_3;
|
|
712
|
-
if (this.
|
|
814
|
+
if (this.s4j_1 == null) {
|
|
713
815
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
714
816
|
} else {
|
|
715
|
-
tmp_3 = this.
|
|
817
|
+
tmp_3 = this.s4j_1;
|
|
716
818
|
}
|
|
717
|
-
this.
|
|
819
|
+
this.q4j_1.v4j_1.atomicfu$compareAndSet(tmp_3, null);
|
|
718
820
|
throw cause;
|
|
719
821
|
} else {
|
|
720
|
-
throw this.
|
|
822
|
+
throw this.j9_1;
|
|
721
823
|
}
|
|
722
824
|
|
|
723
825
|
case 4:
|
|
724
826
|
return suspendResult;
|
|
725
827
|
case 5:
|
|
726
|
-
throw this.
|
|
828
|
+
throw this.j9_1;
|
|
727
829
|
}
|
|
728
830
|
} catch ($p) {
|
|
729
831
|
var e = $p;
|
|
730
|
-
if (this.
|
|
832
|
+
if (this.h9_1 === 5) {
|
|
731
833
|
throw e;
|
|
732
834
|
} else {
|
|
733
|
-
this.
|
|
734
|
-
this.
|
|
835
|
+
this.g9_1 = this.h9_1;
|
|
836
|
+
this.j9_1 = e;
|
|
735
837
|
}
|
|
736
838
|
}
|
|
737
839
|
while (true);
|
|
738
840
|
};
|
|
739
841
|
function $setTokenCOROUTINE$3(_this__u8e3s4, block, resultContinuation) {
|
|
740
842
|
CoroutineImpl.call(this, resultContinuation);
|
|
741
|
-
this.
|
|
742
|
-
this.
|
|
843
|
+
this.e4k_1 = _this__u8e3s4;
|
|
844
|
+
this.f4k_1 = block;
|
|
743
845
|
}
|
|
744
|
-
protoOf($setTokenCOROUTINE$3).
|
|
745
|
-
var suspendResult = this.
|
|
846
|
+
protoOf($setTokenCOROUTINE$3).o9 = function () {
|
|
847
|
+
var suspendResult = this.i9_1;
|
|
746
848
|
$sm: do
|
|
747
849
|
try {
|
|
748
|
-
var tmp = this.
|
|
850
|
+
var tmp = this.g9_1;
|
|
749
851
|
switch (tmp) {
|
|
750
852
|
case 0:
|
|
751
|
-
this.
|
|
752
|
-
this.
|
|
853
|
+
this.h9_1 = 5;
|
|
854
|
+
this.h4k_1 = null;
|
|
753
855
|
$l$loop: while (true) {
|
|
754
|
-
this.
|
|
755
|
-
var tmp0_elvis_lhs = this.
|
|
856
|
+
this.g4k_1 = this.e4k_1.u4j_1.kotlinx$atomicfu$value;
|
|
857
|
+
var tmp0_elvis_lhs = this.g4k_1;
|
|
756
858
|
var newValue = tmp0_elvis_lhs == null ? CompletableDeferred() : tmp0_elvis_lhs;
|
|
757
|
-
if (this.
|
|
758
|
-
this.
|
|
859
|
+
if (this.e4k_1.u4j_1.atomicfu$compareAndSet(this.g4k_1, newValue)) {
|
|
860
|
+
this.h4k_1 = newValue;
|
|
759
861
|
break $l$loop;
|
|
760
862
|
}
|
|
761
863
|
}
|
|
762
864
|
|
|
763
|
-
this.
|
|
764
|
-
if (this.
|
|
765
|
-
this.
|
|
766
|
-
suspendResult = this.
|
|
865
|
+
this.h9_1 = 4;
|
|
866
|
+
if (this.g4k_1 == null) {
|
|
867
|
+
this.g9_1 = 2;
|
|
868
|
+
suspendResult = this.f4k_1(this);
|
|
767
869
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
768
870
|
return suspendResult;
|
|
769
871
|
}
|
|
770
872
|
continue $sm;
|
|
771
873
|
} else {
|
|
772
|
-
this.
|
|
773
|
-
suspendResult = this.
|
|
874
|
+
this.g9_1 = 1;
|
|
875
|
+
suspendResult = this.g4k_1.cr(this);
|
|
774
876
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
775
877
|
return suspendResult;
|
|
776
878
|
}
|
|
@@ -778,81 +880,81 @@
|
|
|
778
880
|
}
|
|
779
881
|
|
|
780
882
|
case 1:
|
|
781
|
-
this.
|
|
782
|
-
this.
|
|
883
|
+
this.i4k_1 = suspendResult;
|
|
884
|
+
this.g9_1 = 3;
|
|
783
885
|
continue $sm;
|
|
784
886
|
case 2:
|
|
785
887
|
var newTokens = suspendResult;
|
|
786
888
|
var tmp_0;
|
|
787
|
-
if (this.
|
|
889
|
+
if (this.h4k_1 == null) {
|
|
788
890
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
789
891
|
} else {
|
|
790
|
-
tmp_0 = this.
|
|
892
|
+
tmp_0 = this.h4k_1;
|
|
791
893
|
}
|
|
792
894
|
|
|
793
|
-
tmp_0.
|
|
794
|
-
this.
|
|
795
|
-
this.
|
|
796
|
-
this.
|
|
895
|
+
tmp_0.av(newTokens);
|
|
896
|
+
this.e4k_1.u4j_1.kotlinx$atomicfu$value = null;
|
|
897
|
+
this.i4k_1 = newTokens;
|
|
898
|
+
this.g9_1 = 3;
|
|
797
899
|
continue $sm;
|
|
798
900
|
case 3:
|
|
799
|
-
var newToken = this.
|
|
800
|
-
this.
|
|
901
|
+
var newToken = this.i4k_1;
|
|
902
|
+
this.e4k_1.v4j_1.kotlinx$atomicfu$value = CompletableDeferred_0(newToken);
|
|
801
903
|
return newToken;
|
|
802
904
|
case 4:
|
|
803
|
-
this.
|
|
804
|
-
var tmp_1 = this.
|
|
905
|
+
this.h9_1 = 5;
|
|
906
|
+
var tmp_1 = this.j9_1;
|
|
805
907
|
if (tmp_1 instanceof Error) {
|
|
806
|
-
var cause = this.
|
|
908
|
+
var cause = this.j9_1;
|
|
807
909
|
var tmp_2;
|
|
808
|
-
if (this.
|
|
910
|
+
if (this.h4k_1 == null) {
|
|
809
911
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
810
912
|
} else {
|
|
811
|
-
tmp_2 = this.
|
|
913
|
+
tmp_2 = this.h4k_1;
|
|
812
914
|
}
|
|
813
|
-
tmp_2.
|
|
915
|
+
tmp_2.cv(cause);
|
|
814
916
|
var tmp_3;
|
|
815
|
-
if (this.
|
|
917
|
+
if (this.h4k_1 == null) {
|
|
816
918
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
817
919
|
} else {
|
|
818
|
-
tmp_3 = this.
|
|
920
|
+
tmp_3 = this.h4k_1;
|
|
819
921
|
}
|
|
820
|
-
this.
|
|
922
|
+
this.e4k_1.u4j_1.atomicfu$compareAndSet(tmp_3, null);
|
|
821
923
|
throw cause;
|
|
822
924
|
} else {
|
|
823
|
-
throw this.
|
|
925
|
+
throw this.j9_1;
|
|
824
926
|
}
|
|
825
927
|
|
|
826
928
|
case 5:
|
|
827
|
-
throw this.
|
|
929
|
+
throw this.j9_1;
|
|
828
930
|
}
|
|
829
931
|
} catch ($p) {
|
|
830
932
|
var e = $p;
|
|
831
|
-
if (this.
|
|
933
|
+
if (this.h9_1 === 5) {
|
|
832
934
|
throw e;
|
|
833
935
|
} else {
|
|
834
|
-
this.
|
|
835
|
-
this.
|
|
936
|
+
this.g9_1 = this.h9_1;
|
|
937
|
+
this.j9_1 = e;
|
|
836
938
|
}
|
|
837
939
|
}
|
|
838
940
|
while (true);
|
|
839
941
|
};
|
|
840
942
|
function AuthTokenHolder(loadTokens) {
|
|
841
|
-
this.
|
|
842
|
-
this.
|
|
843
|
-
this.
|
|
943
|
+
this.t4j_1 = loadTokens;
|
|
944
|
+
this.u4j_1 = atomic$ref$1(null);
|
|
945
|
+
this.v4j_1 = atomic$ref$1(null);
|
|
844
946
|
}
|
|
845
|
-
protoOf(AuthTokenHolder).
|
|
947
|
+
protoOf(AuthTokenHolder).j4k = function ($completion) {
|
|
846
948
|
var tmp = new $loadTokenCOROUTINE$2(this, $completion);
|
|
847
|
-
tmp.
|
|
848
|
-
tmp.
|
|
849
|
-
return tmp.
|
|
949
|
+
tmp.i9_1 = Unit_instance;
|
|
950
|
+
tmp.j9_1 = null;
|
|
951
|
+
return tmp.o9();
|
|
850
952
|
};
|
|
851
|
-
protoOf(AuthTokenHolder).
|
|
953
|
+
protoOf(AuthTokenHolder).k4k = function (block, $completion) {
|
|
852
954
|
var tmp = new $setTokenCOROUTINE$3(this, block, $completion);
|
|
853
|
-
tmp.
|
|
854
|
-
tmp.
|
|
855
|
-
return tmp.
|
|
955
|
+
tmp.i9_1 = Unit_instance;
|
|
956
|
+
tmp.j9_1 = null;
|
|
957
|
+
return tmp.o9();
|
|
856
958
|
};
|
|
857
959
|
function bearer(_this__u8e3s4, block) {
|
|
858
960
|
// Inline function 'kotlin.apply' call
|
|
@@ -860,30 +962,30 @@
|
|
|
860
962
|
block(this_0);
|
|
861
963
|
// Inline function 'kotlin.with' call
|
|
862
964
|
// Inline function 'io.ktor.client.plugins.auth.providers.bearer.<anonymous>' call
|
|
863
|
-
_this__u8e3s4.
|
|
965
|
+
_this__u8e3s4.d4g_1.k(new BearerAuthProvider(this_0.l4k_1, this_0.m4k_1, this_0.n4k_1, this_0.o4k_1));
|
|
864
966
|
}
|
|
865
|
-
function BearerAuthConfig$
|
|
967
|
+
function BearerAuthConfig$refreshTokens$slambda(resultContinuation) {
|
|
866
968
|
CoroutineImpl.call(this, resultContinuation);
|
|
867
969
|
}
|
|
868
|
-
protoOf(BearerAuthConfig$
|
|
869
|
-
var tmp = this.
|
|
870
|
-
tmp.
|
|
871
|
-
tmp.
|
|
872
|
-
return tmp.
|
|
970
|
+
protoOf(BearerAuthConfig$refreshTokens$slambda).y4k = function (_this__u8e3s4, $completion) {
|
|
971
|
+
var tmp = this.z4k(_this__u8e3s4, $completion);
|
|
972
|
+
tmp.i9_1 = Unit_instance;
|
|
973
|
+
tmp.j9_1 = null;
|
|
974
|
+
return tmp.o9();
|
|
873
975
|
};
|
|
874
|
-
protoOf(BearerAuthConfig$
|
|
875
|
-
return this.
|
|
976
|
+
protoOf(BearerAuthConfig$refreshTokens$slambda).ca = function (p1, $completion) {
|
|
977
|
+
return this.y4k(p1 instanceof RefreshTokensParams ? p1 : THROW_CCE(), $completion);
|
|
876
978
|
};
|
|
877
|
-
protoOf(BearerAuthConfig$
|
|
878
|
-
var suspendResult = this.
|
|
979
|
+
protoOf(BearerAuthConfig$refreshTokens$slambda).o9 = function () {
|
|
980
|
+
var suspendResult = this.i9_1;
|
|
879
981
|
$sm: do
|
|
880
982
|
try {
|
|
881
|
-
var tmp = this.
|
|
983
|
+
var tmp = this.g9_1;
|
|
882
984
|
if (tmp === 0) {
|
|
883
|
-
this.
|
|
985
|
+
this.h9_1 = 1;
|
|
884
986
|
return null;
|
|
885
987
|
} else if (tmp === 1) {
|
|
886
|
-
throw this.
|
|
988
|
+
throw this.j9_1;
|
|
887
989
|
}
|
|
888
990
|
} catch ($p) {
|
|
889
991
|
var e = $p;
|
|
@@ -891,41 +993,41 @@
|
|
|
891
993
|
}
|
|
892
994
|
while (true);
|
|
893
995
|
};
|
|
894
|
-
protoOf(BearerAuthConfig$
|
|
895
|
-
var i = new BearerAuthConfig$
|
|
896
|
-
i.
|
|
996
|
+
protoOf(BearerAuthConfig$refreshTokens$slambda).z4k = function (_this__u8e3s4, completion) {
|
|
997
|
+
var i = new BearerAuthConfig$refreshTokens$slambda(completion);
|
|
998
|
+
i.x4k_1 = _this__u8e3s4;
|
|
897
999
|
return i;
|
|
898
1000
|
};
|
|
899
|
-
function BearerAuthConfig$
|
|
900
|
-
var i = new BearerAuthConfig$
|
|
1001
|
+
function BearerAuthConfig$refreshTokens$slambda_0(resultContinuation) {
|
|
1002
|
+
var i = new BearerAuthConfig$refreshTokens$slambda(resultContinuation);
|
|
901
1003
|
var l = function (_this__u8e3s4, $completion) {
|
|
902
|
-
return i.
|
|
1004
|
+
return i.y4k(_this__u8e3s4, $completion);
|
|
903
1005
|
};
|
|
904
1006
|
l.$arity = 1;
|
|
905
1007
|
return l;
|
|
906
1008
|
}
|
|
907
|
-
function BearerAuthConfig$
|
|
1009
|
+
function BearerAuthConfig$loadTokens$slambda(resultContinuation) {
|
|
908
1010
|
CoroutineImpl.call(this, resultContinuation);
|
|
909
1011
|
}
|
|
910
|
-
protoOf(BearerAuthConfig$
|
|
911
|
-
var tmp = this.
|
|
912
|
-
tmp.
|
|
913
|
-
tmp.
|
|
914
|
-
return tmp.
|
|
1012
|
+
protoOf(BearerAuthConfig$loadTokens$slambda).i4l = function ($completion) {
|
|
1013
|
+
var tmp = this.j4l($completion);
|
|
1014
|
+
tmp.i9_1 = Unit_instance;
|
|
1015
|
+
tmp.j9_1 = null;
|
|
1016
|
+
return tmp.o9();
|
|
915
1017
|
};
|
|
916
|
-
protoOf(BearerAuthConfig$
|
|
917
|
-
return this.
|
|
1018
|
+
protoOf(BearerAuthConfig$loadTokens$slambda).hb = function ($completion) {
|
|
1019
|
+
return this.i4l($completion);
|
|
918
1020
|
};
|
|
919
|
-
protoOf(BearerAuthConfig$
|
|
920
|
-
var suspendResult = this.
|
|
1021
|
+
protoOf(BearerAuthConfig$loadTokens$slambda).o9 = function () {
|
|
1022
|
+
var suspendResult = this.i9_1;
|
|
921
1023
|
$sm: do
|
|
922
1024
|
try {
|
|
923
|
-
var tmp = this.
|
|
1025
|
+
var tmp = this.g9_1;
|
|
924
1026
|
if (tmp === 0) {
|
|
925
|
-
this.
|
|
1027
|
+
this.h9_1 = 1;
|
|
926
1028
|
return null;
|
|
927
1029
|
} else if (tmp === 1) {
|
|
928
|
-
throw this.
|
|
1030
|
+
throw this.j9_1;
|
|
929
1031
|
}
|
|
930
1032
|
} catch ($p) {
|
|
931
1033
|
var e = $p;
|
|
@@ -933,95 +1035,95 @@
|
|
|
933
1035
|
}
|
|
934
1036
|
while (true);
|
|
935
1037
|
};
|
|
936
|
-
protoOf(BearerAuthConfig$
|
|
937
|
-
return new BearerAuthConfig$
|
|
1038
|
+
protoOf(BearerAuthConfig$loadTokens$slambda).j4l = function (completion) {
|
|
1039
|
+
return new BearerAuthConfig$loadTokens$slambda(completion);
|
|
938
1040
|
};
|
|
939
|
-
function BearerAuthConfig$
|
|
940
|
-
var i = new BearerAuthConfig$
|
|
1041
|
+
function BearerAuthConfig$loadTokens$slambda_0(resultContinuation) {
|
|
1042
|
+
var i = new BearerAuthConfig$loadTokens$slambda(resultContinuation);
|
|
941
1043
|
var l = function ($completion) {
|
|
942
|
-
return i.
|
|
1044
|
+
return i.i4l($completion);
|
|
943
1045
|
};
|
|
944
1046
|
l.$arity = 0;
|
|
945
1047
|
return l;
|
|
946
1048
|
}
|
|
947
|
-
function BearerAuthConfig$
|
|
1049
|
+
function BearerAuthConfig$sendWithoutRequest$lambda(it) {
|
|
948
1050
|
return true;
|
|
949
1051
|
}
|
|
950
1052
|
function BearerAuthConfig() {
|
|
951
1053
|
var tmp = this;
|
|
952
|
-
tmp.
|
|
1054
|
+
tmp.l4k_1 = BearerAuthConfig$refreshTokens$slambda_0(null);
|
|
953
1055
|
var tmp_0 = this;
|
|
954
|
-
tmp_0.
|
|
1056
|
+
tmp_0.m4k_1 = BearerAuthConfig$loadTokens$slambda_0(null);
|
|
955
1057
|
var tmp_1 = this;
|
|
956
|
-
tmp_1.
|
|
957
|
-
this.
|
|
1058
|
+
tmp_1.n4k_1 = BearerAuthConfig$sendWithoutRequest$lambda;
|
|
1059
|
+
this.o4k_1 = null;
|
|
958
1060
|
}
|
|
959
|
-
protoOf(BearerAuthConfig).
|
|
960
|
-
this.
|
|
1061
|
+
protoOf(BearerAuthConfig).k4l = function (block) {
|
|
1062
|
+
this.l4k_1 = block;
|
|
961
1063
|
};
|
|
962
1064
|
function RefreshTokensParams(client, response, oldTokens) {
|
|
963
|
-
this.
|
|
964
|
-
this.
|
|
965
|
-
this.
|
|
1065
|
+
this.l4l_1 = client;
|
|
1066
|
+
this.m4l_1 = response;
|
|
1067
|
+
this.n4l_1 = oldTokens;
|
|
966
1068
|
}
|
|
967
|
-
protoOf(RefreshTokensParams).
|
|
968
|
-
_this__u8e3s4.
|
|
1069
|
+
protoOf(RefreshTokensParams).o4l = function (_this__u8e3s4) {
|
|
1070
|
+
_this__u8e3s4.t39_1.e2f(get_AuthCircuitBreaker(), Unit_instance);
|
|
969
1071
|
};
|
|
970
1072
|
function BearerTokens(accessToken, refreshToken) {
|
|
971
|
-
this.
|
|
972
|
-
this.
|
|
1073
|
+
this.p4l_1 = accessToken;
|
|
1074
|
+
this.q4l_1 = refreshToken;
|
|
973
1075
|
}
|
|
974
1076
|
function BearerAuthProvider$_init_$lambda_lcdiwf(it) {
|
|
975
1077
|
return true;
|
|
976
1078
|
}
|
|
977
1079
|
function BearerAuthProvider$addRequestHeaders$lambda($token) {
|
|
978
1080
|
return function ($this$headers) {
|
|
979
|
-
var tokenValue = 'Bearer ' + $token.
|
|
1081
|
+
var tokenValue = 'Bearer ' + $token.p4l_1;
|
|
980
1082
|
var tmp;
|
|
981
|
-
if ($this$headers.
|
|
982
|
-
$this$headers.
|
|
1083
|
+
if ($this$headers.a2h(HttpHeaders_getInstance().g2o_1)) {
|
|
1084
|
+
$this$headers.g2h(HttpHeaders_getInstance().g2o_1);
|
|
983
1085
|
tmp = Unit_instance;
|
|
984
1086
|
}
|
|
985
|
-
$this$headers.
|
|
1087
|
+
$this$headers.d2h(HttpHeaders_getInstance().g2o_1, tokenValue);
|
|
986
1088
|
return Unit_instance;
|
|
987
1089
|
};
|
|
988
1090
|
}
|
|
989
1091
|
function BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation) {
|
|
990
|
-
this.
|
|
991
|
-
this.
|
|
1092
|
+
this.z4l_1 = this$0;
|
|
1093
|
+
this.a4m_1 = $response;
|
|
992
1094
|
CoroutineImpl.call(this, resultContinuation);
|
|
993
1095
|
}
|
|
994
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
995
|
-
var tmp = this.
|
|
996
|
-
tmp.
|
|
997
|
-
tmp.
|
|
998
|
-
return tmp.
|
|
1096
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).f4m = function ($completion) {
|
|
1097
|
+
var tmp = this.j4l($completion);
|
|
1098
|
+
tmp.i9_1 = Unit_instance;
|
|
1099
|
+
tmp.j9_1 = null;
|
|
1100
|
+
return tmp.o9();
|
|
999
1101
|
};
|
|
1000
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1001
|
-
return this.
|
|
1102
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).hb = function ($completion) {
|
|
1103
|
+
return this.f4m($completion);
|
|
1002
1104
|
};
|
|
1003
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1004
|
-
var suspendResult = this.
|
|
1105
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).o9 = function () {
|
|
1106
|
+
var suspendResult = this.i9_1;
|
|
1005
1107
|
$sm: do
|
|
1006
1108
|
try {
|
|
1007
|
-
var tmp = this.
|
|
1109
|
+
var tmp = this.g9_1;
|
|
1008
1110
|
switch (tmp) {
|
|
1009
1111
|
case 0:
|
|
1010
|
-
this.
|
|
1011
|
-
this.
|
|
1012
|
-
this.
|
|
1013
|
-
this.
|
|
1014
|
-
suspendResult = this.
|
|
1112
|
+
this.h9_1 = 3;
|
|
1113
|
+
this.b4m_1 = this.z4l_1.g4m_1;
|
|
1114
|
+
this.c4m_1 = this.a4m_1.x3c().j38_1;
|
|
1115
|
+
this.g9_1 = 1;
|
|
1116
|
+
suspendResult = this.z4l_1.j4m_1.j4k(this);
|
|
1015
1117
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1016
1118
|
return suspendResult;
|
|
1017
1119
|
}
|
|
1018
1120
|
|
|
1019
1121
|
continue $sm;
|
|
1020
1122
|
case 1:
|
|
1021
|
-
this.
|
|
1022
|
-
this.
|
|
1023
|
-
this.
|
|
1024
|
-
suspendResult = this.
|
|
1123
|
+
this.d4m_1 = suspendResult;
|
|
1124
|
+
this.e4m_1 = new RefreshTokensParams(this.c4m_1, this.a4m_1, this.d4m_1);
|
|
1125
|
+
this.g9_1 = 2;
|
|
1126
|
+
suspendResult = this.b4m_1(this.e4m_1, this);
|
|
1025
1127
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1026
1128
|
return suspendResult;
|
|
1027
1129
|
}
|
|
@@ -1030,46 +1132,46 @@
|
|
|
1030
1132
|
case 2:
|
|
1031
1133
|
return suspendResult;
|
|
1032
1134
|
case 3:
|
|
1033
|
-
throw this.
|
|
1135
|
+
throw this.j9_1;
|
|
1034
1136
|
}
|
|
1035
1137
|
} catch ($p) {
|
|
1036
1138
|
var e = $p;
|
|
1037
|
-
if (this.
|
|
1139
|
+
if (this.h9_1 === 3) {
|
|
1038
1140
|
throw e;
|
|
1039
1141
|
} else {
|
|
1040
|
-
this.
|
|
1041
|
-
this.
|
|
1142
|
+
this.g9_1 = this.h9_1;
|
|
1143
|
+
this.j9_1 = e;
|
|
1042
1144
|
}
|
|
1043
1145
|
}
|
|
1044
1146
|
while (true);
|
|
1045
1147
|
};
|
|
1046
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
1047
|
-
return new BearerAuthProvider$refreshToken$slambda(this.
|
|
1148
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).j4l = function (completion) {
|
|
1149
|
+
return new BearerAuthProvider$refreshToken$slambda(this.z4l_1, this.a4m_1, completion);
|
|
1048
1150
|
};
|
|
1049
1151
|
function BearerAuthProvider$refreshToken$slambda_0(this$0, $response, resultContinuation) {
|
|
1050
1152
|
var i = new BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation);
|
|
1051
1153
|
var l = function ($completion) {
|
|
1052
|
-
return i.
|
|
1154
|
+
return i.f4m($completion);
|
|
1053
1155
|
};
|
|
1054
1156
|
l.$arity = 0;
|
|
1055
1157
|
return l;
|
|
1056
1158
|
}
|
|
1057
1159
|
function $addRequestHeadersCOROUTINE$4(_this__u8e3s4, request, authHeader, resultContinuation) {
|
|
1058
1160
|
CoroutineImpl.call(this, resultContinuation);
|
|
1059
|
-
this.
|
|
1060
|
-
this.
|
|
1061
|
-
this.
|
|
1161
|
+
this.s4m_1 = _this__u8e3s4;
|
|
1162
|
+
this.t4m_1 = request;
|
|
1163
|
+
this.u4m_1 = authHeader;
|
|
1062
1164
|
}
|
|
1063
|
-
protoOf($addRequestHeadersCOROUTINE$4).
|
|
1064
|
-
var suspendResult = this.
|
|
1165
|
+
protoOf($addRequestHeadersCOROUTINE$4).o9 = function () {
|
|
1166
|
+
var suspendResult = this.i9_1;
|
|
1065
1167
|
$sm: do
|
|
1066
1168
|
try {
|
|
1067
|
-
var tmp = this.
|
|
1169
|
+
var tmp = this.g9_1;
|
|
1068
1170
|
switch (tmp) {
|
|
1069
1171
|
case 0:
|
|
1070
|
-
this.
|
|
1071
|
-
this.
|
|
1072
|
-
suspendResult = this.
|
|
1172
|
+
this.h9_1 = 2;
|
|
1173
|
+
this.g9_1 = 1;
|
|
1174
|
+
suspendResult = this.s4m_1.j4m_1.j4k(this);
|
|
1073
1175
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1074
1176
|
return suspendResult;
|
|
1075
1177
|
}
|
|
@@ -1085,37 +1187,37 @@
|
|
|
1085
1187
|
}
|
|
1086
1188
|
|
|
1087
1189
|
var token = tmp_0;
|
|
1088
|
-
headers(this.
|
|
1190
|
+
headers(this.t4m_1, BearerAuthProvider$addRequestHeaders$lambda(token));
|
|
1089
1191
|
return Unit_instance;
|
|
1090
1192
|
case 2:
|
|
1091
|
-
throw this.
|
|
1193
|
+
throw this.j9_1;
|
|
1092
1194
|
}
|
|
1093
1195
|
} catch ($p) {
|
|
1094
1196
|
var e = $p;
|
|
1095
|
-
if (this.
|
|
1197
|
+
if (this.h9_1 === 2) {
|
|
1096
1198
|
throw e;
|
|
1097
1199
|
} else {
|
|
1098
|
-
this.
|
|
1099
|
-
this.
|
|
1200
|
+
this.g9_1 = this.h9_1;
|
|
1201
|
+
this.j9_1 = e;
|
|
1100
1202
|
}
|
|
1101
1203
|
}
|
|
1102
1204
|
while (true);
|
|
1103
1205
|
};
|
|
1104
1206
|
function $refreshTokenCOROUTINE$5(_this__u8e3s4, response, resultContinuation) {
|
|
1105
1207
|
CoroutineImpl.call(this, resultContinuation);
|
|
1106
|
-
this.
|
|
1107
|
-
this.
|
|
1208
|
+
this.d4n_1 = _this__u8e3s4;
|
|
1209
|
+
this.e4n_1 = response;
|
|
1108
1210
|
}
|
|
1109
|
-
protoOf($refreshTokenCOROUTINE$5).
|
|
1110
|
-
var suspendResult = this.
|
|
1211
|
+
protoOf($refreshTokenCOROUTINE$5).o9 = function () {
|
|
1212
|
+
var suspendResult = this.i9_1;
|
|
1111
1213
|
$sm: do
|
|
1112
1214
|
try {
|
|
1113
|
-
var tmp = this.
|
|
1215
|
+
var tmp = this.g9_1;
|
|
1114
1216
|
switch (tmp) {
|
|
1115
1217
|
case 0:
|
|
1116
|
-
this.
|
|
1117
|
-
this.
|
|
1118
|
-
suspendResult = this.
|
|
1218
|
+
this.h9_1 = 2;
|
|
1219
|
+
this.g9_1 = 1;
|
|
1220
|
+
suspendResult = this.d4n_1.j4m_1.k4k(BearerAuthProvider$refreshToken$slambda_0(this.d4n_1, this.e4n_1, null), this);
|
|
1119
1221
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1120
1222
|
return suspendResult;
|
|
1121
1223
|
}
|
|
@@ -1125,15 +1227,15 @@
|
|
|
1125
1227
|
var newToken = suspendResult;
|
|
1126
1228
|
return !(newToken == null);
|
|
1127
1229
|
case 2:
|
|
1128
|
-
throw this.
|
|
1230
|
+
throw this.j9_1;
|
|
1129
1231
|
}
|
|
1130
1232
|
} catch ($p) {
|
|
1131
1233
|
var e = $p;
|
|
1132
|
-
if (this.
|
|
1234
|
+
if (this.h9_1 === 2) {
|
|
1133
1235
|
throw e;
|
|
1134
1236
|
} else {
|
|
1135
|
-
this.
|
|
1136
|
-
this.
|
|
1237
|
+
this.g9_1 = this.h9_1;
|
|
1238
|
+
this.j9_1 = e;
|
|
1137
1239
|
}
|
|
1138
1240
|
}
|
|
1139
1241
|
while (true);
|
|
@@ -1146,53 +1248,53 @@
|
|
|
1146
1248
|
tmp = sendWithoutRequestCallback;
|
|
1147
1249
|
}
|
|
1148
1250
|
sendWithoutRequestCallback = tmp;
|
|
1149
|
-
this.
|
|
1150
|
-
this.
|
|
1151
|
-
this.
|
|
1152
|
-
this.
|
|
1251
|
+
this.g4m_1 = refreshTokens;
|
|
1252
|
+
this.h4m_1 = sendWithoutRequestCallback;
|
|
1253
|
+
this.i4m_1 = realm;
|
|
1254
|
+
this.j4m_1 = new AuthTokenHolder(loadTokens);
|
|
1153
1255
|
}
|
|
1154
|
-
protoOf(BearerAuthProvider).
|
|
1256
|
+
protoOf(BearerAuthProvider).h4j = function () {
|
|
1155
1257
|
var message = 'Deprecated';
|
|
1156
1258
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1157
1259
|
};
|
|
1158
|
-
protoOf(BearerAuthProvider).
|
|
1159
|
-
return this.
|
|
1260
|
+
protoOf(BearerAuthProvider).h4i = function (request) {
|
|
1261
|
+
return this.h4m_1(request);
|
|
1160
1262
|
};
|
|
1161
|
-
protoOf(BearerAuthProvider).
|
|
1162
|
-
if (!(auth.
|
|
1163
|
-
get_LOGGER().
|
|
1263
|
+
protoOf(BearerAuthProvider).g4g = function (auth) {
|
|
1264
|
+
if (!(auth.m2x_1 === 'Bearer')) {
|
|
1265
|
+
get_LOGGER().j2l('Bearer Auth Provider is not applicable for ' + auth.toString());
|
|
1164
1266
|
return false;
|
|
1165
1267
|
}
|
|
1166
1268
|
var tmp;
|
|
1167
|
-
if (this.
|
|
1269
|
+
if (this.i4m_1 == null) {
|
|
1168
1270
|
tmp = true;
|
|
1169
1271
|
} else {
|
|
1170
1272
|
if (!(auth instanceof Parameterized)) {
|
|
1171
1273
|
tmp = false;
|
|
1172
1274
|
} else {
|
|
1173
|
-
tmp = auth.
|
|
1275
|
+
tmp = auth.s2n('realm') == this.i4m_1;
|
|
1174
1276
|
}
|
|
1175
1277
|
}
|
|
1176
1278
|
var isSameRealm = tmp;
|
|
1177
1279
|
if (!isSameRealm) {
|
|
1178
|
-
get_LOGGER().
|
|
1280
|
+
get_LOGGER().j2l('Bearer Auth Provider is not applicable for this realm');
|
|
1179
1281
|
}
|
|
1180
1282
|
return isSameRealm;
|
|
1181
1283
|
};
|
|
1182
|
-
protoOf(BearerAuthProvider).
|
|
1284
|
+
protoOf(BearerAuthProvider).g4j = function (request, authHeader, $completion) {
|
|
1183
1285
|
var tmp = new $addRequestHeadersCOROUTINE$4(this, request, authHeader, $completion);
|
|
1184
|
-
tmp.
|
|
1185
|
-
tmp.
|
|
1186
|
-
return tmp.
|
|
1286
|
+
tmp.i9_1 = Unit_instance;
|
|
1287
|
+
tmp.j9_1 = null;
|
|
1288
|
+
return tmp.o9();
|
|
1187
1289
|
};
|
|
1188
|
-
protoOf(BearerAuthProvider).
|
|
1290
|
+
protoOf(BearerAuthProvider).f4j = function (response, $completion) {
|
|
1189
1291
|
var tmp = new $refreshTokenCOROUTINE$5(this, response, $completion);
|
|
1190
|
-
tmp.
|
|
1191
|
-
tmp.
|
|
1192
|
-
return tmp.
|
|
1292
|
+
tmp.i9_1 = Unit_instance;
|
|
1293
|
+
tmp.j9_1 = null;
|
|
1294
|
+
return tmp.o9();
|
|
1193
1295
|
};
|
|
1194
1296
|
//region block: post-declaration
|
|
1195
|
-
protoOf(BearerAuthProvider).
|
|
1297
|
+
protoOf(BearerAuthProvider).i4i = addRequestHeaders$default;
|
|
1196
1298
|
//endregion
|
|
1197
1299
|
//region block: exports
|
|
1198
1300
|
_.$_$ = _.$_$ || {};
|
|
@@ -1202,4 +1304,4 @@
|
|
|
1202
1304
|
_.$_$.d = get_Auth;
|
|
1203
1305
|
//endregion
|
|
1204
1306
|
return _;
|
|
1205
|
-
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./
|
|
1307
|
+
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-client-ktor-client-core.js'), require('./ktor-ktor-http.js'), require('./kotlinx-atomicfu.js'), require('./ktor-ktor-utils.js'), require('./kotlinx-coroutines-core.js')));
|