@doordeck/doordeck-headless-sdk 0.30.0 → 0.32.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 +1484 -1484
- package/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +33 -23
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js.map +1 -1
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +11 -11
- package/kotlin/Stately-stately-concurrency.js +9 -9
- package/kotlin/Stately-stately-concurrent-collections.js +87 -87
- package/kotlin/doordeck-sdk.d.ts +33 -27
- package/kotlin/doordeck-sdk.js +14002 -14031
- package/kotlin/doordeck-sdk.js.map +1 -1
- package/kotlin/kotlin-kotlin-stdlib.js +3422 -3210
- package/kotlin/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin/kotlinx-atomicfu.js +71 -71
- package/kotlin/kotlinx-atomicfu.js.map +1 -1
- package/kotlin/kotlinx-coroutines-core.js +2854 -2898
- package/kotlin/kotlinx-coroutines-core.js.map +1 -1
- package/kotlin/kotlinx-io-kotlinx-io-core.js +938 -453
- package/kotlin/kotlinx-io-kotlinx-io-core.js.map +1 -1
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +2344 -2283
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json-io.js +8 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json-io.js.map +1 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +2146 -1806
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/kotlin/ktor-ktor-client-ktor-client-core.js +3510 -3374
- package/kotlin/ktor-ktor-client-ktor-client-core.js.map +1 -1
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js +490 -431
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js.map +1 -1
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js +232 -232
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js.map +1 -1
- package/kotlin/ktor-ktor-http.js +1101 -1046
- package/kotlin/ktor-ktor-http.js.map +1 -1
- package/kotlin/ktor-ktor-io.js +947 -941
- package/kotlin/ktor-ktor-io.js.map +1 -1
- package/kotlin/ktor-ktor-shared-ktor-events.js +24 -24
- package/kotlin/ktor-ktor-shared-ktor-events.js.map +1 -1
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx-ktor-serialization-kotlinx-json.js +9 -9
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx-ktor-serialization-kotlinx-json.js.map +1 -1
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx.js +325 -325
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx.js.map +1 -1
- package/kotlin/ktor-ktor-shared-ktor-serialization.js +130 -130
- package/kotlin/ktor-ktor-shared-ktor-serialization.js.map +1 -1
- package/kotlin/ktor-ktor-shared-ktor-websockets.js +115 -101
- package/kotlin/ktor-ktor-shared-ktor-websockets.js.map +1 -1
- package/kotlin/ktor-ktor-utils.js +1133 -806
- package/kotlin/ktor-ktor-utils.js.map +1 -1
- package/kotlin/projects-core-koin-core.js +561 -527
- package/kotlin/projects-core-koin-core.js.map +1 -1
- package/package.json +3 -5
- package/kotlin/uuid.js +0 -152
- package/kotlin/uuid.js.map +0 -1
|
@@ -1,49 +1,54 @@
|
|
|
1
1
|
(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_atomicfu, kotlin_io_ktor_ktor_utils, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_http, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core) {
|
|
2
2
|
'use strict';
|
|
3
3
|
//region block: imports
|
|
4
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.
|
|
5
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
6
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
4
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.p;
|
|
5
|
+
var protoOf = kotlin_kotlin.$_$.nb;
|
|
6
|
+
var initMetadataForClass = kotlin_kotlin.$_$.na;
|
|
7
7
|
var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
|
|
8
|
-
var toList = kotlin_kotlin.$_$.
|
|
9
|
-
var ConcurrentMap = kotlin_io_ktor_ktor_utils.$_$.
|
|
10
|
-
var KtMutableMap = kotlin_kotlin.$_$.
|
|
11
|
-
var getKClass = kotlin_kotlin.$_$.
|
|
12
|
-
var
|
|
13
|
-
var
|
|
8
|
+
var toList = kotlin_kotlin.$_$.p8;
|
|
9
|
+
var ConcurrentMap = kotlin_io_ktor_ktor_utils.$_$.c;
|
|
10
|
+
var KtMutableMap = kotlin_kotlin.$_$.v5;
|
|
11
|
+
var getKClass = kotlin_kotlin.$_$.f;
|
|
12
|
+
var arrayOf = kotlin_kotlin.$_$.of;
|
|
13
|
+
var createKType = kotlin_kotlin.$_$.c;
|
|
14
|
+
var createInvariantKTypeProjection = kotlin_kotlin.$_$.a;
|
|
15
|
+
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.y4;
|
|
16
|
+
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.k;
|
|
17
|
+
var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.m;
|
|
14
18
|
var Send_instance = kotlin_io_ktor_ktor_client_core.$_$.b;
|
|
15
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
19
|
+
var Unit_instance = kotlin_kotlin.$_$.j5;
|
|
16
20
|
var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.e;
|
|
17
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
18
|
-
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
21
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.g6;
|
|
22
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.o;
|
|
19
23
|
var parseAuthorizationHeaders = kotlin_io_ktor_ktor_http.$_$.k;
|
|
20
|
-
var flatten = kotlin_kotlin.$_$.
|
|
21
|
-
var emptyList = kotlin_kotlin.$_$.
|
|
22
|
-
var to = kotlin_kotlin.$_$.
|
|
23
|
-
var first = kotlin_kotlin.$_$.
|
|
24
|
-
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.
|
|
25
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
26
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
24
|
+
var flatten = kotlin_kotlin.$_$.f7;
|
|
25
|
+
var emptyList = kotlin_kotlin.$_$.x6;
|
|
26
|
+
var to = kotlin_kotlin.$_$.cg;
|
|
27
|
+
var first = kotlin_kotlin.$_$.e7;
|
|
28
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.y;
|
|
29
|
+
var CoroutineImpl = kotlin_kotlin.$_$.q9;
|
|
30
|
+
var THROW_CCE = kotlin_kotlin.$_$.af;
|
|
27
31
|
var OnRequestContext = kotlin_io_ktor_ktor_client_core.$_$.e;
|
|
28
32
|
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.o;
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
33
|
+
var toString = kotlin_kotlin.$_$.rb;
|
|
34
|
+
var VOID = kotlin_kotlin.$_$.h;
|
|
35
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.a9;
|
|
36
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.sa;
|
|
32
37
|
var Sender = kotlin_io_ktor_ktor_client_core.$_$.f;
|
|
33
38
|
var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.h;
|
|
34
|
-
var HashSet_init_$Create$ = kotlin_kotlin.$_$.
|
|
35
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
36
|
-
var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.
|
|
37
|
-
var Unit = kotlin_kotlin.$_$.
|
|
39
|
+
var HashSet_init_$Create$ = kotlin_kotlin.$_$.w;
|
|
40
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.pa;
|
|
41
|
+
var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.g;
|
|
42
|
+
var Unit = kotlin_kotlin.$_$.lf;
|
|
38
43
|
var createClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.i;
|
|
39
|
-
var KtList = kotlin_kotlin.$_$.
|
|
40
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
41
|
-
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
42
|
-
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.
|
|
43
|
-
var CompletableDeferred_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
44
|
+
var KtList = kotlin_kotlin.$_$.q5;
|
|
45
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.ra;
|
|
46
|
+
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q;
|
|
47
|
+
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.ag;
|
|
48
|
+
var CompletableDeferred_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p;
|
|
44
49
|
var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
|
|
45
50
|
var headers = kotlin_io_ktor_ktor_client_core.$_$.q;
|
|
46
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.
|
|
51
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.z1;
|
|
47
52
|
var Parameterized = kotlin_io_ktor_ktor_http.$_$.j;
|
|
48
53
|
//endregion
|
|
49
54
|
//region block: pre-declaration
|
|
@@ -54,11 +59,11 @@
|
|
|
54
59
|
initMetadataForCoroutine($invoke$refreshTokenIfNeededCOROUTINE$0, CoroutineImpl);
|
|
55
60
|
initMetadataForCoroutine($invoke$executeWithNewTokenCOROUTINE$1, CoroutineImpl);
|
|
56
61
|
function sendWithoutRequest(request) {
|
|
57
|
-
return this.
|
|
62
|
+
return this.i42();
|
|
58
63
|
}
|
|
59
64
|
function addRequestHeaders$default(request, authHeader, $completion, $super) {
|
|
60
65
|
authHeader = authHeader === VOID ? null : authHeader;
|
|
61
|
-
return $super === VOID ? this.
|
|
66
|
+
return $super === VOID ? this.h42(request, authHeader, $completion) : $super.h42.call(this, request, authHeader, $completion);
|
|
62
67
|
}
|
|
63
68
|
function refreshToken(response, $completion) {
|
|
64
69
|
return true;
|
|
@@ -100,10 +105,10 @@
|
|
|
100
105
|
function AuthConfig() {
|
|
101
106
|
var tmp = this;
|
|
102
107
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
103
|
-
tmp.
|
|
108
|
+
tmp.j3z_1 = ArrayList_init_$Create$();
|
|
104
109
|
}
|
|
105
110
|
function AtomicCounter() {
|
|
106
|
-
this.
|
|
111
|
+
this.k3z_1 = atomic$int$1(0);
|
|
107
112
|
}
|
|
108
113
|
function AuthConfig$_init_$ref_ms3pb9() {
|
|
109
114
|
var l = function () {
|
|
@@ -114,19 +119,37 @@
|
|
|
114
119
|
}
|
|
115
120
|
function Auth$lambda($this$createClientPlugin) {
|
|
116
121
|
_init_properties_Auth_kt__9ob1dk();
|
|
117
|
-
var providers = toList($this$createClientPlugin.
|
|
118
|
-
$this$createClientPlugin.
|
|
122
|
+
var providers = toList($this$createClientPlugin.c33_1.j3z_1);
|
|
123
|
+
$this$createClientPlugin.b33_1.t2s_1.j26(get_AuthProvidersKey(), providers);
|
|
119
124
|
var tokenVersions = new ConcurrentMap();
|
|
120
125
|
// Inline function 'io.ktor.util.AttributeKey' call
|
|
121
126
|
var name = 'ProviderVersionAttributeKey';
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
127
|
+
// Inline function 'io.ktor.util.reflect.typeInfo' call
|
|
128
|
+
var tmp = getKClass(KtMutableMap);
|
|
129
|
+
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
130
|
+
var tmp_0;
|
|
131
|
+
try {
|
|
132
|
+
tmp_0 = createKType(getKClass(KtMutableMap), arrayOf([createInvariantKTypeProjection(createKType(getKClass(AuthProvider), arrayOf([]), false)), createInvariantKTypeProjection(createKType(PrimitiveClasses_getInstance().xb(), arrayOf([]), false))]), false);
|
|
133
|
+
} catch ($p) {
|
|
134
|
+
var tmp_1;
|
|
135
|
+
if ($p instanceof Error) {
|
|
136
|
+
var _unused_var__etf5q3 = $p;
|
|
137
|
+
tmp_1 = null;
|
|
138
|
+
} else {
|
|
139
|
+
throw $p;
|
|
140
|
+
}
|
|
141
|
+
tmp_0 = tmp_1;
|
|
142
|
+
}
|
|
143
|
+
var tmp$ret$0 = tmp_0;
|
|
144
|
+
var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
|
|
145
|
+
var tokenVersionsAttributeKey = new AttributeKey(name, tmp$ret$1);
|
|
146
|
+
$this$createClientPlugin.d3l(Auth$lambda$slambda_0(providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
147
|
+
var tmp_2 = Send_instance;
|
|
148
|
+
$this$createClientPlugin.f33(tmp_2, Auth$lambda$slambda_2(providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
126
149
|
return Unit_instance;
|
|
127
150
|
}
|
|
128
151
|
function invoke$findProvider(call, candidateProviders) {
|
|
129
|
-
var headerValues = call.
|
|
152
|
+
var headerValues = call.q2t().o2i().x27(HttpHeaders_getInstance().n2h_1);
|
|
130
153
|
var tmp;
|
|
131
154
|
if (headerValues == null) {
|
|
132
155
|
tmp = null;
|
|
@@ -134,56 +157,56 @@
|
|
|
134
157
|
// Inline function 'kotlin.collections.map' call
|
|
135
158
|
// Inline function 'kotlin.collections.mapTo' call
|
|
136
159
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(headerValues, 10));
|
|
137
|
-
var tmp0_iterator = headerValues.
|
|
138
|
-
while (tmp0_iterator.
|
|
139
|
-
var item = tmp0_iterator.
|
|
160
|
+
var tmp0_iterator = headerValues.p();
|
|
161
|
+
while (tmp0_iterator.q()) {
|
|
162
|
+
var item = tmp0_iterator.r();
|
|
140
163
|
// Inline function 'io.ktor.client.plugins.auth.Auth$lambda.invoke.findProvider.<anonymous>' call
|
|
141
164
|
var tmp$ret$0 = parseAuthorizationHeaders(item);
|
|
142
|
-
destination.
|
|
165
|
+
destination.k(tmp$ret$0);
|
|
143
166
|
}
|
|
144
167
|
tmp = destination;
|
|
145
168
|
}
|
|
146
169
|
var tmp1_safe_receiver = tmp;
|
|
147
|
-
var
|
|
148
|
-
var authHeaders =
|
|
170
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : flatten(tmp1_safe_receiver);
|
|
171
|
+
var authHeaders = tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;
|
|
149
172
|
var tmp_0;
|
|
150
|
-
if (authHeaders.
|
|
173
|
+
if (authHeaders.h() && candidateProviders.s() === 1) {
|
|
151
174
|
tmp_0 = to(first(candidateProviders), null);
|
|
152
|
-
} else if (authHeaders.
|
|
153
|
-
get_LOGGER().
|
|
175
|
+
} else if (authHeaders.h()) {
|
|
176
|
+
get_LOGGER().k2c('401 response ' + call.z2w().c2x().toString() + ' has no or empty "WWW-Authenticate" header. ' + 'Can not add or refresh token');
|
|
154
177
|
tmp_0 = null;
|
|
155
178
|
} else {
|
|
156
179
|
var tmp$ret$9;
|
|
157
180
|
$l$block_0: {
|
|
158
181
|
// Inline function 'kotlin.collections.firstNotNullOfOrNull' call
|
|
159
|
-
var tmp0_iterator_0 = authHeaders.
|
|
160
|
-
while (tmp0_iterator_0.
|
|
161
|
-
var element = tmp0_iterator_0.
|
|
182
|
+
var tmp0_iterator_0 = authHeaders.p();
|
|
183
|
+
while (tmp0_iterator_0.q()) {
|
|
184
|
+
var element = tmp0_iterator_0.r();
|
|
162
185
|
// Inline function 'io.ktor.client.plugins.auth.Auth$lambda.invoke.findProvider.<anonymous>' call
|
|
163
186
|
// Inline function 'kotlin.collections.find' call
|
|
164
187
|
var tmp$ret$4;
|
|
165
188
|
$l$block: {
|
|
166
189
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
167
|
-
var tmp0_iterator_1 = candidateProviders.
|
|
168
|
-
while (tmp0_iterator_1.
|
|
169
|
-
var element_0 = tmp0_iterator_1.
|
|
190
|
+
var tmp0_iterator_1 = candidateProviders.p();
|
|
191
|
+
while (tmp0_iterator_1.q()) {
|
|
192
|
+
var element_0 = tmp0_iterator_1.r();
|
|
170
193
|
// Inline function 'io.ktor.client.plugins.auth.Auth$lambda.invoke.findProvider.<anonymous>.<anonymous>' call
|
|
171
|
-
if (element_0.
|
|
194
|
+
if (element_0.l3z(element)) {
|
|
172
195
|
tmp$ret$4 = element_0;
|
|
173
196
|
break $l$block;
|
|
174
197
|
}
|
|
175
198
|
}
|
|
176
199
|
tmp$ret$4 = null;
|
|
177
200
|
}
|
|
178
|
-
var
|
|
201
|
+
var tmp0_safe_receiver = tmp$ret$4;
|
|
179
202
|
var tmp_1;
|
|
180
|
-
if (
|
|
203
|
+
if (tmp0_safe_receiver == null) {
|
|
181
204
|
tmp_1 = null;
|
|
182
205
|
} else {
|
|
183
206
|
// Inline function 'kotlin.let' call
|
|
184
207
|
// Inline function 'kotlin.contracts.contract' call
|
|
185
208
|
// Inline function 'io.ktor.client.plugins.auth.Auth$lambda.invoke.findProvider.<anonymous>.<anonymous>' call
|
|
186
|
-
tmp_1 = to(
|
|
209
|
+
tmp_1 = to(tmp0_safe_receiver, element);
|
|
187
210
|
}
|
|
188
211
|
var result = tmp_1;
|
|
189
212
|
if (!(result == null)) {
|
|
@@ -199,15 +222,15 @@
|
|
|
199
222
|
}
|
|
200
223
|
function invoke$refreshTokenIfNeeded(tokenVersions, tokenVersionsAttributeKey, call, provider, request, $completion) {
|
|
201
224
|
var tmp = new $invoke$refreshTokenIfNeededCOROUTINE$0(tokenVersions, tokenVersionsAttributeKey, call, provider, request, $completion);
|
|
202
|
-
tmp.
|
|
203
|
-
tmp.
|
|
204
|
-
return tmp.
|
|
225
|
+
tmp.f9_1 = Unit_instance;
|
|
226
|
+
tmp.g9_1 = null;
|
|
227
|
+
return tmp.l9();
|
|
205
228
|
}
|
|
206
229
|
function invoke$executeWithNewToken(_this__u8e3s4, call, provider, oldRequest, authHeader, $completion) {
|
|
207
230
|
var tmp = new $invoke$executeWithNewTokenCOROUTINE$1(_this__u8e3s4, call, provider, oldRequest, authHeader, $completion);
|
|
208
|
-
tmp.
|
|
209
|
-
tmp.
|
|
210
|
-
return tmp.
|
|
231
|
+
tmp.f9_1 = Unit_instance;
|
|
232
|
+
tmp.g9_1 = null;
|
|
233
|
+
return tmp.l9();
|
|
211
234
|
}
|
|
212
235
|
function Auth$lambda$slambda$lambda() {
|
|
213
236
|
return new AtomicCounter();
|
|
@@ -217,222 +240,222 @@
|
|
|
217
240
|
return LinkedHashMap_init_$Create$();
|
|
218
241
|
}
|
|
219
242
|
function Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
220
|
-
this.
|
|
221
|
-
this.
|
|
222
|
-
this.
|
|
243
|
+
this.y40_1 = $providers;
|
|
244
|
+
this.z40_1 = $tokenVersions;
|
|
245
|
+
this.a41_1 = $tokenVersionsAttributeKey;
|
|
223
246
|
CoroutineImpl.call(this, resultContinuation);
|
|
224
247
|
}
|
|
225
|
-
protoOf(Auth$lambda$slambda).
|
|
226
|
-
var tmp = this.
|
|
227
|
-
tmp.
|
|
228
|
-
tmp.
|
|
229
|
-
return tmp.
|
|
248
|
+
protoOf(Auth$lambda$slambda).q3l = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
249
|
+
var tmp = this.r3l($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
250
|
+
tmp.f9_1 = Unit_instance;
|
|
251
|
+
tmp.g9_1 = null;
|
|
252
|
+
return tmp.l9();
|
|
230
253
|
};
|
|
231
|
-
protoOf(Auth$lambda$slambda).
|
|
254
|
+
protoOf(Auth$lambda$slambda).s3l = function (p1, p2, p3, $completion) {
|
|
232
255
|
var tmp = p1 instanceof OnRequestContext ? p1 : THROW_CCE();
|
|
233
256
|
var tmp_0 = p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE();
|
|
234
|
-
return this.
|
|
257
|
+
return this.q3l(tmp, tmp_0, !(p3 == null) ? p3 : THROW_CCE(), $completion);
|
|
235
258
|
};
|
|
236
|
-
protoOf(Auth$lambda$slambda).
|
|
237
|
-
var suspendResult = this.
|
|
259
|
+
protoOf(Auth$lambda$slambda).l9 = function () {
|
|
260
|
+
var suspendResult = this.f9_1;
|
|
238
261
|
$sm: do
|
|
239
262
|
try {
|
|
240
|
-
var tmp = this.
|
|
263
|
+
var tmp = this.d9_1;
|
|
241
264
|
switch (tmp) {
|
|
242
265
|
case 0:
|
|
243
|
-
this.
|
|
266
|
+
this.e9_1 = 4;
|
|
244
267
|
var tmp_0 = this;
|
|
245
|
-
var this_0 = this.
|
|
268
|
+
var this_0 = this.y40_1;
|
|
246
269
|
var destination = ArrayList_init_$Create$();
|
|
247
|
-
var tmp0_iterator = this_0.
|
|
248
|
-
while (tmp0_iterator.
|
|
249
|
-
var element = tmp0_iterator.
|
|
250
|
-
if (element.
|
|
251
|
-
destination.
|
|
270
|
+
var tmp0_iterator = this_0.p();
|
|
271
|
+
while (tmp0_iterator.q()) {
|
|
272
|
+
var element = tmp0_iterator.r();
|
|
273
|
+
if (element.k41(this.c41_1)) {
|
|
274
|
+
destination.k(element);
|
|
252
275
|
}
|
|
253
276
|
}
|
|
254
277
|
|
|
255
|
-
tmp_0.
|
|
256
|
-
this.
|
|
257
|
-
this.
|
|
278
|
+
tmp_0.e41_1 = destination;
|
|
279
|
+
this.f41_1 = this.e41_1.p();
|
|
280
|
+
this.d9_1 = 1;
|
|
258
281
|
continue $sm;
|
|
259
282
|
case 1:
|
|
260
|
-
if (!this.
|
|
261
|
-
this.
|
|
283
|
+
if (!this.f41_1.q()) {
|
|
284
|
+
this.d9_1 = 3;
|
|
262
285
|
continue $sm;
|
|
263
286
|
}
|
|
264
287
|
|
|
265
|
-
this.
|
|
288
|
+
this.g41_1 = this.f41_1.r();
|
|
266
289
|
var tmp_1 = this;
|
|
267
|
-
tmp_1.
|
|
268
|
-
get_LOGGER().
|
|
290
|
+
tmp_1.h41_1 = this.g41_1;
|
|
291
|
+
get_LOGGER().k2c('Adding auth headers for ' + this.c41_1.q2u_1.toString() + ' from provider ' + toString(this.h41_1));
|
|
269
292
|
var tmp_2 = this;
|
|
270
|
-
tmp_2.
|
|
293
|
+
tmp_2.i41_1 = this.z40_1.c2c(this.h41_1, Auth$lambda$slambda$lambda);
|
|
271
294
|
var tmp_3 = this;
|
|
272
|
-
tmp_3.
|
|
273
|
-
var this_1 = this.
|
|
274
|
-
var key = this.
|
|
275
|
-
var value = this.
|
|
276
|
-
this_1.
|
|
277
|
-
this.
|
|
278
|
-
suspendResult = this.
|
|
295
|
+
tmp_3.j41_1 = this.c41_1.v2u_1.l26(this.a41_1, Auth$lambda$slambda$lambda_0);
|
|
296
|
+
var this_1 = this.j41_1;
|
|
297
|
+
var key = this.h41_1;
|
|
298
|
+
var value = this.i41_1.k3z_1.kotlinx$atomicfu$value;
|
|
299
|
+
this_1.n2(key, value);
|
|
300
|
+
this.d9_1 = 2;
|
|
301
|
+
suspendResult = this.h41_1.l41(this.c41_1, VOID, this);
|
|
279
302
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
280
303
|
return suspendResult;
|
|
281
304
|
}
|
|
282
305
|
|
|
283
306
|
continue $sm;
|
|
284
307
|
case 2:
|
|
285
|
-
this.
|
|
308
|
+
this.d9_1 = 1;
|
|
286
309
|
continue $sm;
|
|
287
310
|
case 3:
|
|
288
311
|
return Unit_instance;
|
|
289
312
|
case 4:
|
|
290
|
-
throw this.
|
|
313
|
+
throw this.g9_1;
|
|
291
314
|
}
|
|
292
315
|
} catch ($p) {
|
|
293
316
|
var e = $p;
|
|
294
|
-
if (this.
|
|
317
|
+
if (this.e9_1 === 4) {
|
|
295
318
|
throw e;
|
|
296
319
|
} else {
|
|
297
|
-
this.
|
|
298
|
-
this.
|
|
320
|
+
this.d9_1 = this.e9_1;
|
|
321
|
+
this.g9_1 = e;
|
|
299
322
|
}
|
|
300
323
|
}
|
|
301
324
|
while (true);
|
|
302
325
|
};
|
|
303
|
-
protoOf(Auth$lambda$slambda).
|
|
304
|
-
var i = new Auth$lambda$slambda(this.
|
|
305
|
-
i.
|
|
306
|
-
i.
|
|
307
|
-
i.
|
|
326
|
+
protoOf(Auth$lambda$slambda).r3l = function ($this$onRequest, request, _unused_var__etf5q3, completion) {
|
|
327
|
+
var i = new Auth$lambda$slambda(this.y40_1, this.z40_1, this.a41_1, completion);
|
|
328
|
+
i.b41_1 = $this$onRequest;
|
|
329
|
+
i.c41_1 = request;
|
|
330
|
+
i.d41_1 = _unused_var__etf5q3;
|
|
308
331
|
return i;
|
|
309
332
|
};
|
|
310
333
|
function Auth$lambda$slambda_0($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
311
334
|
var i = new Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
312
335
|
var l = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
313
|
-
return i.
|
|
336
|
+
return i.q3l($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
314
337
|
};
|
|
315
338
|
l.$arity = 3;
|
|
316
339
|
return l;
|
|
317
340
|
}
|
|
318
341
|
function Auth$lambda$slambda_1($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
319
|
-
this.
|
|
320
|
-
this.
|
|
321
|
-
this.
|
|
342
|
+
this.u41_1 = $providers;
|
|
343
|
+
this.v41_1 = $tokenVersions;
|
|
344
|
+
this.w41_1 = $tokenVersionsAttributeKey;
|
|
322
345
|
CoroutineImpl.call(this, resultContinuation);
|
|
323
346
|
}
|
|
324
|
-
protoOf(Auth$lambda$slambda_1).
|
|
325
|
-
var tmp = this.
|
|
326
|
-
tmp.
|
|
327
|
-
tmp.
|
|
328
|
-
return tmp.
|
|
347
|
+
protoOf(Auth$lambda$slambda_1).x3b = function ($this$on, originalRequest, $completion) {
|
|
348
|
+
var tmp = this.y3b($this$on, originalRequest, $completion);
|
|
349
|
+
tmp.f9_1 = Unit_instance;
|
|
350
|
+
tmp.g9_1 = null;
|
|
351
|
+
return tmp.l9();
|
|
329
352
|
};
|
|
330
|
-
protoOf(Auth$lambda$slambda_1).
|
|
353
|
+
protoOf(Auth$lambda$slambda_1).w9 = function (p1, p2, $completion) {
|
|
331
354
|
var tmp = p1 instanceof Sender ? p1 : THROW_CCE();
|
|
332
|
-
return this.
|
|
355
|
+
return this.x3b(tmp, p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE(), $completion);
|
|
333
356
|
};
|
|
334
|
-
protoOf(Auth$lambda$slambda_1).
|
|
335
|
-
var suspendResult = this.
|
|
357
|
+
protoOf(Auth$lambda$slambda_1).l9 = function () {
|
|
358
|
+
var suspendResult = this.f9_1;
|
|
336
359
|
$sm: do
|
|
337
360
|
try {
|
|
338
|
-
var tmp = this.
|
|
361
|
+
var tmp = this.d9_1;
|
|
339
362
|
switch (tmp) {
|
|
340
363
|
case 0:
|
|
341
|
-
this.
|
|
342
|
-
this.
|
|
343
|
-
suspendResult = this.
|
|
364
|
+
this.e9_1 = 7;
|
|
365
|
+
this.d9_1 = 1;
|
|
366
|
+
suspendResult = this.x41_1.b3c(this.y41_1, this);
|
|
344
367
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
345
368
|
return suspendResult;
|
|
346
369
|
}
|
|
347
370
|
|
|
348
371
|
continue $sm;
|
|
349
372
|
case 1:
|
|
350
|
-
this.
|
|
351
|
-
if (!this.
|
|
352
|
-
return this.
|
|
353
|
-
if (this.
|
|
354
|
-
return this.
|
|
355
|
-
this.
|
|
356
|
-
this.
|
|
357
|
-
this.
|
|
373
|
+
this.z41_1 = suspendResult;
|
|
374
|
+
if (!this.z41_1.q2t().d2x().equals(Companion_getInstance().b2k_1))
|
|
375
|
+
return this.z41_1;
|
|
376
|
+
if (this.z41_1.z2w().f2w().i26(get_AuthCircuitBreaker()))
|
|
377
|
+
return this.z41_1;
|
|
378
|
+
this.a42_1 = this.z41_1;
|
|
379
|
+
this.b42_1 = HashSet_init_$Create$(this.u41_1);
|
|
380
|
+
this.d9_1 = 2;
|
|
358
381
|
continue $sm;
|
|
359
382
|
case 2:
|
|
360
|
-
if (!this.
|
|
361
|
-
this.
|
|
383
|
+
if (!this.a42_1.q2t().d2x().equals(Companion_getInstance().b2k_1)) {
|
|
384
|
+
this.d9_1 = 6;
|
|
362
385
|
continue $sm;
|
|
363
386
|
}
|
|
364
387
|
|
|
365
|
-
get_LOGGER().
|
|
388
|
+
get_LOGGER().k2c('Received 401 for ' + this.a42_1.z2w().c2x().toString());
|
|
366
389
|
var tmp_0 = this;
|
|
367
|
-
var tmp0_elvis_lhs = invoke$findProvider(this.
|
|
390
|
+
var tmp0_elvis_lhs = invoke$findProvider(this.a42_1, this.b42_1);
|
|
368
391
|
var tmp_1;
|
|
369
392
|
if (tmp0_elvis_lhs == null) {
|
|
370
|
-
this.
|
|
371
|
-
get_LOGGER().
|
|
372
|
-
return this.
|
|
393
|
+
this.x41_1;
|
|
394
|
+
get_LOGGER().k2c('Can not find auth provider for ' + this.a42_1.z2w().c2x().toString());
|
|
395
|
+
return this.a42_1;
|
|
373
396
|
} else {
|
|
374
397
|
tmp_1 = tmp0_elvis_lhs;
|
|
375
398
|
}
|
|
376
399
|
|
|
377
|
-
tmp_0.
|
|
378
|
-
this.
|
|
379
|
-
this.
|
|
380
|
-
get_LOGGER().
|
|
381
|
-
this.
|
|
382
|
-
this.
|
|
383
|
-
suspendResult = invoke$refreshTokenIfNeeded(this.
|
|
400
|
+
tmp_0.c42_1 = tmp_1;
|
|
401
|
+
this.d42_1 = this.c42_1.ig();
|
|
402
|
+
this.e42_1 = this.c42_1.jg();
|
|
403
|
+
get_LOGGER().k2c('Using provider ' + toString(this.d42_1) + ' for ' + this.a42_1.z2w().c2x().toString());
|
|
404
|
+
this.b42_1.d2(this.d42_1);
|
|
405
|
+
this.d9_1 = 3;
|
|
406
|
+
suspendResult = invoke$refreshTokenIfNeeded(this.v41_1, this.w41_1, this.a42_1, this.d42_1, this.y41_1, this);
|
|
384
407
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
385
408
|
return suspendResult;
|
|
386
409
|
}
|
|
387
410
|
|
|
388
411
|
continue $sm;
|
|
389
412
|
case 3:
|
|
390
|
-
this.
|
|
391
|
-
if (!this.
|
|
392
|
-
return this.
|
|
413
|
+
this.f42_1 = suspendResult;
|
|
414
|
+
if (!this.f42_1) {
|
|
415
|
+
return this.a42_1;
|
|
393
416
|
} else {
|
|
394
|
-
this.
|
|
417
|
+
this.d9_1 = 4;
|
|
395
418
|
continue $sm;
|
|
396
419
|
}
|
|
397
420
|
|
|
398
421
|
case 4:
|
|
399
|
-
this.
|
|
400
|
-
suspendResult = invoke$executeWithNewToken(this.
|
|
422
|
+
this.d9_1 = 5;
|
|
423
|
+
suspendResult = invoke$executeWithNewToken(this.x41_1, this.a42_1, this.d42_1, this.y41_1, this.e42_1, this);
|
|
401
424
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
402
425
|
return suspendResult;
|
|
403
426
|
}
|
|
404
427
|
|
|
405
428
|
continue $sm;
|
|
406
429
|
case 5:
|
|
407
|
-
this.
|
|
408
|
-
this.
|
|
430
|
+
this.a42_1 = suspendResult;
|
|
431
|
+
this.d9_1 = 2;
|
|
409
432
|
continue $sm;
|
|
410
433
|
case 6:
|
|
411
|
-
return this.
|
|
434
|
+
return this.a42_1;
|
|
412
435
|
case 7:
|
|
413
|
-
throw this.
|
|
436
|
+
throw this.g9_1;
|
|
414
437
|
}
|
|
415
438
|
} catch ($p) {
|
|
416
439
|
var e = $p;
|
|
417
|
-
if (this.
|
|
440
|
+
if (this.e9_1 === 7) {
|
|
418
441
|
throw e;
|
|
419
442
|
} else {
|
|
420
|
-
this.
|
|
421
|
-
this.
|
|
443
|
+
this.d9_1 = this.e9_1;
|
|
444
|
+
this.g9_1 = e;
|
|
422
445
|
}
|
|
423
446
|
}
|
|
424
447
|
while (true);
|
|
425
448
|
};
|
|
426
|
-
protoOf(Auth$lambda$slambda_1).
|
|
427
|
-
var i = new Auth$lambda$slambda_1(this.
|
|
428
|
-
i.
|
|
429
|
-
i.
|
|
449
|
+
protoOf(Auth$lambda$slambda_1).y3b = function ($this$on, originalRequest, completion) {
|
|
450
|
+
var i = new Auth$lambda$slambda_1(this.u41_1, this.v41_1, this.w41_1, completion);
|
|
451
|
+
i.x41_1 = $this$on;
|
|
452
|
+
i.y41_1 = originalRequest;
|
|
430
453
|
return i;
|
|
431
454
|
};
|
|
432
455
|
function Auth$lambda$slambda_2($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
433
456
|
var i = new Auth$lambda$slambda_1($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
434
457
|
var l = function ($this$on, originalRequest, $completion) {
|
|
435
|
-
return i.
|
|
458
|
+
return i.x3b($this$on, originalRequest, $completion);
|
|
436
459
|
};
|
|
437
460
|
l.$arity = 2;
|
|
438
461
|
return l;
|
|
@@ -448,101 +471,101 @@
|
|
|
448
471
|
}
|
|
449
472
|
function $invoke$refreshTokenIfNeededCOROUTINE$0(tokenVersions, tokenVersionsAttributeKey, call, provider, request, resultContinuation) {
|
|
450
473
|
CoroutineImpl.call(this, resultContinuation);
|
|
451
|
-
this.
|
|
452
|
-
this.
|
|
453
|
-
this.
|
|
454
|
-
this.
|
|
455
|
-
this.
|
|
474
|
+
this.u3z_1 = tokenVersions;
|
|
475
|
+
this.v3z_1 = tokenVersionsAttributeKey;
|
|
476
|
+
this.w3z_1 = call;
|
|
477
|
+
this.x3z_1 = provider;
|
|
478
|
+
this.y3z_1 = request;
|
|
456
479
|
}
|
|
457
|
-
protoOf($invoke$refreshTokenIfNeededCOROUTINE$0).
|
|
458
|
-
var suspendResult = this.
|
|
480
|
+
protoOf($invoke$refreshTokenIfNeededCOROUTINE$0).l9 = function () {
|
|
481
|
+
var suspendResult = this.f9_1;
|
|
459
482
|
$sm: do
|
|
460
483
|
try {
|
|
461
|
-
var tmp = this.
|
|
484
|
+
var tmp = this.d9_1;
|
|
462
485
|
switch (tmp) {
|
|
463
486
|
case 0:
|
|
464
|
-
this.
|
|
487
|
+
this.e9_1 = 4;
|
|
465
488
|
var tmp_0 = this;
|
|
466
|
-
tmp_0.
|
|
489
|
+
tmp_0.z3z_1 = this.u3z_1.c2c(this.x3z_1, Auth$lambda$refreshTokenIfNeeded$lambda);
|
|
467
490
|
var tmp_1 = this;
|
|
468
|
-
tmp_1.
|
|
469
|
-
this.
|
|
470
|
-
if (!(this.
|
|
471
|
-
get_LOGGER().
|
|
472
|
-
this.
|
|
473
|
-
suspendResult = this.
|
|
491
|
+
tmp_1.a40_1 = this.y3z_1.v2u_1.l26(this.v3z_1, Auth$lambda$refreshTokenIfNeeded$lambda_0);
|
|
492
|
+
this.b40_1 = this.a40_1.k2(this.x3z_1);
|
|
493
|
+
if (!(this.b40_1 == null) && this.b40_1 >= this.z3z_1.k3z_1.kotlinx$atomicfu$value) {
|
|
494
|
+
get_LOGGER().k2c('Refreshing token for ' + this.w3z_1.z2w().c2x().toString());
|
|
495
|
+
this.d9_1 = 1;
|
|
496
|
+
suspendResult = this.x3z_1.g42(this.w3z_1.q2t(), this);
|
|
474
497
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
475
498
|
return suspendResult;
|
|
476
499
|
}
|
|
477
500
|
continue $sm;
|
|
478
501
|
} else {
|
|
479
|
-
this.
|
|
502
|
+
this.d9_1 = 3;
|
|
480
503
|
continue $sm;
|
|
481
504
|
}
|
|
482
505
|
|
|
483
506
|
case 1:
|
|
484
507
|
var ARGUMENT = suspendResult;
|
|
485
508
|
if (!ARGUMENT) {
|
|
486
|
-
get_LOGGER().
|
|
509
|
+
get_LOGGER().k2c('Refreshing token failed for ' + this.w3z_1.z2w().c2x().toString());
|
|
487
510
|
return false;
|
|
488
511
|
} else {
|
|
489
|
-
var this_0 = this.
|
|
490
|
-
var key = this.
|
|
491
|
-
var value = this.
|
|
492
|
-
this_0.
|
|
493
|
-
this.
|
|
512
|
+
var this_0 = this.a40_1;
|
|
513
|
+
var key = this.x3z_1;
|
|
514
|
+
var value = this.z3z_1.k3z_1.atomicfu$incrementAndGet();
|
|
515
|
+
this_0.n2(key, value);
|
|
516
|
+
this.d9_1 = 2;
|
|
494
517
|
continue $sm;
|
|
495
518
|
}
|
|
496
519
|
|
|
497
520
|
case 2:
|
|
498
|
-
this.
|
|
521
|
+
this.d9_1 = 3;
|
|
499
522
|
continue $sm;
|
|
500
523
|
case 3:
|
|
501
524
|
return true;
|
|
502
525
|
case 4:
|
|
503
|
-
throw this.
|
|
526
|
+
throw this.g9_1;
|
|
504
527
|
}
|
|
505
528
|
} catch ($p) {
|
|
506
529
|
var e = $p;
|
|
507
|
-
if (this.
|
|
530
|
+
if (this.e9_1 === 4) {
|
|
508
531
|
throw e;
|
|
509
532
|
} else {
|
|
510
|
-
this.
|
|
511
|
-
this.
|
|
533
|
+
this.d9_1 = this.e9_1;
|
|
534
|
+
this.g9_1 = e;
|
|
512
535
|
}
|
|
513
536
|
}
|
|
514
537
|
while (true);
|
|
515
538
|
};
|
|
516
539
|
function $invoke$executeWithNewTokenCOROUTINE$1(_this__u8e3s4, call, provider, oldRequest, authHeader, resultContinuation) {
|
|
517
540
|
CoroutineImpl.call(this, resultContinuation);
|
|
518
|
-
this.
|
|
519
|
-
this.
|
|
520
|
-
this.
|
|
521
|
-
this.
|
|
522
|
-
this.
|
|
541
|
+
this.k40_1 = _this__u8e3s4;
|
|
542
|
+
this.l40_1 = call;
|
|
543
|
+
this.m40_1 = provider;
|
|
544
|
+
this.n40_1 = oldRequest;
|
|
545
|
+
this.o40_1 = authHeader;
|
|
523
546
|
}
|
|
524
|
-
protoOf($invoke$executeWithNewTokenCOROUTINE$1).
|
|
525
|
-
var suspendResult = this.
|
|
547
|
+
protoOf($invoke$executeWithNewTokenCOROUTINE$1).l9 = function () {
|
|
548
|
+
var suspendResult = this.f9_1;
|
|
526
549
|
$sm: do
|
|
527
550
|
try {
|
|
528
|
-
var tmp = this.
|
|
551
|
+
var tmp = this.d9_1;
|
|
529
552
|
switch (tmp) {
|
|
530
553
|
case 0:
|
|
531
|
-
this.
|
|
532
|
-
this.
|
|
533
|
-
this.
|
|
534
|
-
this.
|
|
535
|
-
suspendResult = this.
|
|
554
|
+
this.e9_1 = 3;
|
|
555
|
+
this.p40_1 = new HttpRequestBuilder();
|
|
556
|
+
this.p40_1.o30(this.n40_1);
|
|
557
|
+
this.d9_1 = 1;
|
|
558
|
+
suspendResult = this.m40_1.h42(this.p40_1, this.o40_1, this);
|
|
536
559
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
537
560
|
return suspendResult;
|
|
538
561
|
}
|
|
539
562
|
|
|
540
563
|
continue $sm;
|
|
541
564
|
case 1:
|
|
542
|
-
this.
|
|
543
|
-
get_LOGGER().
|
|
544
|
-
this.
|
|
545
|
-
suspendResult = this.
|
|
565
|
+
this.p40_1.v2u_1.j26(get_AuthCircuitBreaker(), Unit_instance);
|
|
566
|
+
get_LOGGER().k2c('Sending new request to ' + this.l40_1.z2w().c2x().toString());
|
|
567
|
+
this.d9_1 = 2;
|
|
568
|
+
suspendResult = this.k40_1.b3c(this.p40_1, this);
|
|
546
569
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
547
570
|
return suspendResult;
|
|
548
571
|
}
|
|
@@ -551,15 +574,15 @@
|
|
|
551
574
|
case 2:
|
|
552
575
|
return suspendResult;
|
|
553
576
|
case 3:
|
|
554
|
-
throw this.
|
|
577
|
+
throw this.g9_1;
|
|
555
578
|
}
|
|
556
579
|
} catch ($p) {
|
|
557
580
|
var e = $p;
|
|
558
|
-
if (this.
|
|
581
|
+
if (this.e9_1 === 3) {
|
|
559
582
|
throw e;
|
|
560
583
|
} else {
|
|
561
|
-
this.
|
|
562
|
-
this.
|
|
584
|
+
this.d9_1 = this.e9_1;
|
|
585
|
+
this.g9_1 = e;
|
|
563
586
|
}
|
|
564
587
|
}
|
|
565
588
|
while (true);
|
|
@@ -571,55 +594,91 @@
|
|
|
571
594
|
LOGGER = KtorSimpleLogger('io.ktor.client.plugins.auth.Auth');
|
|
572
595
|
// Inline function 'io.ktor.util.AttributeKey' call
|
|
573
596
|
var name = 'auth-request';
|
|
574
|
-
|
|
575
|
-
var tmp =
|
|
576
|
-
|
|
597
|
+
// Inline function 'io.ktor.util.reflect.typeInfo' call
|
|
598
|
+
var tmp = getKClass(Unit);
|
|
599
|
+
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
600
|
+
var tmp_0;
|
|
601
|
+
try {
|
|
602
|
+
tmp_0 = createKType(getKClass(Unit), arrayOf([]), false);
|
|
603
|
+
} catch ($p) {
|
|
604
|
+
var tmp_1;
|
|
605
|
+
if ($p instanceof Error) {
|
|
606
|
+
var _unused_var__etf5q3 = $p;
|
|
607
|
+
tmp_1 = null;
|
|
608
|
+
} else {
|
|
609
|
+
throw $p;
|
|
610
|
+
}
|
|
611
|
+
tmp_0 = tmp_1;
|
|
612
|
+
}
|
|
613
|
+
var tmp$ret$0 = tmp_0;
|
|
614
|
+
var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
|
|
615
|
+
AuthCircuitBreaker = new AttributeKey(name, tmp$ret$1);
|
|
616
|
+
var tmp_2 = AuthConfig$_init_$ref_ms3pb9();
|
|
617
|
+
Auth = createClientPlugin('Auth', tmp_2, Auth$lambda);
|
|
577
618
|
// Inline function 'io.ktor.util.AttributeKey' call
|
|
578
619
|
var name_0 = 'AuthProviders';
|
|
579
|
-
|
|
620
|
+
// Inline function 'io.ktor.util.reflect.typeInfo' call
|
|
621
|
+
var tmp_3 = getKClass(KtList);
|
|
622
|
+
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
623
|
+
var tmp_4;
|
|
624
|
+
try {
|
|
625
|
+
tmp_4 = createKType(getKClass(KtList), arrayOf([createInvariantKTypeProjection(createKType(getKClass(AuthProvider), arrayOf([]), false))]), false);
|
|
626
|
+
} catch ($p) {
|
|
627
|
+
var tmp_5;
|
|
628
|
+
if ($p instanceof Error) {
|
|
629
|
+
var _unused_var__etf5q3_0 = $p;
|
|
630
|
+
tmp_5 = null;
|
|
631
|
+
} else {
|
|
632
|
+
throw $p;
|
|
633
|
+
}
|
|
634
|
+
tmp_4 = tmp_5;
|
|
635
|
+
}
|
|
636
|
+
var tmp$ret$0_0 = tmp_4;
|
|
637
|
+
var tmp$ret$1_0 = new TypeInfo(tmp_3, tmp$ret$0_0);
|
|
638
|
+
AuthProvidersKey = new AttributeKey(name_0, tmp$ret$1_0);
|
|
580
639
|
}
|
|
581
640
|
}
|
|
582
641
|
function AuthProvider() {
|
|
583
642
|
}
|
|
584
643
|
function $loadTokenCOROUTINE$2(_this__u8e3s4, resultContinuation) {
|
|
585
644
|
CoroutineImpl.call(this, resultContinuation);
|
|
586
|
-
this.
|
|
645
|
+
this.r42_1 = _this__u8e3s4;
|
|
587
646
|
}
|
|
588
|
-
protoOf($loadTokenCOROUTINE$2).
|
|
589
|
-
var suspendResult = this.
|
|
647
|
+
protoOf($loadTokenCOROUTINE$2).l9 = function () {
|
|
648
|
+
var suspendResult = this.f9_1;
|
|
590
649
|
$sm: do
|
|
591
650
|
try {
|
|
592
|
-
var tmp = this.
|
|
651
|
+
var tmp = this.d9_1;
|
|
593
652
|
switch (tmp) {
|
|
594
653
|
case 0:
|
|
595
|
-
this.
|
|
596
|
-
this.
|
|
654
|
+
this.e9_1 = 5;
|
|
655
|
+
this.t42_1 = null;
|
|
597
656
|
$l$loop: while (true) {
|
|
598
|
-
this.
|
|
599
|
-
var tmp0_elvis_lhs = this.
|
|
657
|
+
this.s42_1 = this.r42_1.w42_1.kotlinx$atomicfu$value;
|
|
658
|
+
var tmp0_elvis_lhs = this.s42_1;
|
|
600
659
|
var newValue = tmp0_elvis_lhs == null ? CompletableDeferred() : tmp0_elvis_lhs;
|
|
601
|
-
if (this.
|
|
602
|
-
this.
|
|
660
|
+
if (this.r42_1.w42_1.atomicfu$compareAndSet(this.s42_1, newValue)) {
|
|
661
|
+
this.t42_1 = newValue;
|
|
603
662
|
break $l$loop;
|
|
604
663
|
}
|
|
605
664
|
}
|
|
606
665
|
|
|
607
|
-
if (!(this.
|
|
608
|
-
this.
|
|
609
|
-
suspendResult = this.
|
|
666
|
+
if (!(this.s42_1 == null)) {
|
|
667
|
+
this.d9_1 = 4;
|
|
668
|
+
suspendResult = this.s42_1.cq(this);
|
|
610
669
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
611
670
|
return suspendResult;
|
|
612
671
|
}
|
|
613
672
|
continue $sm;
|
|
614
673
|
} else {
|
|
615
|
-
this.
|
|
674
|
+
this.d9_1 = 1;
|
|
616
675
|
continue $sm;
|
|
617
676
|
}
|
|
618
677
|
|
|
619
678
|
case 1:
|
|
620
|
-
this.
|
|
621
|
-
this.
|
|
622
|
-
suspendResult = this.
|
|
679
|
+
this.e9_1 = 3;
|
|
680
|
+
this.d9_1 = 2;
|
|
681
|
+
suspendResult = this.r42_1.u42_1(this);
|
|
623
682
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
624
683
|
return suspendResult;
|
|
625
684
|
}
|
|
@@ -628,89 +687,89 @@
|
|
|
628
687
|
case 2:
|
|
629
688
|
var newTokens = suspendResult;
|
|
630
689
|
var tmp_0;
|
|
631
|
-
if (this.
|
|
690
|
+
if (this.t42_1 == null) {
|
|
632
691
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
633
692
|
} else {
|
|
634
|
-
tmp_0 = this.
|
|
693
|
+
tmp_0 = this.t42_1;
|
|
635
694
|
}
|
|
636
695
|
|
|
637
|
-
tmp_0.
|
|
696
|
+
tmp_0.au(newTokens);
|
|
638
697
|
return newTokens;
|
|
639
698
|
case 3:
|
|
640
|
-
this.
|
|
641
|
-
var tmp_1 = this.
|
|
699
|
+
this.e9_1 = 5;
|
|
700
|
+
var tmp_1 = this.g9_1;
|
|
642
701
|
if (tmp_1 instanceof Error) {
|
|
643
|
-
var cause = this.
|
|
702
|
+
var cause = this.g9_1;
|
|
644
703
|
var tmp_2;
|
|
645
|
-
if (this.
|
|
704
|
+
if (this.t42_1 == null) {
|
|
646
705
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
647
706
|
} else {
|
|
648
|
-
tmp_2 = this.
|
|
707
|
+
tmp_2 = this.t42_1;
|
|
649
708
|
}
|
|
650
|
-
tmp_2.
|
|
709
|
+
tmp_2.cu(cause);
|
|
651
710
|
var tmp_3;
|
|
652
|
-
if (this.
|
|
711
|
+
if (this.t42_1 == null) {
|
|
653
712
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
654
713
|
} else {
|
|
655
|
-
tmp_3 = this.
|
|
714
|
+
tmp_3 = this.t42_1;
|
|
656
715
|
}
|
|
657
|
-
this.
|
|
716
|
+
this.r42_1.w42_1.atomicfu$compareAndSet(tmp_3, null);
|
|
658
717
|
throw cause;
|
|
659
718
|
} else {
|
|
660
|
-
throw this.
|
|
719
|
+
throw this.g9_1;
|
|
661
720
|
}
|
|
662
721
|
|
|
663
722
|
case 4:
|
|
664
723
|
return suspendResult;
|
|
665
724
|
case 5:
|
|
666
|
-
throw this.
|
|
725
|
+
throw this.g9_1;
|
|
667
726
|
}
|
|
668
727
|
} catch ($p) {
|
|
669
728
|
var e = $p;
|
|
670
|
-
if (this.
|
|
729
|
+
if (this.e9_1 === 5) {
|
|
671
730
|
throw e;
|
|
672
731
|
} else {
|
|
673
|
-
this.
|
|
674
|
-
this.
|
|
732
|
+
this.d9_1 = this.e9_1;
|
|
733
|
+
this.g9_1 = e;
|
|
675
734
|
}
|
|
676
735
|
}
|
|
677
736
|
while (true);
|
|
678
737
|
};
|
|
679
738
|
function $setTokenCOROUTINE$3(_this__u8e3s4, block, resultContinuation) {
|
|
680
739
|
CoroutineImpl.call(this, resultContinuation);
|
|
681
|
-
this.
|
|
682
|
-
this.
|
|
740
|
+
this.f43_1 = _this__u8e3s4;
|
|
741
|
+
this.g43_1 = block;
|
|
683
742
|
}
|
|
684
|
-
protoOf($setTokenCOROUTINE$3).
|
|
685
|
-
var suspendResult = this.
|
|
743
|
+
protoOf($setTokenCOROUTINE$3).l9 = function () {
|
|
744
|
+
var suspendResult = this.f9_1;
|
|
686
745
|
$sm: do
|
|
687
746
|
try {
|
|
688
|
-
var tmp = this.
|
|
747
|
+
var tmp = this.d9_1;
|
|
689
748
|
switch (tmp) {
|
|
690
749
|
case 0:
|
|
691
|
-
this.
|
|
692
|
-
this.
|
|
750
|
+
this.e9_1 = 5;
|
|
751
|
+
this.i43_1 = null;
|
|
693
752
|
$l$loop: while (true) {
|
|
694
|
-
this.
|
|
695
|
-
var tmp0_elvis_lhs = this.
|
|
753
|
+
this.h43_1 = this.f43_1.v42_1.kotlinx$atomicfu$value;
|
|
754
|
+
var tmp0_elvis_lhs = this.h43_1;
|
|
696
755
|
var newValue = tmp0_elvis_lhs == null ? CompletableDeferred() : tmp0_elvis_lhs;
|
|
697
|
-
if (this.
|
|
698
|
-
this.
|
|
756
|
+
if (this.f43_1.v42_1.atomicfu$compareAndSet(this.h43_1, newValue)) {
|
|
757
|
+
this.i43_1 = newValue;
|
|
699
758
|
break $l$loop;
|
|
700
759
|
}
|
|
701
760
|
}
|
|
702
761
|
|
|
703
|
-
this.
|
|
704
|
-
if (this.
|
|
705
|
-
this.
|
|
706
|
-
suspendResult = this.
|
|
762
|
+
this.e9_1 = 4;
|
|
763
|
+
if (this.h43_1 == null) {
|
|
764
|
+
this.d9_1 = 2;
|
|
765
|
+
suspendResult = this.g43_1(this);
|
|
707
766
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
708
767
|
return suspendResult;
|
|
709
768
|
}
|
|
710
769
|
continue $sm;
|
|
711
770
|
} else {
|
|
712
|
-
this.
|
|
713
|
-
suspendResult = this.
|
|
771
|
+
this.d9_1 = 1;
|
|
772
|
+
suspendResult = this.h43_1.cq(this);
|
|
714
773
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
715
774
|
return suspendResult;
|
|
716
775
|
}
|
|
@@ -718,81 +777,81 @@
|
|
|
718
777
|
}
|
|
719
778
|
|
|
720
779
|
case 1:
|
|
721
|
-
this.
|
|
722
|
-
this.
|
|
780
|
+
this.j43_1 = suspendResult;
|
|
781
|
+
this.d9_1 = 3;
|
|
723
782
|
continue $sm;
|
|
724
783
|
case 2:
|
|
725
784
|
var newTokens = suspendResult;
|
|
726
785
|
var tmp_0;
|
|
727
|
-
if (this.
|
|
786
|
+
if (this.i43_1 == null) {
|
|
728
787
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
729
788
|
} else {
|
|
730
|
-
tmp_0 = this.
|
|
789
|
+
tmp_0 = this.i43_1;
|
|
731
790
|
}
|
|
732
791
|
|
|
733
|
-
tmp_0.
|
|
734
|
-
this.
|
|
735
|
-
this.
|
|
736
|
-
this.
|
|
792
|
+
tmp_0.au(newTokens);
|
|
793
|
+
this.f43_1.v42_1.kotlinx$atomicfu$value = null;
|
|
794
|
+
this.j43_1 = newTokens;
|
|
795
|
+
this.d9_1 = 3;
|
|
737
796
|
continue $sm;
|
|
738
797
|
case 3:
|
|
739
|
-
var newToken = this.
|
|
740
|
-
this.
|
|
798
|
+
var newToken = this.j43_1;
|
|
799
|
+
this.f43_1.w42_1.kotlinx$atomicfu$value = CompletableDeferred_0(newToken);
|
|
741
800
|
return newToken;
|
|
742
801
|
case 4:
|
|
743
|
-
this.
|
|
744
|
-
var tmp_1 = this.
|
|
802
|
+
this.e9_1 = 5;
|
|
803
|
+
var tmp_1 = this.g9_1;
|
|
745
804
|
if (tmp_1 instanceof Error) {
|
|
746
|
-
var cause = this.
|
|
805
|
+
var cause = this.g9_1;
|
|
747
806
|
var tmp_2;
|
|
748
|
-
if (this.
|
|
807
|
+
if (this.i43_1 == null) {
|
|
749
808
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
750
809
|
} else {
|
|
751
|
-
tmp_2 = this.
|
|
810
|
+
tmp_2 = this.i43_1;
|
|
752
811
|
}
|
|
753
|
-
tmp_2.
|
|
812
|
+
tmp_2.cu(cause);
|
|
754
813
|
var tmp_3;
|
|
755
|
-
if (this.
|
|
814
|
+
if (this.i43_1 == null) {
|
|
756
815
|
throwUninitializedPropertyAccessException('newDeferred');
|
|
757
816
|
} else {
|
|
758
|
-
tmp_3 = this.
|
|
817
|
+
tmp_3 = this.i43_1;
|
|
759
818
|
}
|
|
760
|
-
this.
|
|
819
|
+
this.f43_1.v42_1.atomicfu$compareAndSet(tmp_3, null);
|
|
761
820
|
throw cause;
|
|
762
821
|
} else {
|
|
763
|
-
throw this.
|
|
822
|
+
throw this.g9_1;
|
|
764
823
|
}
|
|
765
824
|
|
|
766
825
|
case 5:
|
|
767
|
-
throw this.
|
|
826
|
+
throw this.g9_1;
|
|
768
827
|
}
|
|
769
828
|
} catch ($p) {
|
|
770
829
|
var e = $p;
|
|
771
|
-
if (this.
|
|
830
|
+
if (this.e9_1 === 5) {
|
|
772
831
|
throw e;
|
|
773
832
|
} else {
|
|
774
|
-
this.
|
|
775
|
-
this.
|
|
833
|
+
this.d9_1 = this.e9_1;
|
|
834
|
+
this.g9_1 = e;
|
|
776
835
|
}
|
|
777
836
|
}
|
|
778
837
|
while (true);
|
|
779
838
|
};
|
|
780
839
|
function AuthTokenHolder(loadTokens) {
|
|
781
|
-
this.
|
|
782
|
-
this.
|
|
783
|
-
this.
|
|
840
|
+
this.u42_1 = loadTokens;
|
|
841
|
+
this.v42_1 = atomic$ref$1(null);
|
|
842
|
+
this.w42_1 = atomic$ref$1(null);
|
|
784
843
|
}
|
|
785
|
-
protoOf(AuthTokenHolder).
|
|
844
|
+
protoOf(AuthTokenHolder).k43 = function ($completion) {
|
|
786
845
|
var tmp = new $loadTokenCOROUTINE$2(this, $completion);
|
|
787
|
-
tmp.
|
|
788
|
-
tmp.
|
|
789
|
-
return tmp.
|
|
846
|
+
tmp.f9_1 = Unit_instance;
|
|
847
|
+
tmp.g9_1 = null;
|
|
848
|
+
return tmp.l9();
|
|
790
849
|
};
|
|
791
|
-
protoOf(AuthTokenHolder).
|
|
850
|
+
protoOf(AuthTokenHolder).l43 = function (block, $completion) {
|
|
792
851
|
var tmp = new $setTokenCOROUTINE$3(this, block, $completion);
|
|
793
|
-
tmp.
|
|
794
|
-
tmp.
|
|
795
|
-
return tmp.
|
|
852
|
+
tmp.f9_1 = Unit_instance;
|
|
853
|
+
tmp.g9_1 = null;
|
|
854
|
+
return tmp.l9();
|
|
796
855
|
};
|
|
797
856
|
function bearer(_this__u8e3s4, block) {
|
|
798
857
|
// Inline function 'kotlin.with' call
|
|
@@ -802,30 +861,30 @@
|
|
|
802
861
|
block(this_0);
|
|
803
862
|
// Inline function 'kotlin.contracts.contract' call
|
|
804
863
|
// Inline function 'io.ktor.client.plugins.auth.providers.bearer.<anonymous>' call
|
|
805
|
-
_this__u8e3s4.
|
|
864
|
+
_this__u8e3s4.j3z_1.k(new BearerAuthProvider(this_0.m43_1, this_0.n43_1, this_0.o43_1, this_0.p43_1));
|
|
806
865
|
}
|
|
807
866
|
function BearerAuthConfig$_refreshTokens$slambda(resultContinuation) {
|
|
808
867
|
CoroutineImpl.call(this, resultContinuation);
|
|
809
868
|
}
|
|
810
|
-
protoOf(BearerAuthConfig$_refreshTokens$slambda).
|
|
811
|
-
var tmp = this.
|
|
812
|
-
tmp.
|
|
813
|
-
tmp.
|
|
814
|
-
return tmp.
|
|
869
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).z43 = function (_this__u8e3s4, $completion) {
|
|
870
|
+
var tmp = this.a44(_this__u8e3s4, $completion);
|
|
871
|
+
tmp.f9_1 = Unit_instance;
|
|
872
|
+
tmp.g9_1 = null;
|
|
873
|
+
return tmp.l9();
|
|
815
874
|
};
|
|
816
|
-
protoOf(BearerAuthConfig$_refreshTokens$slambda).
|
|
817
|
-
return this.
|
|
875
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).v9 = function (p1, $completion) {
|
|
876
|
+
return this.z43(p1 instanceof RefreshTokensParams ? p1 : THROW_CCE(), $completion);
|
|
818
877
|
};
|
|
819
|
-
protoOf(BearerAuthConfig$_refreshTokens$slambda).
|
|
820
|
-
var suspendResult = this.
|
|
878
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).l9 = function () {
|
|
879
|
+
var suspendResult = this.f9_1;
|
|
821
880
|
$sm: do
|
|
822
881
|
try {
|
|
823
|
-
var tmp = this.
|
|
882
|
+
var tmp = this.d9_1;
|
|
824
883
|
if (tmp === 0) {
|
|
825
|
-
this.
|
|
884
|
+
this.e9_1 = 1;
|
|
826
885
|
return null;
|
|
827
886
|
} else if (tmp === 1) {
|
|
828
|
-
throw this.
|
|
887
|
+
throw this.g9_1;
|
|
829
888
|
}
|
|
830
889
|
} catch ($p) {
|
|
831
890
|
var e = $p;
|
|
@@ -833,15 +892,15 @@
|
|
|
833
892
|
}
|
|
834
893
|
while (true);
|
|
835
894
|
};
|
|
836
|
-
protoOf(BearerAuthConfig$_refreshTokens$slambda).
|
|
895
|
+
protoOf(BearerAuthConfig$_refreshTokens$slambda).a44 = function (_this__u8e3s4, completion) {
|
|
837
896
|
var i = new BearerAuthConfig$_refreshTokens$slambda(completion);
|
|
838
|
-
i.
|
|
897
|
+
i.y43_1 = _this__u8e3s4;
|
|
839
898
|
return i;
|
|
840
899
|
};
|
|
841
900
|
function BearerAuthConfig$_refreshTokens$slambda_0(resultContinuation) {
|
|
842
901
|
var i = new BearerAuthConfig$_refreshTokens$slambda(resultContinuation);
|
|
843
902
|
var l = function (_this__u8e3s4, $completion) {
|
|
844
|
-
return i.
|
|
903
|
+
return i.z43(_this__u8e3s4, $completion);
|
|
845
904
|
};
|
|
846
905
|
l.$arity = 1;
|
|
847
906
|
return l;
|
|
@@ -849,25 +908,25 @@
|
|
|
849
908
|
function BearerAuthConfig$_loadTokens$slambda(resultContinuation) {
|
|
850
909
|
CoroutineImpl.call(this, resultContinuation);
|
|
851
910
|
}
|
|
852
|
-
protoOf(BearerAuthConfig$_loadTokens$slambda).
|
|
853
|
-
var tmp = this.
|
|
854
|
-
tmp.
|
|
855
|
-
tmp.
|
|
856
|
-
return tmp.
|
|
911
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).j44 = function ($completion) {
|
|
912
|
+
var tmp = this.k44($completion);
|
|
913
|
+
tmp.f9_1 = Unit_instance;
|
|
914
|
+
tmp.g9_1 = null;
|
|
915
|
+
return tmp.l9();
|
|
857
916
|
};
|
|
858
|
-
protoOf(BearerAuthConfig$_loadTokens$slambda).
|
|
859
|
-
return this.
|
|
917
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).sa = function ($completion) {
|
|
918
|
+
return this.j44($completion);
|
|
860
919
|
};
|
|
861
|
-
protoOf(BearerAuthConfig$_loadTokens$slambda).
|
|
862
|
-
var suspendResult = this.
|
|
920
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).l9 = function () {
|
|
921
|
+
var suspendResult = this.f9_1;
|
|
863
922
|
$sm: do
|
|
864
923
|
try {
|
|
865
|
-
var tmp = this.
|
|
924
|
+
var tmp = this.d9_1;
|
|
866
925
|
if (tmp === 0) {
|
|
867
|
-
this.
|
|
926
|
+
this.e9_1 = 1;
|
|
868
927
|
return null;
|
|
869
928
|
} else if (tmp === 1) {
|
|
870
|
-
throw this.
|
|
929
|
+
throw this.g9_1;
|
|
871
930
|
}
|
|
872
931
|
} catch ($p) {
|
|
873
932
|
var e = $p;
|
|
@@ -875,13 +934,13 @@
|
|
|
875
934
|
}
|
|
876
935
|
while (true);
|
|
877
936
|
};
|
|
878
|
-
protoOf(BearerAuthConfig$_loadTokens$slambda).
|
|
937
|
+
protoOf(BearerAuthConfig$_loadTokens$slambda).k44 = function (completion) {
|
|
879
938
|
return new BearerAuthConfig$_loadTokens$slambda(completion);
|
|
880
939
|
};
|
|
881
940
|
function BearerAuthConfig$_loadTokens$slambda_0(resultContinuation) {
|
|
882
941
|
var i = new BearerAuthConfig$_loadTokens$slambda(resultContinuation);
|
|
883
942
|
var l = function ($completion) {
|
|
884
|
-
return i.
|
|
943
|
+
return i.j44($completion);
|
|
885
944
|
};
|
|
886
945
|
l.$arity = 0;
|
|
887
946
|
return l;
|
|
@@ -891,76 +950,76 @@
|
|
|
891
950
|
}
|
|
892
951
|
function BearerAuthConfig() {
|
|
893
952
|
var tmp = this;
|
|
894
|
-
tmp.
|
|
953
|
+
tmp.m43_1 = BearerAuthConfig$_refreshTokens$slambda_0(null);
|
|
895
954
|
var tmp_0 = this;
|
|
896
|
-
tmp_0.
|
|
955
|
+
tmp_0.n43_1 = BearerAuthConfig$_loadTokens$slambda_0(null);
|
|
897
956
|
var tmp_1 = this;
|
|
898
|
-
tmp_1.
|
|
899
|
-
this.
|
|
957
|
+
tmp_1.o43_1 = BearerAuthConfig$_sendWithoutRequest$lambda;
|
|
958
|
+
this.p43_1 = null;
|
|
900
959
|
}
|
|
901
|
-
protoOf(BearerAuthConfig).
|
|
902
|
-
this.
|
|
960
|
+
protoOf(BearerAuthConfig).l44 = function (block) {
|
|
961
|
+
this.m43_1 = block;
|
|
903
962
|
};
|
|
904
963
|
function RefreshTokensParams(client, response, oldTokens) {
|
|
905
|
-
this.
|
|
906
|
-
this.
|
|
907
|
-
this.
|
|
964
|
+
this.m44_1 = client;
|
|
965
|
+
this.n44_1 = response;
|
|
966
|
+
this.o44_1 = oldTokens;
|
|
908
967
|
}
|
|
909
968
|
function BearerTokens(accessToken, refreshToken) {
|
|
910
|
-
this.
|
|
911
|
-
this.
|
|
969
|
+
this.p44_1 = accessToken;
|
|
970
|
+
this.q44_1 = refreshToken;
|
|
912
971
|
}
|
|
913
972
|
function BearerAuthProvider$_init_$lambda_lcdiwf(it) {
|
|
914
973
|
return true;
|
|
915
974
|
}
|
|
916
975
|
function BearerAuthProvider$addRequestHeaders$lambda($token) {
|
|
917
976
|
return function ($this$headers) {
|
|
918
|
-
var tokenValue = 'Bearer ' + $token.
|
|
977
|
+
var tokenValue = 'Bearer ' + $token.p44_1;
|
|
919
978
|
var tmp;
|
|
920
|
-
if ($this$headers.
|
|
921
|
-
$this$headers.
|
|
979
|
+
if ($this$headers.f28(HttpHeaders_getInstance().u2e_1)) {
|
|
980
|
+
$this$headers.m28(HttpHeaders_getInstance().u2e_1);
|
|
922
981
|
tmp = Unit_instance;
|
|
923
982
|
}
|
|
924
|
-
$this$headers.
|
|
983
|
+
$this$headers.j28(HttpHeaders_getInstance().u2e_1, tokenValue);
|
|
925
984
|
return Unit_instance;
|
|
926
985
|
};
|
|
927
986
|
}
|
|
928
987
|
function BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation) {
|
|
929
|
-
this.
|
|
930
|
-
this.
|
|
988
|
+
this.z44_1 = this$0;
|
|
989
|
+
this.a45_1 = $response;
|
|
931
990
|
CoroutineImpl.call(this, resultContinuation);
|
|
932
991
|
}
|
|
933
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
934
|
-
var tmp = this.
|
|
935
|
-
tmp.
|
|
936
|
-
tmp.
|
|
937
|
-
return tmp.
|
|
992
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).f45 = function ($completion) {
|
|
993
|
+
var tmp = this.k44($completion);
|
|
994
|
+
tmp.f9_1 = Unit_instance;
|
|
995
|
+
tmp.g9_1 = null;
|
|
996
|
+
return tmp.l9();
|
|
938
997
|
};
|
|
939
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
940
|
-
return this.
|
|
998
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).sa = function ($completion) {
|
|
999
|
+
return this.f45($completion);
|
|
941
1000
|
};
|
|
942
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
943
|
-
var suspendResult = this.
|
|
1001
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).l9 = function () {
|
|
1002
|
+
var suspendResult = this.f9_1;
|
|
944
1003
|
$sm: do
|
|
945
1004
|
try {
|
|
946
|
-
var tmp = this.
|
|
1005
|
+
var tmp = this.d9_1;
|
|
947
1006
|
switch (tmp) {
|
|
948
1007
|
case 0:
|
|
949
|
-
this.
|
|
950
|
-
this.
|
|
951
|
-
this.
|
|
952
|
-
this.
|
|
953
|
-
suspendResult = this.
|
|
1008
|
+
this.e9_1 = 3;
|
|
1009
|
+
this.b45_1 = this.z44_1.g45_1;
|
|
1010
|
+
this.c45_1 = this.a45_1.y2x().l2t_1;
|
|
1011
|
+
this.d9_1 = 1;
|
|
1012
|
+
suspendResult = this.z44_1.j45_1.k43(this);
|
|
954
1013
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
955
1014
|
return suspendResult;
|
|
956
1015
|
}
|
|
957
1016
|
|
|
958
1017
|
continue $sm;
|
|
959
1018
|
case 1:
|
|
960
|
-
this.
|
|
961
|
-
this.
|
|
962
|
-
this.
|
|
963
|
-
suspendResult = this.
|
|
1019
|
+
this.d45_1 = suspendResult;
|
|
1020
|
+
this.e45_1 = new RefreshTokensParams(this.c45_1, this.a45_1, this.d45_1);
|
|
1021
|
+
this.d9_1 = 2;
|
|
1022
|
+
suspendResult = this.b45_1(this.e45_1, this);
|
|
964
1023
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
965
1024
|
return suspendResult;
|
|
966
1025
|
}
|
|
@@ -969,46 +1028,46 @@
|
|
|
969
1028
|
case 2:
|
|
970
1029
|
return suspendResult;
|
|
971
1030
|
case 3:
|
|
972
|
-
throw this.
|
|
1031
|
+
throw this.g9_1;
|
|
973
1032
|
}
|
|
974
1033
|
} catch ($p) {
|
|
975
1034
|
var e = $p;
|
|
976
|
-
if (this.
|
|
1035
|
+
if (this.e9_1 === 3) {
|
|
977
1036
|
throw e;
|
|
978
1037
|
} else {
|
|
979
|
-
this.
|
|
980
|
-
this.
|
|
1038
|
+
this.d9_1 = this.e9_1;
|
|
1039
|
+
this.g9_1 = e;
|
|
981
1040
|
}
|
|
982
1041
|
}
|
|
983
1042
|
while (true);
|
|
984
1043
|
};
|
|
985
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).
|
|
986
|
-
return new BearerAuthProvider$refreshToken$slambda(this.
|
|
1044
|
+
protoOf(BearerAuthProvider$refreshToken$slambda).k44 = function (completion) {
|
|
1045
|
+
return new BearerAuthProvider$refreshToken$slambda(this.z44_1, this.a45_1, completion);
|
|
987
1046
|
};
|
|
988
1047
|
function BearerAuthProvider$refreshToken$slambda_0(this$0, $response, resultContinuation) {
|
|
989
1048
|
var i = new BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation);
|
|
990
1049
|
var l = function ($completion) {
|
|
991
|
-
return i.
|
|
1050
|
+
return i.f45($completion);
|
|
992
1051
|
};
|
|
993
1052
|
l.$arity = 0;
|
|
994
1053
|
return l;
|
|
995
1054
|
}
|
|
996
1055
|
function $addRequestHeadersCOROUTINE$4(_this__u8e3s4, request, authHeader, resultContinuation) {
|
|
997
1056
|
CoroutineImpl.call(this, resultContinuation);
|
|
998
|
-
this.
|
|
999
|
-
this.
|
|
1000
|
-
this.
|
|
1057
|
+
this.s45_1 = _this__u8e3s4;
|
|
1058
|
+
this.t45_1 = request;
|
|
1059
|
+
this.u45_1 = authHeader;
|
|
1001
1060
|
}
|
|
1002
|
-
protoOf($addRequestHeadersCOROUTINE$4).
|
|
1003
|
-
var suspendResult = this.
|
|
1061
|
+
protoOf($addRequestHeadersCOROUTINE$4).l9 = function () {
|
|
1062
|
+
var suspendResult = this.f9_1;
|
|
1004
1063
|
$sm: do
|
|
1005
1064
|
try {
|
|
1006
|
-
var tmp = this.
|
|
1065
|
+
var tmp = this.d9_1;
|
|
1007
1066
|
switch (tmp) {
|
|
1008
1067
|
case 0:
|
|
1009
|
-
this.
|
|
1010
|
-
this.
|
|
1011
|
-
suspendResult = this.
|
|
1068
|
+
this.e9_1 = 2;
|
|
1069
|
+
this.d9_1 = 1;
|
|
1070
|
+
suspendResult = this.s45_1.j45_1.k43(this);
|
|
1012
1071
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1013
1072
|
return suspendResult;
|
|
1014
1073
|
}
|
|
@@ -1024,37 +1083,37 @@
|
|
|
1024
1083
|
}
|
|
1025
1084
|
|
|
1026
1085
|
var token = tmp_0;
|
|
1027
|
-
headers(this.
|
|
1086
|
+
headers(this.t45_1, BearerAuthProvider$addRequestHeaders$lambda(token));
|
|
1028
1087
|
return Unit_instance;
|
|
1029
1088
|
case 2:
|
|
1030
|
-
throw this.
|
|
1089
|
+
throw this.g9_1;
|
|
1031
1090
|
}
|
|
1032
1091
|
} catch ($p) {
|
|
1033
1092
|
var e = $p;
|
|
1034
|
-
if (this.
|
|
1093
|
+
if (this.e9_1 === 2) {
|
|
1035
1094
|
throw e;
|
|
1036
1095
|
} else {
|
|
1037
|
-
this.
|
|
1038
|
-
this.
|
|
1096
|
+
this.d9_1 = this.e9_1;
|
|
1097
|
+
this.g9_1 = e;
|
|
1039
1098
|
}
|
|
1040
1099
|
}
|
|
1041
1100
|
while (true);
|
|
1042
1101
|
};
|
|
1043
1102
|
function $refreshTokenCOROUTINE$5(_this__u8e3s4, response, resultContinuation) {
|
|
1044
1103
|
CoroutineImpl.call(this, resultContinuation);
|
|
1045
|
-
this.
|
|
1046
|
-
this.
|
|
1104
|
+
this.d46_1 = _this__u8e3s4;
|
|
1105
|
+
this.e46_1 = response;
|
|
1047
1106
|
}
|
|
1048
|
-
protoOf($refreshTokenCOROUTINE$5).
|
|
1049
|
-
var suspendResult = this.
|
|
1107
|
+
protoOf($refreshTokenCOROUTINE$5).l9 = function () {
|
|
1108
|
+
var suspendResult = this.f9_1;
|
|
1050
1109
|
$sm: do
|
|
1051
1110
|
try {
|
|
1052
|
-
var tmp = this.
|
|
1111
|
+
var tmp = this.d9_1;
|
|
1053
1112
|
switch (tmp) {
|
|
1054
1113
|
case 0:
|
|
1055
|
-
this.
|
|
1056
|
-
this.
|
|
1057
|
-
suspendResult = this.
|
|
1114
|
+
this.e9_1 = 2;
|
|
1115
|
+
this.d9_1 = 1;
|
|
1116
|
+
suspendResult = this.d46_1.j45_1.l43(BearerAuthProvider$refreshToken$slambda_0(this.d46_1, this.e46_1, null), this);
|
|
1058
1117
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1059
1118
|
return suspendResult;
|
|
1060
1119
|
}
|
|
@@ -1064,15 +1123,15 @@
|
|
|
1064
1123
|
var newToken = suspendResult;
|
|
1065
1124
|
return !(newToken == null);
|
|
1066
1125
|
case 2:
|
|
1067
|
-
throw this.
|
|
1126
|
+
throw this.g9_1;
|
|
1068
1127
|
}
|
|
1069
1128
|
} catch ($p) {
|
|
1070
1129
|
var e = $p;
|
|
1071
|
-
if (this.
|
|
1130
|
+
if (this.e9_1 === 2) {
|
|
1072
1131
|
throw e;
|
|
1073
1132
|
} else {
|
|
1074
|
-
this.
|
|
1075
|
-
this.
|
|
1133
|
+
this.d9_1 = this.e9_1;
|
|
1134
|
+
this.g9_1 = e;
|
|
1076
1135
|
}
|
|
1077
1136
|
}
|
|
1078
1137
|
while (true);
|
|
@@ -1085,53 +1144,53 @@
|
|
|
1085
1144
|
tmp = sendWithoutRequestCallback;
|
|
1086
1145
|
}
|
|
1087
1146
|
sendWithoutRequestCallback = tmp;
|
|
1088
|
-
this.
|
|
1089
|
-
this.
|
|
1090
|
-
this.
|
|
1091
|
-
this.
|
|
1147
|
+
this.g45_1 = refreshTokens;
|
|
1148
|
+
this.h45_1 = sendWithoutRequestCallback;
|
|
1149
|
+
this.i45_1 = realm;
|
|
1150
|
+
this.j45_1 = new AuthTokenHolder(loadTokens);
|
|
1092
1151
|
}
|
|
1093
|
-
protoOf(BearerAuthProvider).
|
|
1152
|
+
protoOf(BearerAuthProvider).i42 = function () {
|
|
1094
1153
|
var message = 'Deprecated';
|
|
1095
1154
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1096
1155
|
};
|
|
1097
|
-
protoOf(BearerAuthProvider).
|
|
1098
|
-
return this.
|
|
1156
|
+
protoOf(BearerAuthProvider).k41 = function (request) {
|
|
1157
|
+
return this.h45_1(request);
|
|
1099
1158
|
};
|
|
1100
|
-
protoOf(BearerAuthProvider).
|
|
1101
|
-
if (!(auth.
|
|
1102
|
-
get_LOGGER().
|
|
1159
|
+
protoOf(BearerAuthProvider).l3z = function (auth) {
|
|
1160
|
+
if (!(auth.x2n_1 === 'Bearer')) {
|
|
1161
|
+
get_LOGGER().k2c('Bearer Auth Provider is not applicable for ' + auth.toString());
|
|
1103
1162
|
return false;
|
|
1104
1163
|
}
|
|
1105
1164
|
var tmp;
|
|
1106
|
-
if (this.
|
|
1165
|
+
if (this.i45_1 == null) {
|
|
1107
1166
|
tmp = true;
|
|
1108
1167
|
} else {
|
|
1109
1168
|
if (!(auth instanceof Parameterized)) {
|
|
1110
1169
|
tmp = false;
|
|
1111
1170
|
} else {
|
|
1112
|
-
tmp = auth.
|
|
1171
|
+
tmp = auth.g2e('realm') == this.i45_1;
|
|
1113
1172
|
}
|
|
1114
1173
|
}
|
|
1115
1174
|
var isSameRealm = tmp;
|
|
1116
1175
|
if (!isSameRealm) {
|
|
1117
|
-
get_LOGGER().
|
|
1176
|
+
get_LOGGER().k2c('Bearer Auth Provider is not applicable for this realm');
|
|
1118
1177
|
}
|
|
1119
1178
|
return isSameRealm;
|
|
1120
1179
|
};
|
|
1121
|
-
protoOf(BearerAuthProvider).
|
|
1180
|
+
protoOf(BearerAuthProvider).h42 = function (request, authHeader, $completion) {
|
|
1122
1181
|
var tmp = new $addRequestHeadersCOROUTINE$4(this, request, authHeader, $completion);
|
|
1123
|
-
tmp.
|
|
1124
|
-
tmp.
|
|
1125
|
-
return tmp.
|
|
1182
|
+
tmp.f9_1 = Unit_instance;
|
|
1183
|
+
tmp.g9_1 = null;
|
|
1184
|
+
return tmp.l9();
|
|
1126
1185
|
};
|
|
1127
|
-
protoOf(BearerAuthProvider).
|
|
1186
|
+
protoOf(BearerAuthProvider).g42 = function (response, $completion) {
|
|
1128
1187
|
var tmp = new $refreshTokenCOROUTINE$5(this, response, $completion);
|
|
1129
|
-
tmp.
|
|
1130
|
-
tmp.
|
|
1131
|
-
return tmp.
|
|
1188
|
+
tmp.f9_1 = Unit_instance;
|
|
1189
|
+
tmp.g9_1 = null;
|
|
1190
|
+
return tmp.l9();
|
|
1132
1191
|
};
|
|
1133
1192
|
//region block: post-declaration
|
|
1134
|
-
protoOf(BearerAuthProvider).
|
|
1193
|
+
protoOf(BearerAuthProvider).l41 = addRequestHeaders$default;
|
|
1135
1194
|
//endregion
|
|
1136
1195
|
//region block: exports
|
|
1137
1196
|
_.$_$ = _.$_$ || {};
|