@solibo/solibo-sdk 1.0.35 → 1.0.37
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/KmLogging-logging.mjs +286 -0
- package/KmLogging-logging.mjs.map +1 -0
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +7247 -0
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -0
- package/KotlinBigInteger-bignum.mjs +5987 -0
- package/KotlinBigInteger-bignum.mjs.map +1 -0
- package/MultiplatformSettings-multiplatform-settings-no-arg.mjs +15 -0
- package/{MultiplatformSettings-multiplatform-settings-no-arg.js.map → MultiplatformSettings-multiplatform-settings-no-arg.mjs.map} +1 -1
- package/MultiplatformSettings-multiplatform-settings.mjs +70 -0
- package/MultiplatformSettings-multiplatform-settings.mjs.map +1 -0
- package/Stately-stately-concurrency.mjs +25 -0
- package/{Stately-stately-concurrency.js.map → Stately-stately-concurrency.mjs.map} +1 -1
- package/Stately-stately-strict.mjs +8 -0
- package/{Stately-stately-strict.js.map → Stately-stately-strict.mjs.map} +1 -1
- package/cryptography-kotlin-cryptography-bigint.mjs +241 -0
- package/cryptography-kotlin-cryptography-bigint.mjs.map +1 -0
- package/cryptography-kotlin-cryptography-core.mjs +1095 -0
- package/cryptography-kotlin-cryptography-core.mjs.map +1 -0
- package/cryptography-kotlin-cryptography-provider-base.mjs +62 -0
- package/cryptography-kotlin-cryptography-provider-base.mjs.map +1 -0
- package/cryptography-kotlin-cryptography-provider-optimal.mjs +4 -0
- package/{cryptography-kotlin-cryptography-provider-optimal.js.map → cryptography-kotlin-cryptography-provider-optimal.mjs.map} +1 -1
- package/cryptography-kotlin-cryptography-provider-webcrypto.mjs +1195 -0
- package/cryptography-kotlin-cryptography-provider-webcrypto.mjs.map +1 -0
- package/cryptography-kotlin-cryptography-random.mjs +127 -0
- package/cryptography-kotlin-cryptography-random.mjs.map +1 -0
- package/cryptography-kotlin-cryptography-serialization-asn1-modules.mjs +701 -0
- package/cryptography-kotlin-cryptography-serialization-asn1-modules.mjs.map +1 -0
- package/cryptography-kotlin-cryptography-serialization-asn1.mjs +1413 -0
- package/cryptography-kotlin-cryptography-serialization-asn1.mjs.map +1 -0
- package/cryptography-kotlin-cryptography-serialization-pem.mjs +153 -0
- package/cryptography-kotlin-cryptography-serialization-pem.mjs.map +1 -0
- package/index.d.ts +2 -579
- package/index.js +2 -578
- package/kotlin-kotlin-stdlib.mjs +19205 -0
- package/kotlin-kotlin-stdlib.mjs.map +1 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +4 -0
- package/{kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map → kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map} +1 -1
- package/kotlinx-atomicfu.mjs +250 -0
- package/kotlinx-atomicfu.mjs.map +1 -0
- package/kotlinx-browser.mjs +8 -0
- package/{kotlinx-browser.js.map → kotlinx-browser.mjs.map} +1 -1
- package/kotlinx-coroutines-core.mjs +9836 -0
- package/kotlinx-coroutines-core.mjs.map +1 -0
- package/kotlinx-io-kotlinx-io-bytestring.mjs +202 -0
- package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -0
- package/kotlinx-io-kotlinx-io-core.mjs +2020 -0
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +6337 -0
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
- package/{kotlinx-serialization-kotlinx-serialization-json-io.js.map → kotlinx-serialization-kotlinx-serialization-json-io.mjs.map} +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +5104 -0
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
- package/ktor-ktor-client-auth.mjs +1491 -0
- package/ktor-ktor-client-auth.mjs.map +1 -0
- package/ktor-ktor-client-content-negotiation.mjs +750 -0
- package/ktor-ktor-client-content-negotiation.mjs.map +1 -0
- package/ktor-ktor-client-core.mjs +14114 -0
- package/ktor-ktor-client-core.mjs.map +1 -0
- package/ktor-ktor-client-logging.mjs +3263 -0
- package/ktor-ktor-client-logging.mjs.map +1 -0
- package/ktor-ktor-client-mock.mjs +4 -0
- package/{ktor-ktor-client-mock.js.map → ktor-ktor-client-mock.mjs.map} +1 -1
- package/ktor-ktor-events.mjs +81 -0
- package/ktor-ktor-events.mjs.map +1 -0
- package/ktor-ktor-http-cio.mjs +2254 -0
- package/ktor-ktor-http-cio.mjs.map +1 -0
- package/ktor-ktor-http.mjs +5181 -0
- package/ktor-ktor-http.mjs.map +1 -0
- package/ktor-ktor-io.mjs +3608 -0
- package/ktor-ktor-io.mjs.map +1 -0
- package/ktor-ktor-serialization-kotlinx-json.mjs +46 -0
- package/{ktor-ktor-serialization-kotlinx-json.js.map → ktor-ktor-serialization-kotlinx-json.mjs.map} +1 -1
- package/ktor-ktor-serialization-kotlinx.mjs +843 -0
- package/ktor-ktor-serialization-kotlinx.mjs.map +1 -0
- package/ktor-ktor-serialization.mjs +364 -0
- package/ktor-ktor-serialization.mjs.map +1 -0
- package/ktor-ktor-sse.mjs +4 -0
- package/ktor-ktor-sse.mjs.map +1 -0
- package/ktor-ktor-utils.mjs +3627 -0
- package/ktor-ktor-utils.mjs.map +1 -0
- package/ktor-ktor-websocket-serialization.mjs +4 -0
- package/ktor-ktor-websocket-serialization.mjs.map +1 -0
- package/ktor-ktor-websockets.mjs +2535 -0
- package/ktor-ktor-websockets.mjs.map +1 -0
- package/package.json +1 -1
- package/solibo-sdk-sdk-home-api.mjs +193155 -0
- package/solibo-sdk-sdk-home-api.mjs.map +1 -0
- package/solibo-sdk-sdk.d.mts +13403 -0
- package/solibo-sdk-sdk.mjs +7814 -0
- package/solibo-sdk-sdk.mjs.map +1 -0
- package/KmLogging-logging.js +0 -301
- package/KmLogging-logging.js.map +0 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.js +0 -7261
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +0 -1
- package/KotlinBigInteger-bignum.js +0 -5999
- package/KotlinBigInteger-bignum.js.map +0 -1
- package/MultiplatformSettings-multiplatform-settings-no-arg.js +0 -29
- package/MultiplatformSettings-multiplatform-settings.js +0 -82
- package/MultiplatformSettings-multiplatform-settings.js.map +0 -1
- package/Stately-stately-concurrency.js +0 -37
- package/Stately-stately-strict.js +0 -19
- package/cryptography-kotlin-cryptography-bigint.js +0 -254
- package/cryptography-kotlin-cryptography-bigint.js.map +0 -1
- package/cryptography-kotlin-cryptography-core.js +0 -1110
- package/cryptography-kotlin-cryptography-core.js.map +0 -1
- package/cryptography-kotlin-cryptography-provider-base.js +0 -77
- package/cryptography-kotlin-cryptography-provider-base.js.map +0 -1
- package/cryptography-kotlin-cryptography-provider-optimal.js +0 -15
- package/cryptography-kotlin-cryptography-provider-webcrypto.js +0 -1222
- package/cryptography-kotlin-cryptography-provider-webcrypto.js.map +0 -1
- package/cryptography-kotlin-cryptography-random.js +0 -139
- package/cryptography-kotlin-cryptography-random.js.map +0 -1
- package/cryptography-kotlin-cryptography-serialization-asn1-modules.js +0 -715
- package/cryptography-kotlin-cryptography-serialization-asn1-modules.js.map +0 -1
- package/cryptography-kotlin-cryptography-serialization-asn1.js +0 -1427
- package/cryptography-kotlin-cryptography-serialization-asn1.js.map +0 -1
- package/cryptography-kotlin-cryptography-serialization-pem.js +0 -165
- package/cryptography-kotlin-cryptography-serialization-pem.js.map +0 -1
- package/kotlin-kotlin-stdlib.js +0 -19124
- package/kotlin-kotlin-stdlib.js.map +0 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +0 -15
- package/kotlinx-atomicfu.js +0 -262
- package/kotlinx-atomicfu.js.map +0 -1
- package/kotlinx-browser.js +0 -19
- package/kotlinx-coroutines-core.js +0 -9849
- package/kotlinx-coroutines-core.js.map +0 -1
- package/kotlinx-io-kotlinx-io-bytestring.js +0 -214
- package/kotlinx-io-kotlinx-io-bytestring.js.map +0 -1
- package/kotlinx-io-kotlinx-io-core.js +0 -2035
- package/kotlinx-io-kotlinx-io-core.js.map +0 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +0 -6349
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +0 -1
- package/kotlinx-serialization-kotlinx-serialization-json-io.js +0 -15
- package/kotlinx-serialization-kotlinx-serialization-json.js +0 -5117
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +0 -1
- package/ktor-ktor-client-auth.js +0 -1510
- package/ktor-ktor-client-auth.js.map +0 -1
- package/ktor-ktor-client-content-negotiation.js +0 -767
- package/ktor-ktor-client-content-negotiation.js.map +0 -1
- package/ktor-ktor-client-core.js +0 -14143
- package/ktor-ktor-client-core.js.map +0 -1
- package/ktor-ktor-client-logging.js +0 -3286
- package/ktor-ktor-client-logging.js.map +0 -1
- package/ktor-ktor-client-mock.js +0 -15
- package/ktor-ktor-events.js +0 -94
- package/ktor-ktor-events.js.map +0 -1
- package/ktor-ktor-http-cio.js +0 -2271
- package/ktor-ktor-http-cio.js.map +0 -1
- package/ktor-ktor-http.js +0 -5196
- package/ktor-ktor-http.js.map +0 -1
- package/ktor-ktor-io.js +0 -3628
- package/ktor-ktor-io.js.map +0 -1
- package/ktor-ktor-serialization-kotlinx-json.js +0 -67
- package/ktor-ktor-serialization-kotlinx.js +0 -865
- package/ktor-ktor-serialization-kotlinx.js.map +0 -1
- package/ktor-ktor-serialization.js +0 -379
- package/ktor-ktor-serialization.js.map +0 -1
- package/ktor-ktor-sse.js +0 -15
- package/ktor-ktor-sse.js.map +0 -1
- package/ktor-ktor-utils.js +0 -3643
- package/ktor-ktor-utils.js.map +0 -1
- package/ktor-ktor-websocket-serialization.js +0 -15
- package/ktor-ktor-websocket-serialization.js.map +0 -1
- package/ktor-ktor-websockets.js +0 -2552
- package/ktor-ktor-websockets.js.map +0 -1
- package/solibo-sdk-sdk-home-api.js +0 -194775
- package/solibo-sdk-sdk-home-api.js.map +0 -1
- package/solibo-sdk-sdk.d.ts +0 -14248
- package/solibo-sdk-sdk.js +0 -7897
- package/solibo-sdk-sdk.js.map +0 -1
package/ktor-ktor-client-auth.js
DELETED
|
@@ -1,1510 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports', './kotlin-kotlin-stdlib.js', './ktor-ktor-client-core.js', './ktor-ktor-http.js', './kotlinx-atomicfu.js', './ktor-ktor-utils.js', './kotlinx-coroutines-core.js'], factory);
|
|
4
|
-
else if (typeof exports === 'object')
|
|
5
|
-
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-client-core.js'), require('./ktor-ktor-http.js'), require('./kotlinx-atomicfu.js'), require('./ktor-ktor-utils.js'), require('./kotlinx-coroutines-core.js'));
|
|
6
|
-
else {
|
|
7
|
-
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
|
-
throw new Error("Error loading module 'ktor-ktor-client-auth'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'ktor-ktor-client-auth'.");
|
|
9
|
-
}
|
|
10
|
-
if (typeof globalThis['ktor-ktor-client-core'] === 'undefined') {
|
|
11
|
-
throw new Error("Error loading module 'ktor-ktor-client-auth'. Its dependency 'ktor-ktor-client-core' was not found. Please, check whether 'ktor-ktor-client-core' is loaded prior to 'ktor-ktor-client-auth'.");
|
|
12
|
-
}
|
|
13
|
-
if (typeof globalThis['ktor-ktor-http'] === 'undefined') {
|
|
14
|
-
throw new Error("Error loading module 'ktor-ktor-client-auth'. Its dependency 'ktor-ktor-http' was not found. Please, check whether 'ktor-ktor-http' is loaded prior to 'ktor-ktor-client-auth'.");
|
|
15
|
-
}
|
|
16
|
-
if (typeof globalThis['kotlinx-atomicfu'] === 'undefined') {
|
|
17
|
-
throw new Error("Error loading module 'ktor-ktor-client-auth'. Its dependency 'kotlinx-atomicfu' was not found. Please, check whether 'kotlinx-atomicfu' is loaded prior to 'ktor-ktor-client-auth'.");
|
|
18
|
-
}
|
|
19
|
-
if (typeof globalThis['ktor-ktor-utils'] === 'undefined') {
|
|
20
|
-
throw new Error("Error loading module 'ktor-ktor-client-auth'. Its dependency 'ktor-ktor-utils' was not found. Please, check whether 'ktor-ktor-utils' is loaded prior to 'ktor-ktor-client-auth'.");
|
|
21
|
-
}
|
|
22
|
-
if (typeof globalThis['kotlinx-coroutines-core'] === 'undefined') {
|
|
23
|
-
throw new Error("Error loading module 'ktor-ktor-client-auth'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'ktor-ktor-client-auth'.");
|
|
24
|
-
}
|
|
25
|
-
globalThis['ktor-ktor-client-auth'] = factory(typeof globalThis['ktor-ktor-client-auth'] === 'undefined' ? {} : globalThis['ktor-ktor-client-auth'], globalThis['kotlin-kotlin-stdlib'], globalThis['ktor-ktor-client-core'], globalThis['ktor-ktor-http'], globalThis['kotlinx-atomicfu'], globalThis['ktor-ktor-utils'], globalThis['kotlinx-coroutines-core']);
|
|
26
|
-
}
|
|
27
|
-
}(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) {
|
|
28
|
-
'use strict';
|
|
29
|
-
//region block: imports
|
|
30
|
-
var CoroutineImpl = kotlin_kotlin.$_$.qa;
|
|
31
|
-
var Unit_instance = kotlin_kotlin.$_$.p5;
|
|
32
|
-
var protoOf = kotlin_kotlin.$_$.jd;
|
|
33
|
-
var THROW_CCE = kotlin_kotlin.$_$.hi;
|
|
34
|
-
var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.l1;
|
|
35
|
-
var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.k;
|
|
36
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.oc;
|
|
37
|
-
var VOID = kotlin_kotlin.$_$.c;
|
|
38
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.k;
|
|
39
|
-
var initMetadataForClass = kotlin_kotlin.$_$.jc;
|
|
40
|
-
var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
|
|
41
|
-
var emptyList = kotlin_kotlin.$_$.k7;
|
|
42
|
-
var toList = kotlin_kotlin.$_$.j9;
|
|
43
|
-
var ConcurrentMap = kotlin_io_ktor_ktor_utils.$_$.f;
|
|
44
|
-
var KtMutableMap = kotlin_kotlin.$_$.b6;
|
|
45
|
-
var getKClass = kotlin_kotlin.$_$.de;
|
|
46
|
-
var arrayOf = kotlin_kotlin.$_$.vi;
|
|
47
|
-
var createKType = kotlin_kotlin.$_$.be;
|
|
48
|
-
var createInvariantKTypeProjection = kotlin_kotlin.$_$.zd;
|
|
49
|
-
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.c5;
|
|
50
|
-
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.w;
|
|
51
|
-
var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.y;
|
|
52
|
-
var Send_instance = kotlin_io_ktor_ktor_client_core.$_$.b;
|
|
53
|
-
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.t;
|
|
54
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.n6;
|
|
55
|
-
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.j;
|
|
56
|
-
var parseAuthorizationHeaders = kotlin_io_ktor_ktor_http.$_$.n;
|
|
57
|
-
var flatten = kotlin_kotlin.$_$.t7;
|
|
58
|
-
var to = kotlin_kotlin.$_$.nj;
|
|
59
|
-
var get_isTraceEnabled = kotlin_io_ktor_ktor_utils.$_$.s;
|
|
60
|
-
var first = kotlin_kotlin.$_$.s7;
|
|
61
|
-
var OnRequestContext = kotlin_io_ktor_ktor_client_core.$_$.n;
|
|
62
|
-
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.f1;
|
|
63
|
-
var toString = kotlin_kotlin.$_$.md;
|
|
64
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.z9;
|
|
65
|
-
var Sender = kotlin_io_ktor_ktor_client_core.$_$.o;
|
|
66
|
-
var HashSet_init_$Create$ = kotlin_kotlin.$_$.r;
|
|
67
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.lc;
|
|
68
|
-
var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.r;
|
|
69
|
-
var Unit = kotlin_kotlin.$_$.si;
|
|
70
|
-
var createClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.s;
|
|
71
|
-
var KtList = kotlin_kotlin.$_$.w5;
|
|
72
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.nc;
|
|
73
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.kc;
|
|
74
|
-
var get = kotlin_kotlin.$_$.ma;
|
|
75
|
-
var fold = kotlin_kotlin.$_$.la;
|
|
76
|
-
var minusKey = kotlin_kotlin.$_$.na;
|
|
77
|
-
var plus = kotlin_kotlin.$_$.pa;
|
|
78
|
-
var Element = kotlin_kotlin.$_$.oa;
|
|
79
|
-
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.o1;
|
|
80
|
-
var isInterface = kotlin_kotlin.$_$.yc;
|
|
81
|
-
var equals = kotlin_kotlin.$_$.ac;
|
|
82
|
-
var Mutex = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g1;
|
|
83
|
-
var NonCancellable_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.s;
|
|
84
|
-
var withContext = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
|
|
85
|
-
var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.x1;
|
|
86
|
-
var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q;
|
|
87
|
-
var headers = kotlin_io_ktor_ktor_client_core.$_$.h1;
|
|
88
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.u1;
|
|
89
|
-
var Parameterized = kotlin_io_ktor_ktor_http.$_$.m;
|
|
90
|
-
//endregion
|
|
91
|
-
//region block: pre-declaration
|
|
92
|
-
initMetadataForLambda(AuthConfig$isUnauthorizedResponse$slambda, CoroutineImpl, VOID, [1]);
|
|
93
|
-
initMetadataForClass(AuthConfig, 'AuthConfig', AuthConfig);
|
|
94
|
-
initMetadataForClass(AtomicCounter, 'AtomicCounter', AtomicCounter);
|
|
95
|
-
initMetadataForLambda(Auth$lambda$slambda, CoroutineImpl, VOID, [3]);
|
|
96
|
-
initMetadataForLambda(Auth$lambda$slambda_1, CoroutineImpl, VOID, [2]);
|
|
97
|
-
initMetadataForCoroutine($invoke$refreshTokenIfNeededCOROUTINE$, CoroutineImpl);
|
|
98
|
-
initMetadataForCoroutine($invoke$executeWithNewTokenCOROUTINE$, CoroutineImpl);
|
|
99
|
-
function sendWithoutRequest(request) {
|
|
100
|
-
return this.on2();
|
|
101
|
-
}
|
|
102
|
-
function addRequestHeaders$default(request, authHeader, $completion, $super) {
|
|
103
|
-
authHeader = authHeader === VOID ? null : authHeader;
|
|
104
|
-
return $super === VOID ? this.nn2(request, authHeader, $completion) : $super.nn2.call(this, request, authHeader, $completion);
|
|
105
|
-
}
|
|
106
|
-
function refreshToken(response, $completion) {
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
initMetadataForInterface(AuthProvider, 'AuthProvider', VOID, VOID, VOID, [2, 1]);
|
|
110
|
-
initMetadataForCompanion(Companion);
|
|
111
|
-
initMetadataForClass(SetTokenContext, 'SetTokenContext', SetTokenContext, VOID, [Element]);
|
|
112
|
-
initMetadataForLambda(AuthTokenHolder$setToken$slambda, CoroutineImpl, VOID, [1]);
|
|
113
|
-
initMetadataForLambda(AuthTokenHolder$clearToken$slambda, CoroutineImpl, VOID, [1]);
|
|
114
|
-
initMetadataForCoroutine($loadTokenCOROUTINE$, CoroutineImpl);
|
|
115
|
-
initMetadataForClass(AuthTokenHolder, 'AuthTokenHolder', VOID, VOID, VOID, [0, 2]);
|
|
116
|
-
initMetadataForLambda(BearerAuthConfig$refreshTokens$slambda, CoroutineImpl, VOID, [1]);
|
|
117
|
-
initMetadataForLambda(BearerAuthConfig$loadTokens$slambda, CoroutineImpl, VOID, [0]);
|
|
118
|
-
initMetadataForClass(BearerAuthConfig, 'BearerAuthConfig', BearerAuthConfig);
|
|
119
|
-
initMetadataForClass(BearerTokens, 'BearerTokens');
|
|
120
|
-
initMetadataForClass(RefreshTokensParams, 'RefreshTokensParams');
|
|
121
|
-
initMetadataForLambda(BearerAuthProvider$refreshToken$slambda, CoroutineImpl, VOID, [0]);
|
|
122
|
-
initMetadataForCoroutine($addRequestHeadersCOROUTINE$, CoroutineImpl);
|
|
123
|
-
initMetadataForCoroutine($refreshTokenCOROUTINE$, CoroutineImpl);
|
|
124
|
-
initMetadataForClass(BearerAuthProvider, 'BearerAuthProvider', VOID, VOID, [AuthProvider], [2, 1]);
|
|
125
|
-
//endregion
|
|
126
|
-
function get_LOGGER() {
|
|
127
|
-
_init_properties_Auth_kt__9ob1dk();
|
|
128
|
-
return LOGGER;
|
|
129
|
-
}
|
|
130
|
-
var LOGGER;
|
|
131
|
-
function get_AuthCircuitBreaker() {
|
|
132
|
-
_init_properties_Auth_kt__9ob1dk();
|
|
133
|
-
return AuthCircuitBreaker;
|
|
134
|
-
}
|
|
135
|
-
var AuthCircuitBreaker;
|
|
136
|
-
function get_Auth() {
|
|
137
|
-
_init_properties_Auth_kt__9ob1dk();
|
|
138
|
-
return Auth;
|
|
139
|
-
}
|
|
140
|
-
var Auth;
|
|
141
|
-
function get_AuthProvidersKey() {
|
|
142
|
-
_init_properties_Auth_kt__9ob1dk();
|
|
143
|
-
return AuthProvidersKey;
|
|
144
|
-
}
|
|
145
|
-
var AuthProvidersKey;
|
|
146
|
-
function AuthConfig$isUnauthorizedResponse$slambda(resultContinuation) {
|
|
147
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
148
|
-
}
|
|
149
|
-
protoOf(AuthConfig$isUnauthorizedResponse$slambda).umz = function (it, $completion) {
|
|
150
|
-
var tmp = this.v4j(it, $completion);
|
|
151
|
-
tmp.k9_1 = Unit_instance;
|
|
152
|
-
tmp.l9_1 = null;
|
|
153
|
-
return tmp.q9();
|
|
154
|
-
};
|
|
155
|
-
protoOf(AuthConfig$isUnauthorizedResponse$slambda).ca = function (p1, $completion) {
|
|
156
|
-
return this.umz(p1 instanceof HttpResponse ? p1 : THROW_CCE(), $completion);
|
|
157
|
-
};
|
|
158
|
-
protoOf(AuthConfig$isUnauthorizedResponse$slambda).q9 = function () {
|
|
159
|
-
var suspendResult = this.k9_1;
|
|
160
|
-
$sm: do
|
|
161
|
-
try {
|
|
162
|
-
var tmp = this.i9_1;
|
|
163
|
-
if (tmp === 0) {
|
|
164
|
-
this.j9_1 = 1;
|
|
165
|
-
return this.tmz_1.v3p().equals(Companion_getInstance().l3l_1);
|
|
166
|
-
} else if (tmp === 1) {
|
|
167
|
-
throw this.l9_1;
|
|
168
|
-
}
|
|
169
|
-
} catch ($p) {
|
|
170
|
-
var e = $p;
|
|
171
|
-
throw e;
|
|
172
|
-
}
|
|
173
|
-
while (true);
|
|
174
|
-
};
|
|
175
|
-
protoOf(AuthConfig$isUnauthorizedResponse$slambda).v4j = function (it, completion) {
|
|
176
|
-
var i = new AuthConfig$isUnauthorizedResponse$slambda(completion);
|
|
177
|
-
i.tmz_1 = it;
|
|
178
|
-
return i;
|
|
179
|
-
};
|
|
180
|
-
function AuthConfig$isUnauthorizedResponse$slambda_0(resultContinuation) {
|
|
181
|
-
var i = new AuthConfig$isUnauthorizedResponse$slambda(resultContinuation);
|
|
182
|
-
var l = function (it, $completion) {
|
|
183
|
-
return i.umz(it, $completion);
|
|
184
|
-
};
|
|
185
|
-
l.$arity = 1;
|
|
186
|
-
return l;
|
|
187
|
-
}
|
|
188
|
-
function AuthConfig() {
|
|
189
|
-
var tmp = this;
|
|
190
|
-
// Inline function 'kotlin.collections.mutableListOf' call
|
|
191
|
-
tmp.vmz_1 = ArrayList_init_$Create$();
|
|
192
|
-
var tmp_0 = this;
|
|
193
|
-
tmp_0.wmz_1 = AuthConfig$isUnauthorizedResponse$slambda_0(null);
|
|
194
|
-
}
|
|
195
|
-
function AtomicCounter() {
|
|
196
|
-
this.xmz_1 = atomic$int$1(0);
|
|
197
|
-
}
|
|
198
|
-
function get_authProviders(_this__u8e3s4) {
|
|
199
|
-
_init_properties_Auth_kt__9ob1dk();
|
|
200
|
-
var tmp0_elvis_lhs = _this__u8e3s4.j48_1.j32(get_AuthProvidersKey());
|
|
201
|
-
return tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
|
|
202
|
-
}
|
|
203
|
-
function AuthConfig$_init_$ref_ms3pb9() {
|
|
204
|
-
var l = function () {
|
|
205
|
-
return new AuthConfig();
|
|
206
|
-
};
|
|
207
|
-
l.callableName = '<init>';
|
|
208
|
-
return l;
|
|
209
|
-
}
|
|
210
|
-
function Auth$lambda($this$createClientPlugin) {
|
|
211
|
-
_init_properties_Auth_kt__9ob1dk();
|
|
212
|
-
var providers = toList($this$createClientPlugin.v4i_1.vmz_1);
|
|
213
|
-
$this$createClientPlugin.u4i_1.j48_1.l32(get_AuthProvidersKey(), providers);
|
|
214
|
-
var tokenVersions = new ConcurrentMap();
|
|
215
|
-
// Inline function 'io.ktor.util.AttributeKey' call
|
|
216
|
-
var name = 'ProviderVersionAttributeKey';
|
|
217
|
-
// Inline function 'io.ktor.util.reflect.typeInfo' call
|
|
218
|
-
var tmp = getKClass(KtMutableMap);
|
|
219
|
-
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
220
|
-
var tmp_0;
|
|
221
|
-
try {
|
|
222
|
-
tmp_0 = createKType(getKClass(KtMutableMap), arrayOf([createInvariantKTypeProjection(createKType(getKClass(AuthProvider), arrayOf([]), false)), createInvariantKTypeProjection(createKType(PrimitiveClasses_getInstance().hc(), arrayOf([]), false))]), false);
|
|
223
|
-
} catch ($p) {
|
|
224
|
-
var tmp_1;
|
|
225
|
-
if ($p instanceof Error) {
|
|
226
|
-
var _unused_var__etf5q3 = $p;
|
|
227
|
-
tmp_1 = null;
|
|
228
|
-
} else {
|
|
229
|
-
throw $p;
|
|
230
|
-
}
|
|
231
|
-
tmp_0 = tmp_1;
|
|
232
|
-
}
|
|
233
|
-
var tmp$ret$0 = tmp_0;
|
|
234
|
-
var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
|
|
235
|
-
var tokenVersionsAttributeKey = new AttributeKey(name, tmp$ret$1);
|
|
236
|
-
$this$createClientPlugin.v4x(Auth$lambda$slambda_0(providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
237
|
-
var tmp_2 = Send_instance;
|
|
238
|
-
$this$createClientPlugin.y4i(tmp_2, Auth$lambda$slambda_2($this$createClientPlugin, providers, tokenVersions, tokenVersionsAttributeKey, null));
|
|
239
|
-
return Unit_instance;
|
|
240
|
-
}
|
|
241
|
-
function Auth$lambda$refreshTokenIfNeeded$lambda() {
|
|
242
|
-
_init_properties_Auth_kt__9ob1dk();
|
|
243
|
-
return new AtomicCounter();
|
|
244
|
-
}
|
|
245
|
-
function Auth$lambda$refreshTokenIfNeeded$lambda_0() {
|
|
246
|
-
_init_properties_Auth_kt__9ob1dk();
|
|
247
|
-
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
248
|
-
return LinkedHashMap_init_$Create$();
|
|
249
|
-
}
|
|
250
|
-
function invoke$findProvider(call, candidateProviders) {
|
|
251
|
-
var headerValues = call.f49().v3j().n36('WWW-Authenticate');
|
|
252
|
-
var tmp;
|
|
253
|
-
if (headerValues == null) {
|
|
254
|
-
tmp = null;
|
|
255
|
-
} else {
|
|
256
|
-
// Inline function 'kotlin.collections.map' call
|
|
257
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
258
|
-
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(headerValues, 10));
|
|
259
|
-
var _iterator__ex2g4s = headerValues.t();
|
|
260
|
-
while (_iterator__ex2g4s.u()) {
|
|
261
|
-
var item = _iterator__ex2g4s.v();
|
|
262
|
-
var tmp$ret$0 = parseAuthorizationHeaders(item);
|
|
263
|
-
destination.e1(tmp$ret$0);
|
|
264
|
-
}
|
|
265
|
-
tmp = destination;
|
|
266
|
-
}
|
|
267
|
-
var tmp1_safe_receiver = tmp;
|
|
268
|
-
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : flatten(tmp1_safe_receiver);
|
|
269
|
-
var authHeaders = tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;
|
|
270
|
-
var tmp_0;
|
|
271
|
-
if (candidateProviders.g1() === 1) {
|
|
272
|
-
var provider = first(candidateProviders);
|
|
273
|
-
var tmp$ret$4;
|
|
274
|
-
$l$block: {
|
|
275
|
-
// Inline function 'kotlin.collections.firstOrNull' call
|
|
276
|
-
var _iterator__ex2g4s_0 = authHeaders.t();
|
|
277
|
-
while (_iterator__ex2g4s_0.u()) {
|
|
278
|
-
var element = _iterator__ex2g4s_0.v();
|
|
279
|
-
if (provider.ymz(element)) {
|
|
280
|
-
tmp$ret$4 = element;
|
|
281
|
-
break $l$block;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
tmp$ret$4 = null;
|
|
285
|
-
}
|
|
286
|
-
var header = tmp$ret$4;
|
|
287
|
-
tmp_0 = to(provider, header);
|
|
288
|
-
} else if (authHeaders.r()) {
|
|
289
|
-
// Inline function 'io.ktor.util.logging.trace' call
|
|
290
|
-
var this_0 = get_LOGGER();
|
|
291
|
-
if (get_isTraceEnabled(this_0)) {
|
|
292
|
-
var tmp$ret$5 = 'Unauthorized response ' + call.o4b().y4b().toString() + ' has no or empty "WWW-Authenticate" header. ' + 'Can not add or refresh token';
|
|
293
|
-
this_0.z3b(tmp$ret$5);
|
|
294
|
-
}
|
|
295
|
-
tmp_0 = null;
|
|
296
|
-
} else {
|
|
297
|
-
var tmp$ret$13;
|
|
298
|
-
$l$block_1: {
|
|
299
|
-
// Inline function 'kotlin.collections.firstNotNullOfOrNull' call
|
|
300
|
-
var _iterator__ex2g4s_1 = authHeaders.t();
|
|
301
|
-
while (_iterator__ex2g4s_1.u()) {
|
|
302
|
-
var element_0 = _iterator__ex2g4s_1.v();
|
|
303
|
-
// Inline function 'kotlin.collections.find' call
|
|
304
|
-
var tmp$ret$8;
|
|
305
|
-
$l$block_0: {
|
|
306
|
-
// Inline function 'kotlin.collections.firstOrNull' call
|
|
307
|
-
var _iterator__ex2g4s_2 = candidateProviders.t();
|
|
308
|
-
while (_iterator__ex2g4s_2.u()) {
|
|
309
|
-
var element_1 = _iterator__ex2g4s_2.v();
|
|
310
|
-
if (element_1.ymz(element_0)) {
|
|
311
|
-
tmp$ret$8 = element_1;
|
|
312
|
-
break $l$block_0;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
tmp$ret$8 = null;
|
|
316
|
-
}
|
|
317
|
-
var tmp0_safe_receiver = tmp$ret$8;
|
|
318
|
-
var tmp_1;
|
|
319
|
-
if (tmp0_safe_receiver == null) {
|
|
320
|
-
tmp_1 = null;
|
|
321
|
-
} else {
|
|
322
|
-
// Inline function 'kotlin.let' call
|
|
323
|
-
tmp_1 = to(tmp0_safe_receiver, element_0);
|
|
324
|
-
}
|
|
325
|
-
var result = tmp_1;
|
|
326
|
-
if (!(result == null)) {
|
|
327
|
-
tmp$ret$13 = result;
|
|
328
|
-
break $l$block_1;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
tmp$ret$13 = null;
|
|
332
|
-
}
|
|
333
|
-
tmp_0 = tmp$ret$13;
|
|
334
|
-
}
|
|
335
|
-
return tmp_0;
|
|
336
|
-
}
|
|
337
|
-
function invoke$refreshTokenIfNeeded(tokenVersions, tokenVersionsAttributeKey, call, provider, request, $completion) {
|
|
338
|
-
var tmp = new $invoke$refreshTokenIfNeededCOROUTINE$(tokenVersions, tokenVersionsAttributeKey, call, provider, request, $completion);
|
|
339
|
-
tmp.k9_1 = Unit_instance;
|
|
340
|
-
tmp.l9_1 = null;
|
|
341
|
-
return tmp.q9();
|
|
342
|
-
}
|
|
343
|
-
function invoke$executeWithNewToken(_this__u8e3s4, call, provider, oldRequest, authHeader, $completion) {
|
|
344
|
-
var tmp = new $invoke$executeWithNewTokenCOROUTINE$(_this__u8e3s4, call, provider, oldRequest, authHeader, $completion);
|
|
345
|
-
tmp.k9_1 = Unit_instance;
|
|
346
|
-
tmp.l9_1 = null;
|
|
347
|
-
return tmp.q9();
|
|
348
|
-
}
|
|
349
|
-
function Auth$lambda$slambda$lambda() {
|
|
350
|
-
return new AtomicCounter();
|
|
351
|
-
}
|
|
352
|
-
function Auth$lambda$slambda$lambda_0() {
|
|
353
|
-
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
354
|
-
return LinkedHashMap_init_$Create$();
|
|
355
|
-
}
|
|
356
|
-
function Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
357
|
-
this.kn1_1 = $providers;
|
|
358
|
-
this.ln1_1 = $tokenVersions;
|
|
359
|
-
this.mn1_1 = $tokenVersionsAttributeKey;
|
|
360
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
361
|
-
}
|
|
362
|
-
protoOf(Auth$lambda$slambda).j4y = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
363
|
-
var tmp = this.k4y($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
364
|
-
tmp.k9_1 = Unit_instance;
|
|
365
|
-
tmp.l9_1 = null;
|
|
366
|
-
return tmp.q9();
|
|
367
|
-
};
|
|
368
|
-
protoOf(Auth$lambda$slambda).l4y = function (p1, p2, p3, $completion) {
|
|
369
|
-
var tmp = p1 instanceof OnRequestContext ? p1 : THROW_CCE();
|
|
370
|
-
var tmp_0 = p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE();
|
|
371
|
-
return this.j4y(tmp, tmp_0, !(p3 == null) ? p3 : THROW_CCE(), $completion);
|
|
372
|
-
};
|
|
373
|
-
protoOf(Auth$lambda$slambda).q9 = function () {
|
|
374
|
-
var suspendResult = this.k9_1;
|
|
375
|
-
$sm: do
|
|
376
|
-
try {
|
|
377
|
-
var tmp = this.i9_1;
|
|
378
|
-
switch (tmp) {
|
|
379
|
-
case 0:
|
|
380
|
-
this.j9_1 = 4;
|
|
381
|
-
var tmp0 = this.kn1_1;
|
|
382
|
-
var destination = ArrayList_init_$Create$();
|
|
383
|
-
var _iterator__ex2g4s = tmp0.t();
|
|
384
|
-
while (_iterator__ex2g4s.u()) {
|
|
385
|
-
var element = _iterator__ex2g4s.v();
|
|
386
|
-
if (element.rn1(this.on1_1)) {
|
|
387
|
-
destination.e1(element);
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
this.qn1_1 = destination.t();
|
|
392
|
-
this.i9_1 = 1;
|
|
393
|
-
continue $sm;
|
|
394
|
-
case 1:
|
|
395
|
-
if (!this.qn1_1.u()) {
|
|
396
|
-
this.i9_1 = 3;
|
|
397
|
-
continue $sm;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
var element_0 = this.qn1_1.v();
|
|
401
|
-
var this_0 = get_LOGGER();
|
|
402
|
-
if (get_isTraceEnabled(this_0)) {
|
|
403
|
-
this_0.z3b('Adding auth headers for ' + this.on1_1.f4a_1.toString() + ' from provider ' + toString(element_0));
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
var tokenVersion = this.ln1_1.q3b(element_0, Auth$lambda$slambda$lambda);
|
|
407
|
-
var requestTokenVersions = this.on1_1.k4a_1.o32(this.mn1_1, Auth$lambda$slambda$lambda_0);
|
|
408
|
-
var value = tokenVersion.xmz_1.kotlinx$atomicfu$value;
|
|
409
|
-
requestTokenVersions.c3(element_0, value);
|
|
410
|
-
this.i9_1 = 2;
|
|
411
|
-
suspendResult = element_0.sn1(this.on1_1, VOID, this);
|
|
412
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
413
|
-
return suspendResult;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
continue $sm;
|
|
417
|
-
case 2:
|
|
418
|
-
this.i9_1 = 1;
|
|
419
|
-
continue $sm;
|
|
420
|
-
case 3:
|
|
421
|
-
return Unit_instance;
|
|
422
|
-
case 4:
|
|
423
|
-
throw this.l9_1;
|
|
424
|
-
}
|
|
425
|
-
} catch ($p) {
|
|
426
|
-
var e = $p;
|
|
427
|
-
if (this.j9_1 === 4) {
|
|
428
|
-
throw e;
|
|
429
|
-
} else {
|
|
430
|
-
this.i9_1 = this.j9_1;
|
|
431
|
-
this.l9_1 = e;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
while (true);
|
|
435
|
-
};
|
|
436
|
-
protoOf(Auth$lambda$slambda).k4y = function ($this$onRequest, request, _unused_var__etf5q3, completion) {
|
|
437
|
-
var i = new Auth$lambda$slambda(this.kn1_1, this.ln1_1, this.mn1_1, completion);
|
|
438
|
-
i.nn1_1 = $this$onRequest;
|
|
439
|
-
i.on1_1 = request;
|
|
440
|
-
i.pn1_1 = _unused_var__etf5q3;
|
|
441
|
-
return i;
|
|
442
|
-
};
|
|
443
|
-
function Auth$lambda$slambda_0($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
444
|
-
var i = new Auth$lambda$slambda($providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
445
|
-
var l = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
|
|
446
|
-
return i.j4y($this$onRequest, request, _unused_var__etf5q3, $completion);
|
|
447
|
-
};
|
|
448
|
-
l.$arity = 3;
|
|
449
|
-
return l;
|
|
450
|
-
}
|
|
451
|
-
function Auth$lambda$slambda_1($this_createClientPlugin, $providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
452
|
-
this.bn2_1 = $this_createClientPlugin;
|
|
453
|
-
this.cn2_1 = $providers;
|
|
454
|
-
this.dn2_1 = $tokenVersions;
|
|
455
|
-
this.en2_1 = $tokenVersionsAttributeKey;
|
|
456
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
457
|
-
}
|
|
458
|
-
protoOf(Auth$lambda$slambda_1).x4p = function ($this$on, originalRequest, $completion) {
|
|
459
|
-
var tmp = this.y4p($this$on, originalRequest, $completion);
|
|
460
|
-
tmp.k9_1 = Unit_instance;
|
|
461
|
-
tmp.l9_1 = null;
|
|
462
|
-
return tmp.q9();
|
|
463
|
-
};
|
|
464
|
-
protoOf(Auth$lambda$slambda_1).da = function (p1, p2, $completion) {
|
|
465
|
-
var tmp = p1 instanceof Sender ? p1 : THROW_CCE();
|
|
466
|
-
return this.x4p(tmp, p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE(), $completion);
|
|
467
|
-
};
|
|
468
|
-
protoOf(Auth$lambda$slambda_1).q9 = function () {
|
|
469
|
-
var suspendResult = this.k9_1;
|
|
470
|
-
$sm: do
|
|
471
|
-
try {
|
|
472
|
-
var tmp = this.i9_1;
|
|
473
|
-
switch (tmp) {
|
|
474
|
-
case 0:
|
|
475
|
-
this.j9_1 = 10;
|
|
476
|
-
this.i9_1 = 1;
|
|
477
|
-
suspendResult = this.fn2_1.b4q(this.gn2_1, this);
|
|
478
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
479
|
-
return suspendResult;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
continue $sm;
|
|
483
|
-
case 1:
|
|
484
|
-
this.ln2_1 = suspendResult;
|
|
485
|
-
this.i9_1 = 2;
|
|
486
|
-
suspendResult = this.bn2_1.v4i_1.wmz_1(this.ln2_1.f49(), this);
|
|
487
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
488
|
-
return suspendResult;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
continue $sm;
|
|
492
|
-
case 2:
|
|
493
|
-
if (!suspendResult) {
|
|
494
|
-
return this.ln2_1;
|
|
495
|
-
} else {
|
|
496
|
-
this.i9_1 = 3;
|
|
497
|
-
continue $sm;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
case 3:
|
|
501
|
-
if (this.ln2_1.o4b().p4b().k32(get_AuthCircuitBreaker()))
|
|
502
|
-
return this.ln2_1;
|
|
503
|
-
this.hn2_1 = this.ln2_1;
|
|
504
|
-
this.kn2_1 = HashSet_init_$Create$(this.cn2_1);
|
|
505
|
-
this.i9_1 = 4;
|
|
506
|
-
continue $sm;
|
|
507
|
-
case 4:
|
|
508
|
-
this.i9_1 = 5;
|
|
509
|
-
suspendResult = this.bn2_1.v4i_1.wmz_1(this.hn2_1.f49(), this);
|
|
510
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
511
|
-
return suspendResult;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
continue $sm;
|
|
515
|
-
case 5:
|
|
516
|
-
if (!suspendResult) {
|
|
517
|
-
this.i9_1 = 9;
|
|
518
|
-
continue $sm;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
var this_0 = get_LOGGER();
|
|
522
|
-
if (get_isTraceEnabled(this_0)) {
|
|
523
|
-
this_0.z3b('Unauthorized response for ' + this.hn2_1.o4b().y4b().toString());
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
var tmp0_elvis_lhs = invoke$findProvider(this.hn2_1, this.kn2_1);
|
|
527
|
-
var tmp_0;
|
|
528
|
-
if (tmp0_elvis_lhs == null) {
|
|
529
|
-
this.fn2_1;
|
|
530
|
-
var this_1 = get_LOGGER();
|
|
531
|
-
if (get_isTraceEnabled(this_1)) {
|
|
532
|
-
this_1.z3b('Can not find auth provider for ' + this.hn2_1.o4b().y4b().toString());
|
|
533
|
-
}
|
|
534
|
-
return this.hn2_1;
|
|
535
|
-
} else {
|
|
536
|
-
tmp_0 = tmp0_elvis_lhs;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
var _destruct__k2r9zo = tmp_0;
|
|
540
|
-
this.jn2_1 = _destruct__k2r9zo.xg();
|
|
541
|
-
this.in2_1 = _destruct__k2r9zo.yg();
|
|
542
|
-
var this_2 = get_LOGGER();
|
|
543
|
-
if (get_isTraceEnabled(this_2)) {
|
|
544
|
-
this_2.z3b('Using provider ' + toString(this.jn2_1) + ' for ' + this.hn2_1.o4b().y4b().toString());
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
this.kn2_1.j3(this.jn2_1);
|
|
548
|
-
this.i9_1 = 6;
|
|
549
|
-
suspendResult = invoke$refreshTokenIfNeeded(this.dn2_1, this.en2_1, this.hn2_1, this.jn2_1, this.gn2_1, this);
|
|
550
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
551
|
-
return suspendResult;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
continue $sm;
|
|
555
|
-
case 6:
|
|
556
|
-
if (!suspendResult) {
|
|
557
|
-
return this.hn2_1;
|
|
558
|
-
} else {
|
|
559
|
-
this.i9_1 = 7;
|
|
560
|
-
continue $sm;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
case 7:
|
|
564
|
-
this.i9_1 = 8;
|
|
565
|
-
suspendResult = invoke$executeWithNewToken(this.fn2_1, this.hn2_1, this.jn2_1, this.gn2_1, this.in2_1, this);
|
|
566
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
567
|
-
return suspendResult;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
continue $sm;
|
|
571
|
-
case 8:
|
|
572
|
-
this.hn2_1 = suspendResult;
|
|
573
|
-
this.i9_1 = 4;
|
|
574
|
-
continue $sm;
|
|
575
|
-
case 9:
|
|
576
|
-
return this.hn2_1;
|
|
577
|
-
case 10:
|
|
578
|
-
throw this.l9_1;
|
|
579
|
-
}
|
|
580
|
-
} catch ($p) {
|
|
581
|
-
var e = $p;
|
|
582
|
-
if (this.j9_1 === 10) {
|
|
583
|
-
throw e;
|
|
584
|
-
} else {
|
|
585
|
-
this.i9_1 = this.j9_1;
|
|
586
|
-
this.l9_1 = e;
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
while (true);
|
|
590
|
-
};
|
|
591
|
-
protoOf(Auth$lambda$slambda_1).y4p = function ($this$on, originalRequest, completion) {
|
|
592
|
-
var i = new Auth$lambda$slambda_1(this.bn2_1, this.cn2_1, this.dn2_1, this.en2_1, completion);
|
|
593
|
-
i.fn2_1 = $this$on;
|
|
594
|
-
i.gn2_1 = originalRequest;
|
|
595
|
-
return i;
|
|
596
|
-
};
|
|
597
|
-
function Auth$lambda$slambda_2($this_createClientPlugin, $providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation) {
|
|
598
|
-
var i = new Auth$lambda$slambda_1($this_createClientPlugin, $providers, $tokenVersions, $tokenVersionsAttributeKey, resultContinuation);
|
|
599
|
-
var l = function ($this$on, originalRequest, $completion) {
|
|
600
|
-
return i.x4p($this$on, originalRequest, $completion);
|
|
601
|
-
};
|
|
602
|
-
l.$arity = 2;
|
|
603
|
-
return l;
|
|
604
|
-
}
|
|
605
|
-
function $invoke$refreshTokenIfNeededCOROUTINE$(tokenVersions, tokenVersionsAttributeKey, call, provider, request, resultContinuation) {
|
|
606
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
607
|
-
this.hn0_1 = tokenVersions;
|
|
608
|
-
this.in0_1 = tokenVersionsAttributeKey;
|
|
609
|
-
this.jn0_1 = call;
|
|
610
|
-
this.kn0_1 = provider;
|
|
611
|
-
this.ln0_1 = request;
|
|
612
|
-
}
|
|
613
|
-
protoOf($invoke$refreshTokenIfNeededCOROUTINE$).q9 = function () {
|
|
614
|
-
var suspendResult = this.k9_1;
|
|
615
|
-
$sm: do
|
|
616
|
-
try {
|
|
617
|
-
var tmp = this.i9_1;
|
|
618
|
-
switch (tmp) {
|
|
619
|
-
case 0:
|
|
620
|
-
this.j9_1 = 4;
|
|
621
|
-
var tmp_0 = this;
|
|
622
|
-
tmp_0.mn0_1 = this.hn0_1.q3b(this.kn0_1, Auth$lambda$refreshTokenIfNeeded$lambda);
|
|
623
|
-
var tmp_1 = this;
|
|
624
|
-
tmp_1.nn0_1 = this.ln0_1.k4a_1.o32(this.in0_1, Auth$lambda$refreshTokenIfNeeded$lambda_0);
|
|
625
|
-
var requestTokenVersion = this.nn0_1.z2(this.kn0_1);
|
|
626
|
-
if (!(requestTokenVersion == null) && requestTokenVersion >= this.mn0_1.xmz_1.kotlinx$atomicfu$value) {
|
|
627
|
-
var this_0 = get_LOGGER();
|
|
628
|
-
if (get_isTraceEnabled(this_0)) {
|
|
629
|
-
this_0.z3b('Refreshing token for ' + this.jn0_1.o4b().y4b().toString());
|
|
630
|
-
}
|
|
631
|
-
this.i9_1 = 1;
|
|
632
|
-
suspendResult = this.kn0_1.mn2(this.jn0_1.f49(), this);
|
|
633
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
634
|
-
return suspendResult;
|
|
635
|
-
}
|
|
636
|
-
continue $sm;
|
|
637
|
-
} else {
|
|
638
|
-
this.i9_1 = 3;
|
|
639
|
-
continue $sm;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
case 1:
|
|
643
|
-
if (!suspendResult) {
|
|
644
|
-
var this_1 = get_LOGGER();
|
|
645
|
-
if (get_isTraceEnabled(this_1)) {
|
|
646
|
-
this_1.z3b('Refreshing token failed for ' + this.jn0_1.o4b().y4b().toString());
|
|
647
|
-
}
|
|
648
|
-
return false;
|
|
649
|
-
} else {
|
|
650
|
-
var tmp0 = this.nn0_1;
|
|
651
|
-
var tmp2 = this.kn0_1;
|
|
652
|
-
var value = this.mn0_1.xmz_1.atomicfu$incrementAndGet();
|
|
653
|
-
tmp0.c3(tmp2, value);
|
|
654
|
-
this.i9_1 = 2;
|
|
655
|
-
continue $sm;
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
case 2:
|
|
659
|
-
this.i9_1 = 3;
|
|
660
|
-
continue $sm;
|
|
661
|
-
case 3:
|
|
662
|
-
return true;
|
|
663
|
-
case 4:
|
|
664
|
-
throw this.l9_1;
|
|
665
|
-
}
|
|
666
|
-
} catch ($p) {
|
|
667
|
-
var e = $p;
|
|
668
|
-
if (this.j9_1 === 4) {
|
|
669
|
-
throw e;
|
|
670
|
-
} else {
|
|
671
|
-
this.i9_1 = this.j9_1;
|
|
672
|
-
this.l9_1 = e;
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
while (true);
|
|
676
|
-
};
|
|
677
|
-
function $invoke$executeWithNewTokenCOROUTINE$(_this__u8e3s4, call, provider, oldRequest, authHeader, resultContinuation) {
|
|
678
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
679
|
-
this.wn0_1 = _this__u8e3s4;
|
|
680
|
-
this.xn0_1 = call;
|
|
681
|
-
this.yn0_1 = provider;
|
|
682
|
-
this.zn0_1 = oldRequest;
|
|
683
|
-
this.an1_1 = authHeader;
|
|
684
|
-
}
|
|
685
|
-
protoOf($invoke$executeWithNewTokenCOROUTINE$).q9 = function () {
|
|
686
|
-
var suspendResult = this.k9_1;
|
|
687
|
-
$sm: do
|
|
688
|
-
try {
|
|
689
|
-
var tmp = this.i9_1;
|
|
690
|
-
switch (tmp) {
|
|
691
|
-
case 0:
|
|
692
|
-
this.j9_1 = 3;
|
|
693
|
-
this.bn1_1 = new HttpRequestBuilder();
|
|
694
|
-
this.bn1_1.k4g(this.zn0_1);
|
|
695
|
-
this.i9_1 = 1;
|
|
696
|
-
suspendResult = this.yn0_1.nn2(this.bn1_1, this.an1_1, this);
|
|
697
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
698
|
-
return suspendResult;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
continue $sm;
|
|
702
|
-
case 1:
|
|
703
|
-
this.bn1_1.k4a_1.l32(get_AuthCircuitBreaker(), Unit_instance);
|
|
704
|
-
var this_0 = get_LOGGER();
|
|
705
|
-
if (get_isTraceEnabled(this_0)) {
|
|
706
|
-
this_0.z3b('Sending new request to ' + this.xn0_1.o4b().y4b().toString());
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
this.i9_1 = 2;
|
|
710
|
-
suspendResult = this.wn0_1.b4q(this.bn1_1, this);
|
|
711
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
712
|
-
return suspendResult;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
continue $sm;
|
|
716
|
-
case 2:
|
|
717
|
-
return suspendResult;
|
|
718
|
-
case 3:
|
|
719
|
-
throw this.l9_1;
|
|
720
|
-
}
|
|
721
|
-
} catch ($p) {
|
|
722
|
-
var e = $p;
|
|
723
|
-
if (this.j9_1 === 3) {
|
|
724
|
-
throw e;
|
|
725
|
-
} else {
|
|
726
|
-
this.i9_1 = this.j9_1;
|
|
727
|
-
this.l9_1 = e;
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
while (true);
|
|
731
|
-
};
|
|
732
|
-
var properties_initialized_Auth_kt_7p5u22;
|
|
733
|
-
function _init_properties_Auth_kt__9ob1dk() {
|
|
734
|
-
if (!properties_initialized_Auth_kt_7p5u22) {
|
|
735
|
-
properties_initialized_Auth_kt_7p5u22 = true;
|
|
736
|
-
LOGGER = KtorSimpleLogger('io.ktor.client.plugins.auth.Auth');
|
|
737
|
-
// Inline function 'io.ktor.util.AttributeKey' call
|
|
738
|
-
var name = 'auth-request';
|
|
739
|
-
// Inline function 'io.ktor.util.reflect.typeInfo' call
|
|
740
|
-
var tmp = getKClass(Unit);
|
|
741
|
-
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
742
|
-
var tmp_0;
|
|
743
|
-
try {
|
|
744
|
-
tmp_0 = createKType(getKClass(Unit), arrayOf([]), false);
|
|
745
|
-
} catch ($p) {
|
|
746
|
-
var tmp_1;
|
|
747
|
-
if ($p instanceof Error) {
|
|
748
|
-
var _unused_var__etf5q3 = $p;
|
|
749
|
-
tmp_1 = null;
|
|
750
|
-
} else {
|
|
751
|
-
throw $p;
|
|
752
|
-
}
|
|
753
|
-
tmp_0 = tmp_1;
|
|
754
|
-
}
|
|
755
|
-
var tmp$ret$0 = tmp_0;
|
|
756
|
-
var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
|
|
757
|
-
AuthCircuitBreaker = new AttributeKey(name, tmp$ret$1);
|
|
758
|
-
var tmp_2 = AuthConfig$_init_$ref_ms3pb9();
|
|
759
|
-
Auth = createClientPlugin('Auth', tmp_2, Auth$lambda);
|
|
760
|
-
// Inline function 'io.ktor.util.AttributeKey' call
|
|
761
|
-
var name_0 = 'AuthProviders';
|
|
762
|
-
// Inline function 'io.ktor.util.reflect.typeInfo' call
|
|
763
|
-
var tmp_3 = getKClass(KtList);
|
|
764
|
-
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
765
|
-
var tmp_4;
|
|
766
|
-
try {
|
|
767
|
-
tmp_4 = createKType(getKClass(KtList), arrayOf([createInvariantKTypeProjection(createKType(getKClass(AuthProvider), arrayOf([]), false))]), false);
|
|
768
|
-
} catch ($p) {
|
|
769
|
-
var tmp_5;
|
|
770
|
-
if ($p instanceof Error) {
|
|
771
|
-
var _unused_var__etf5q3_0 = $p;
|
|
772
|
-
tmp_5 = null;
|
|
773
|
-
} else {
|
|
774
|
-
throw $p;
|
|
775
|
-
}
|
|
776
|
-
tmp_4 = tmp_5;
|
|
777
|
-
}
|
|
778
|
-
var tmp$ret$0_0 = tmp_4;
|
|
779
|
-
var tmp$ret$1_0 = new TypeInfo(tmp_3, tmp$ret$0_0);
|
|
780
|
-
AuthProvidersKey = new AttributeKey(name_0, tmp$ret$1_0);
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
function AuthProvider() {
|
|
784
|
-
}
|
|
785
|
-
function Companion() {
|
|
786
|
-
}
|
|
787
|
-
var Companion_instance;
|
|
788
|
-
function Companion_getInstance_0() {
|
|
789
|
-
return Companion_instance;
|
|
790
|
-
}
|
|
791
|
-
function SetTokenContext() {
|
|
792
|
-
}
|
|
793
|
-
protoOf(SetTokenContext).m1 = function () {
|
|
794
|
-
return Companion_instance;
|
|
795
|
-
};
|
|
796
|
-
function AuthTokenHolder$setToken$slambda(this$0, $prevValue, $lockedByLoad, $block, resultContinuation) {
|
|
797
|
-
this.xn2_1 = this$0;
|
|
798
|
-
this.yn2_1 = $prevValue;
|
|
799
|
-
this.zn2_1 = $lockedByLoad;
|
|
800
|
-
this.an3_1 = $block;
|
|
801
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
802
|
-
}
|
|
803
|
-
protoOf(AuthTokenHolder$setToken$slambda).fn3 = function ($this$withContext, $completion) {
|
|
804
|
-
var tmp = this.e30($this$withContext, $completion);
|
|
805
|
-
tmp.k9_1 = Unit_instance;
|
|
806
|
-
tmp.l9_1 = null;
|
|
807
|
-
return tmp.q9();
|
|
808
|
-
};
|
|
809
|
-
protoOf(AuthTokenHolder$setToken$slambda).ca = function (p1, $completion) {
|
|
810
|
-
return this.fn3((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
811
|
-
};
|
|
812
|
-
protoOf(AuthTokenHolder$setToken$slambda).q9 = function () {
|
|
813
|
-
var suspendResult = this.k9_1;
|
|
814
|
-
$sm: do
|
|
815
|
-
try {
|
|
816
|
-
var tmp = this.i9_1;
|
|
817
|
-
switch (tmp) {
|
|
818
|
-
case 0:
|
|
819
|
-
this.j9_1 = 7;
|
|
820
|
-
this.dn3_1 = this.xn2_1.kn3_1;
|
|
821
|
-
this.cn3_1 = null;
|
|
822
|
-
this.i9_1 = 1;
|
|
823
|
-
suspendResult = this.dn3_1.m2h(this.cn3_1, this);
|
|
824
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
825
|
-
return suspendResult;
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
continue $sm;
|
|
829
|
-
case 1:
|
|
830
|
-
this.en3_1 = Unit_instance;
|
|
831
|
-
this.i9_1 = 2;
|
|
832
|
-
continue $sm;
|
|
833
|
-
case 2:
|
|
834
|
-
this.j9_1 = 6;
|
|
835
|
-
if (equals(this.yn2_1, this.xn2_1.in3_1) || this.zn2_1) {
|
|
836
|
-
this.i9_1 = 3;
|
|
837
|
-
suspendResult = this.an3_1(this);
|
|
838
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
839
|
-
return suspendResult;
|
|
840
|
-
}
|
|
841
|
-
continue $sm;
|
|
842
|
-
} else {
|
|
843
|
-
this.i9_1 = 4;
|
|
844
|
-
continue $sm;
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
case 3:
|
|
848
|
-
var ARGUMENT = suspendResult;
|
|
849
|
-
this.xn2_1.in3_1 = ARGUMENT;
|
|
850
|
-
this.i9_1 = 4;
|
|
851
|
-
continue $sm;
|
|
852
|
-
case 4:
|
|
853
|
-
this.en3_1 = this.xn2_1.in3_1;
|
|
854
|
-
this.j9_1 = 7;
|
|
855
|
-
this.i9_1 = 5;
|
|
856
|
-
continue $sm;
|
|
857
|
-
case 5:
|
|
858
|
-
var tmp_0 = this.en3_1;
|
|
859
|
-
this.j9_1 = 7;
|
|
860
|
-
this.dn3_1.n2h(this.cn3_1);
|
|
861
|
-
return tmp_0;
|
|
862
|
-
case 6:
|
|
863
|
-
this.j9_1 = 7;
|
|
864
|
-
var t = this.l9_1;
|
|
865
|
-
this.dn3_1.n2h(this.cn3_1);
|
|
866
|
-
throw t;
|
|
867
|
-
case 7:
|
|
868
|
-
throw this.l9_1;
|
|
869
|
-
}
|
|
870
|
-
} catch ($p) {
|
|
871
|
-
var e = $p;
|
|
872
|
-
if (this.j9_1 === 7) {
|
|
873
|
-
throw e;
|
|
874
|
-
} else {
|
|
875
|
-
this.i9_1 = this.j9_1;
|
|
876
|
-
this.l9_1 = e;
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
while (true);
|
|
880
|
-
};
|
|
881
|
-
protoOf(AuthTokenHolder$setToken$slambda).e30 = function ($this$withContext, completion) {
|
|
882
|
-
var i = new AuthTokenHolder$setToken$slambda(this.xn2_1, this.yn2_1, this.zn2_1, this.an3_1, completion);
|
|
883
|
-
i.bn3_1 = $this$withContext;
|
|
884
|
-
return i;
|
|
885
|
-
};
|
|
886
|
-
function AuthTokenHolder$setToken$slambda_0(this$0, $prevValue, $lockedByLoad, $block, resultContinuation) {
|
|
887
|
-
var i = new AuthTokenHolder$setToken$slambda(this$0, $prevValue, $lockedByLoad, $block, resultContinuation);
|
|
888
|
-
var l = function ($this$withContext, $completion) {
|
|
889
|
-
return i.fn3($this$withContext, $completion);
|
|
890
|
-
};
|
|
891
|
-
l.$arity = 1;
|
|
892
|
-
return l;
|
|
893
|
-
}
|
|
894
|
-
function AuthTokenHolder$clearToken$slambda(this$0, resultContinuation) {
|
|
895
|
-
this.un3_1 = this$0;
|
|
896
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
897
|
-
}
|
|
898
|
-
protoOf(AuthTokenHolder$clearToken$slambda).d30 = function ($this$launch, $completion) {
|
|
899
|
-
var tmp = this.e30($this$launch, $completion);
|
|
900
|
-
tmp.k9_1 = Unit_instance;
|
|
901
|
-
tmp.l9_1 = null;
|
|
902
|
-
return tmp.q9();
|
|
903
|
-
};
|
|
904
|
-
protoOf(AuthTokenHolder$clearToken$slambda).ca = function (p1, $completion) {
|
|
905
|
-
return this.d30((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
906
|
-
};
|
|
907
|
-
protoOf(AuthTokenHolder$clearToken$slambda).q9 = function () {
|
|
908
|
-
var suspendResult = this.k9_1;
|
|
909
|
-
$sm: do
|
|
910
|
-
try {
|
|
911
|
-
var tmp = this.i9_1;
|
|
912
|
-
switch (tmp) {
|
|
913
|
-
case 0:
|
|
914
|
-
this.j9_1 = 2;
|
|
915
|
-
this.xn3_1 = this.un3_1.kn3_1;
|
|
916
|
-
this.wn3_1 = null;
|
|
917
|
-
this.i9_1 = 1;
|
|
918
|
-
suspendResult = this.xn3_1.m2h(this.wn3_1, this);
|
|
919
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
920
|
-
return suspendResult;
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
continue $sm;
|
|
924
|
-
case 1:
|
|
925
|
-
l$ret$1: do {
|
|
926
|
-
var tmp_0;
|
|
927
|
-
try {
|
|
928
|
-
this.un3_1.in3_1 = null;
|
|
929
|
-
break l$ret$1;
|
|
930
|
-
} catch ($p) {
|
|
931
|
-
var tmp_1;
|
|
932
|
-
var t = $p;
|
|
933
|
-
this.xn3_1.n2h(this.wn3_1);
|
|
934
|
-
throw t;
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
while (false);
|
|
938
|
-
this.xn3_1.n2h(this.wn3_1);
|
|
939
|
-
return Unit_instance;
|
|
940
|
-
case 2:
|
|
941
|
-
throw this.l9_1;
|
|
942
|
-
}
|
|
943
|
-
} catch ($p) {
|
|
944
|
-
var e = $p;
|
|
945
|
-
if (this.j9_1 === 2) {
|
|
946
|
-
throw e;
|
|
947
|
-
} else {
|
|
948
|
-
this.i9_1 = this.j9_1;
|
|
949
|
-
this.l9_1 = e;
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
while (true);
|
|
953
|
-
};
|
|
954
|
-
protoOf(AuthTokenHolder$clearToken$slambda).e30 = function ($this$launch, completion) {
|
|
955
|
-
var i = new AuthTokenHolder$clearToken$slambda(this.un3_1, completion);
|
|
956
|
-
i.vn3_1 = $this$launch;
|
|
957
|
-
return i;
|
|
958
|
-
};
|
|
959
|
-
function AuthTokenHolder$clearToken$slambda_0(this$0, resultContinuation) {
|
|
960
|
-
var i = new AuthTokenHolder$clearToken$slambda(this$0, resultContinuation);
|
|
961
|
-
var l = function ($this$launch, $completion) {
|
|
962
|
-
return i.d30($this$launch, $completion);
|
|
963
|
-
};
|
|
964
|
-
l.$arity = 1;
|
|
965
|
-
return l;
|
|
966
|
-
}
|
|
967
|
-
function $loadTokenCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
968
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
969
|
-
this.gn4_1 = _this__u8e3s4;
|
|
970
|
-
}
|
|
971
|
-
protoOf($loadTokenCOROUTINE$).q9 = function () {
|
|
972
|
-
var suspendResult = this.k9_1;
|
|
973
|
-
$sm: do
|
|
974
|
-
try {
|
|
975
|
-
var tmp = this.i9_1;
|
|
976
|
-
switch (tmp) {
|
|
977
|
-
case 0:
|
|
978
|
-
this.j9_1 = 14;
|
|
979
|
-
if (!this.gn4_1.hn3_1) {
|
|
980
|
-
this.i9_1 = 13;
|
|
981
|
-
suspendResult = this.gn4_1.gn3_1(this);
|
|
982
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
983
|
-
return suspendResult;
|
|
984
|
-
}
|
|
985
|
-
continue $sm;
|
|
986
|
-
} else {
|
|
987
|
-
this.i9_1 = 1;
|
|
988
|
-
continue $sm;
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
case 1:
|
|
992
|
-
if (!(this.gn4_1.in3_1 == null))
|
|
993
|
-
return this.gn4_1.in3_1;
|
|
994
|
-
this.ln4_1 = this.gn4_1.in3_1;
|
|
995
|
-
if (!(this.o9().v9(Companion_instance) == null)) {
|
|
996
|
-
this.i9_1 = 11;
|
|
997
|
-
suspendResult = this.gn4_1.gn3_1(this);
|
|
998
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
999
|
-
return suspendResult;
|
|
1000
|
-
}
|
|
1001
|
-
continue $sm;
|
|
1002
|
-
} else {
|
|
1003
|
-
this.jn4_1 = this.gn4_1.kn3_1;
|
|
1004
|
-
this.in4_1 = null;
|
|
1005
|
-
this.i9_1 = 2;
|
|
1006
|
-
suspendResult = this.jn4_1.m2h(this.in4_1, this);
|
|
1007
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1008
|
-
return suspendResult;
|
|
1009
|
-
}
|
|
1010
|
-
continue $sm;
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
case 2:
|
|
1014
|
-
this.kn4_1 = Unit_instance;
|
|
1015
|
-
this.i9_1 = 3;
|
|
1016
|
-
continue $sm;
|
|
1017
|
-
case 3:
|
|
1018
|
-
this.j9_1 = 10;
|
|
1019
|
-
this.gn4_1.jn3_1 = true;
|
|
1020
|
-
this.i9_1 = 4;
|
|
1021
|
-
continue $sm;
|
|
1022
|
-
case 4:
|
|
1023
|
-
this.j9_1 = 9;
|
|
1024
|
-
if (equals(this.ln4_1, this.gn4_1.in3_1)) {
|
|
1025
|
-
this.i9_1 = 5;
|
|
1026
|
-
suspendResult = this.gn4_1.gn3_1(this);
|
|
1027
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1028
|
-
return suspendResult;
|
|
1029
|
-
}
|
|
1030
|
-
continue $sm;
|
|
1031
|
-
} else {
|
|
1032
|
-
this.i9_1 = 6;
|
|
1033
|
-
continue $sm;
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
case 5:
|
|
1037
|
-
var ARGUMENT = suspendResult;
|
|
1038
|
-
this.gn4_1.in3_1 = ARGUMENT;
|
|
1039
|
-
this.i9_1 = 6;
|
|
1040
|
-
continue $sm;
|
|
1041
|
-
case 6:
|
|
1042
|
-
this.i9_1 = 7;
|
|
1043
|
-
continue $sm;
|
|
1044
|
-
case 7:
|
|
1045
|
-
this.j9_1 = 10;
|
|
1046
|
-
this.gn4_1.jn3_1 = false;
|
|
1047
|
-
this.kn4_1 = this.gn4_1.in3_1;
|
|
1048
|
-
this.j9_1 = 14;
|
|
1049
|
-
this.i9_1 = 8;
|
|
1050
|
-
continue $sm;
|
|
1051
|
-
case 8:
|
|
1052
|
-
var tmp_0 = this.kn4_1;
|
|
1053
|
-
this.j9_1 = 14;
|
|
1054
|
-
this.jn4_1.n2h(this.in4_1);
|
|
1055
|
-
this.hn4_1 = tmp_0;
|
|
1056
|
-
this.i9_1 = 12;
|
|
1057
|
-
continue $sm;
|
|
1058
|
-
case 9:
|
|
1059
|
-
this.j9_1 = 10;
|
|
1060
|
-
var t = this.l9_1;
|
|
1061
|
-
this.gn4_1.jn3_1 = false;
|
|
1062
|
-
throw t;
|
|
1063
|
-
case 10:
|
|
1064
|
-
this.j9_1 = 14;
|
|
1065
|
-
var t_0 = this.l9_1;
|
|
1066
|
-
this.jn4_1.n2h(this.in4_1);
|
|
1067
|
-
throw t_0;
|
|
1068
|
-
case 11:
|
|
1069
|
-
var ARGUMENT_0 = suspendResult;
|
|
1070
|
-
this.gn4_1.in3_1 = ARGUMENT_0;
|
|
1071
|
-
this.hn4_1 = this.gn4_1.in3_1;
|
|
1072
|
-
this.i9_1 = 12;
|
|
1073
|
-
continue $sm;
|
|
1074
|
-
case 12:
|
|
1075
|
-
return this.hn4_1;
|
|
1076
|
-
case 13:
|
|
1077
|
-
return suspendResult;
|
|
1078
|
-
case 14:
|
|
1079
|
-
throw this.l9_1;
|
|
1080
|
-
}
|
|
1081
|
-
} catch ($p) {
|
|
1082
|
-
var e = $p;
|
|
1083
|
-
if (this.j9_1 === 14) {
|
|
1084
|
-
throw e;
|
|
1085
|
-
} else {
|
|
1086
|
-
this.i9_1 = this.j9_1;
|
|
1087
|
-
this.l9_1 = e;
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
while (true);
|
|
1091
|
-
};
|
|
1092
|
-
function AuthTokenHolder(loadTokens, cacheTokens) {
|
|
1093
|
-
cacheTokens = cacheTokens === VOID ? true : cacheTokens;
|
|
1094
|
-
this.gn3_1 = loadTokens;
|
|
1095
|
-
this.hn3_1 = cacheTokens;
|
|
1096
|
-
this.in3_1 = null;
|
|
1097
|
-
this.jn3_1 = false;
|
|
1098
|
-
this.kn3_1 = Mutex();
|
|
1099
|
-
this.ln3_1 = new SetTokenContext();
|
|
1100
|
-
}
|
|
1101
|
-
protoOf(AuthTokenHolder).mn4 = function ($completion) {
|
|
1102
|
-
var tmp = new $loadTokenCOROUTINE$(this, $completion);
|
|
1103
|
-
tmp.k9_1 = Unit_instance;
|
|
1104
|
-
tmp.l9_1 = null;
|
|
1105
|
-
return tmp.q9();
|
|
1106
|
-
};
|
|
1107
|
-
protoOf(AuthTokenHolder).nn4 = function (nonCancellable, block, $completion) {
|
|
1108
|
-
var prevValue = this.in3_1;
|
|
1109
|
-
var lockedByLoad = this.jn3_1;
|
|
1110
|
-
var tmp;
|
|
1111
|
-
if (nonCancellable) {
|
|
1112
|
-
// Inline function 'kotlin.js.getCoroutineContext' call
|
|
1113
|
-
tmp = $completion.o9().qj(NonCancellable_getInstance()).qj(this.ln3_1);
|
|
1114
|
-
} else {
|
|
1115
|
-
// Inline function 'kotlin.js.getCoroutineContext' call
|
|
1116
|
-
tmp = $completion.o9().qj(this.ln3_1);
|
|
1117
|
-
}
|
|
1118
|
-
var context = tmp;
|
|
1119
|
-
return withContext(context, AuthTokenHolder$setToken$slambda_0(this, prevValue, lockedByLoad, block, null), $completion);
|
|
1120
|
-
};
|
|
1121
|
-
protoOf(AuthTokenHolder).on4 = function (coroutineScope) {
|
|
1122
|
-
if (this.kn3_1.l2h()) {
|
|
1123
|
-
this.in3_1 = null;
|
|
1124
|
-
this.kn3_1.o2h();
|
|
1125
|
-
} else {
|
|
1126
|
-
launch(coroutineScope, VOID, VOID, AuthTokenHolder$clearToken$slambda_0(this, null));
|
|
1127
|
-
}
|
|
1128
|
-
};
|
|
1129
|
-
protoOf(AuthTokenHolder).pn4 = function (coroutineScope, $super) {
|
|
1130
|
-
coroutineScope = coroutineScope === VOID ? GlobalScope_instance : coroutineScope;
|
|
1131
|
-
var tmp;
|
|
1132
|
-
if ($super === VOID) {
|
|
1133
|
-
this.on4(coroutineScope);
|
|
1134
|
-
tmp = Unit_instance;
|
|
1135
|
-
} else {
|
|
1136
|
-
tmp = $super.on4.call(this, coroutineScope);
|
|
1137
|
-
}
|
|
1138
|
-
return tmp;
|
|
1139
|
-
};
|
|
1140
|
-
function bearer(_this__u8e3s4, block) {
|
|
1141
|
-
// Inline function 'kotlin.apply' call
|
|
1142
|
-
var this_0 = new BearerAuthConfig();
|
|
1143
|
-
block(this_0);
|
|
1144
|
-
// Inline function 'kotlin.with' call
|
|
1145
|
-
_this__u8e3s4.vmz_1.e1(new BearerAuthProvider(this_0.qn4_1, this_0.rn4_1, this_0.sn4_1, this_0.tn4_1, this_0.un4_1, this_0.vn4_1));
|
|
1146
|
-
}
|
|
1147
|
-
function BearerAuthConfig$refreshTokens$slambda(resultContinuation) {
|
|
1148
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
1149
|
-
}
|
|
1150
|
-
protoOf(BearerAuthConfig$refreshTokens$slambda).fn5 = function (_this__u8e3s4, $completion) {
|
|
1151
|
-
var tmp = this.gn5(_this__u8e3s4, $completion);
|
|
1152
|
-
tmp.k9_1 = Unit_instance;
|
|
1153
|
-
tmp.l9_1 = null;
|
|
1154
|
-
return tmp.q9();
|
|
1155
|
-
};
|
|
1156
|
-
protoOf(BearerAuthConfig$refreshTokens$slambda).ca = function (p1, $completion) {
|
|
1157
|
-
return this.fn5(p1 instanceof RefreshTokensParams ? p1 : THROW_CCE(), $completion);
|
|
1158
|
-
};
|
|
1159
|
-
protoOf(BearerAuthConfig$refreshTokens$slambda).q9 = function () {
|
|
1160
|
-
var suspendResult = this.k9_1;
|
|
1161
|
-
$sm: do
|
|
1162
|
-
try {
|
|
1163
|
-
var tmp = this.i9_1;
|
|
1164
|
-
if (tmp === 0) {
|
|
1165
|
-
this.j9_1 = 1;
|
|
1166
|
-
return null;
|
|
1167
|
-
} else if (tmp === 1) {
|
|
1168
|
-
throw this.l9_1;
|
|
1169
|
-
}
|
|
1170
|
-
} catch ($p) {
|
|
1171
|
-
var e = $p;
|
|
1172
|
-
throw e;
|
|
1173
|
-
}
|
|
1174
|
-
while (true);
|
|
1175
|
-
};
|
|
1176
|
-
protoOf(BearerAuthConfig$refreshTokens$slambda).gn5 = function (_this__u8e3s4, completion) {
|
|
1177
|
-
var i = new BearerAuthConfig$refreshTokens$slambda(completion);
|
|
1178
|
-
i.en5_1 = _this__u8e3s4;
|
|
1179
|
-
return i;
|
|
1180
|
-
};
|
|
1181
|
-
function BearerAuthConfig$refreshTokens$slambda_0(resultContinuation) {
|
|
1182
|
-
var i = new BearerAuthConfig$refreshTokens$slambda(resultContinuation);
|
|
1183
|
-
var l = function (_this__u8e3s4, $completion) {
|
|
1184
|
-
return i.fn5(_this__u8e3s4, $completion);
|
|
1185
|
-
};
|
|
1186
|
-
l.$arity = 1;
|
|
1187
|
-
return l;
|
|
1188
|
-
}
|
|
1189
|
-
function BearerAuthConfig$loadTokens$slambda(resultContinuation) {
|
|
1190
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
1191
|
-
}
|
|
1192
|
-
protoOf(BearerAuthConfig$loadTokens$slambda).pn5 = function ($completion) {
|
|
1193
|
-
var tmp = this.qn5($completion);
|
|
1194
|
-
tmp.k9_1 = Unit_instance;
|
|
1195
|
-
tmp.l9_1 = null;
|
|
1196
|
-
return tmp.q9();
|
|
1197
|
-
};
|
|
1198
|
-
protoOf(BearerAuthConfig$loadTokens$slambda).za = function ($completion) {
|
|
1199
|
-
return this.pn5($completion);
|
|
1200
|
-
};
|
|
1201
|
-
protoOf(BearerAuthConfig$loadTokens$slambda).q9 = function () {
|
|
1202
|
-
var suspendResult = this.k9_1;
|
|
1203
|
-
$sm: do
|
|
1204
|
-
try {
|
|
1205
|
-
var tmp = this.i9_1;
|
|
1206
|
-
if (tmp === 0) {
|
|
1207
|
-
this.j9_1 = 1;
|
|
1208
|
-
return null;
|
|
1209
|
-
} else if (tmp === 1) {
|
|
1210
|
-
throw this.l9_1;
|
|
1211
|
-
}
|
|
1212
|
-
} catch ($p) {
|
|
1213
|
-
var e = $p;
|
|
1214
|
-
throw e;
|
|
1215
|
-
}
|
|
1216
|
-
while (true);
|
|
1217
|
-
};
|
|
1218
|
-
protoOf(BearerAuthConfig$loadTokens$slambda).qn5 = function (completion) {
|
|
1219
|
-
return new BearerAuthConfig$loadTokens$slambda(completion);
|
|
1220
|
-
};
|
|
1221
|
-
function BearerAuthConfig$loadTokens$slambda_0(resultContinuation) {
|
|
1222
|
-
var i = new BearerAuthConfig$loadTokens$slambda(resultContinuation);
|
|
1223
|
-
var l = function ($completion) {
|
|
1224
|
-
return i.pn5($completion);
|
|
1225
|
-
};
|
|
1226
|
-
l.$arity = 0;
|
|
1227
|
-
return l;
|
|
1228
|
-
}
|
|
1229
|
-
function BearerAuthConfig$sendWithoutRequest$lambda(it) {
|
|
1230
|
-
return true;
|
|
1231
|
-
}
|
|
1232
|
-
function BearerAuthConfig() {
|
|
1233
|
-
var tmp = this;
|
|
1234
|
-
tmp.qn4_1 = BearerAuthConfig$refreshTokens$slambda_0(null);
|
|
1235
|
-
var tmp_0 = this;
|
|
1236
|
-
tmp_0.rn4_1 = BearerAuthConfig$loadTokens$slambda_0(null);
|
|
1237
|
-
var tmp_1 = this;
|
|
1238
|
-
tmp_1.sn4_1 = BearerAuthConfig$sendWithoutRequest$lambda;
|
|
1239
|
-
this.tn4_1 = null;
|
|
1240
|
-
this.un4_1 = true;
|
|
1241
|
-
this.vn4_1 = false;
|
|
1242
|
-
}
|
|
1243
|
-
protoOf(BearerAuthConfig).rn5 = function (block) {
|
|
1244
|
-
this.qn4_1 = block;
|
|
1245
|
-
};
|
|
1246
|
-
protoOf(BearerAuthConfig).sn5 = function (block) {
|
|
1247
|
-
this.rn4_1 = block;
|
|
1248
|
-
};
|
|
1249
|
-
function BearerTokens(accessToken, refreshToken) {
|
|
1250
|
-
this.tn5_1 = accessToken;
|
|
1251
|
-
this.un5_1 = refreshToken;
|
|
1252
|
-
}
|
|
1253
|
-
function RefreshTokensParams(client, response, oldTokens) {
|
|
1254
|
-
this.vn5_1 = client;
|
|
1255
|
-
this.wn5_1 = response;
|
|
1256
|
-
this.xn5_1 = oldTokens;
|
|
1257
|
-
}
|
|
1258
|
-
function BearerAuthProvider$_init_$lambda_lcdiwf(it) {
|
|
1259
|
-
return true;
|
|
1260
|
-
}
|
|
1261
|
-
function BearerAuthProvider$addRequestHeaders$lambda($token, $request) {
|
|
1262
|
-
return function ($this$headers) {
|
|
1263
|
-
var tokenValue = 'Bearer ' + $token.tn5_1;
|
|
1264
|
-
var tmp;
|
|
1265
|
-
if ($this$headers.i36('Authorization')) {
|
|
1266
|
-
$this$headers.x36('Authorization');
|
|
1267
|
-
tmp = Unit_instance;
|
|
1268
|
-
}
|
|
1269
|
-
var tmp_0;
|
|
1270
|
-
if (!$request.k4a_1.k32(get_AuthCircuitBreaker())) {
|
|
1271
|
-
$this$headers.j36('Authorization', tokenValue);
|
|
1272
|
-
tmp_0 = Unit_instance;
|
|
1273
|
-
}
|
|
1274
|
-
return Unit_instance;
|
|
1275
|
-
};
|
|
1276
|
-
}
|
|
1277
|
-
function BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation) {
|
|
1278
|
-
this.gn6_1 = this$0;
|
|
1279
|
-
this.hn6_1 = $response;
|
|
1280
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
1281
|
-
}
|
|
1282
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).pn5 = function ($completion) {
|
|
1283
|
-
var tmp = this.qn5($completion);
|
|
1284
|
-
tmp.k9_1 = Unit_instance;
|
|
1285
|
-
tmp.l9_1 = null;
|
|
1286
|
-
return tmp.q9();
|
|
1287
|
-
};
|
|
1288
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).za = function ($completion) {
|
|
1289
|
-
return this.pn5($completion);
|
|
1290
|
-
};
|
|
1291
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).q9 = function () {
|
|
1292
|
-
var suspendResult = this.k9_1;
|
|
1293
|
-
$sm: do
|
|
1294
|
-
try {
|
|
1295
|
-
var tmp = this.i9_1;
|
|
1296
|
-
switch (tmp) {
|
|
1297
|
-
case 0:
|
|
1298
|
-
this.j9_1 = 3;
|
|
1299
|
-
this.in6_1 = this.gn6_1.kn6_1;
|
|
1300
|
-
this.jn6_1 = this.hn6_1.w4b().a49_1;
|
|
1301
|
-
this.i9_1 = 1;
|
|
1302
|
-
suspendResult = this.gn6_1.on6_1.mn4(this);
|
|
1303
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1304
|
-
return suspendResult;
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
continue $sm;
|
|
1308
|
-
case 1:
|
|
1309
|
-
var ARGUMENT = suspendResult;
|
|
1310
|
-
var ARGUMENT_0 = new RefreshTokensParams(this.jn6_1, this.hn6_1, ARGUMENT);
|
|
1311
|
-
this.i9_1 = 2;
|
|
1312
|
-
suspendResult = this.in6_1(ARGUMENT_0, this);
|
|
1313
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1314
|
-
return suspendResult;
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
continue $sm;
|
|
1318
|
-
case 2:
|
|
1319
|
-
return suspendResult;
|
|
1320
|
-
case 3:
|
|
1321
|
-
throw this.l9_1;
|
|
1322
|
-
}
|
|
1323
|
-
} catch ($p) {
|
|
1324
|
-
var e = $p;
|
|
1325
|
-
if (this.j9_1 === 3) {
|
|
1326
|
-
throw e;
|
|
1327
|
-
} else {
|
|
1328
|
-
this.i9_1 = this.j9_1;
|
|
1329
|
-
this.l9_1 = e;
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
while (true);
|
|
1333
|
-
};
|
|
1334
|
-
protoOf(BearerAuthProvider$refreshToken$slambda).qn5 = function (completion) {
|
|
1335
|
-
return new BearerAuthProvider$refreshToken$slambda(this.gn6_1, this.hn6_1, completion);
|
|
1336
|
-
};
|
|
1337
|
-
function BearerAuthProvider$refreshToken$slambda_0(this$0, $response, resultContinuation) {
|
|
1338
|
-
var i = new BearerAuthProvider$refreshToken$slambda(this$0, $response, resultContinuation);
|
|
1339
|
-
var l = function ($completion) {
|
|
1340
|
-
return i.pn5($completion);
|
|
1341
|
-
};
|
|
1342
|
-
l.$arity = 0;
|
|
1343
|
-
return l;
|
|
1344
|
-
}
|
|
1345
|
-
function $addRequestHeadersCOROUTINE$(_this__u8e3s4, request, authHeader, resultContinuation) {
|
|
1346
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
1347
|
-
this.xn6_1 = _this__u8e3s4;
|
|
1348
|
-
this.yn6_1 = request;
|
|
1349
|
-
this.zn6_1 = authHeader;
|
|
1350
|
-
}
|
|
1351
|
-
protoOf($addRequestHeadersCOROUTINE$).q9 = function () {
|
|
1352
|
-
var suspendResult = this.k9_1;
|
|
1353
|
-
$sm: do
|
|
1354
|
-
try {
|
|
1355
|
-
var tmp = this.i9_1;
|
|
1356
|
-
switch (tmp) {
|
|
1357
|
-
case 0:
|
|
1358
|
-
this.j9_1 = 2;
|
|
1359
|
-
this.i9_1 = 1;
|
|
1360
|
-
suspendResult = this.xn6_1.on6_1.mn4(this);
|
|
1361
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1362
|
-
return suspendResult;
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
continue $sm;
|
|
1366
|
-
case 1:
|
|
1367
|
-
var tmp0_elvis_lhs = suspendResult;
|
|
1368
|
-
var tmp_0;
|
|
1369
|
-
if (tmp0_elvis_lhs == null) {
|
|
1370
|
-
return Unit_instance;
|
|
1371
|
-
} else {
|
|
1372
|
-
tmp_0 = tmp0_elvis_lhs;
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
|
-
var token = tmp_0;
|
|
1376
|
-
headers(this.yn6_1, BearerAuthProvider$addRequestHeaders$lambda(token, this.yn6_1));
|
|
1377
|
-
return Unit_instance;
|
|
1378
|
-
case 2:
|
|
1379
|
-
throw this.l9_1;
|
|
1380
|
-
}
|
|
1381
|
-
} catch ($p) {
|
|
1382
|
-
var e = $p;
|
|
1383
|
-
if (this.j9_1 === 2) {
|
|
1384
|
-
throw e;
|
|
1385
|
-
} else {
|
|
1386
|
-
this.i9_1 = this.j9_1;
|
|
1387
|
-
this.l9_1 = e;
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
while (true);
|
|
1391
|
-
};
|
|
1392
|
-
function $refreshTokenCOROUTINE$(_this__u8e3s4, response, resultContinuation) {
|
|
1393
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
1394
|
-
this.in7_1 = _this__u8e3s4;
|
|
1395
|
-
this.jn7_1 = response;
|
|
1396
|
-
}
|
|
1397
|
-
protoOf($refreshTokenCOROUTINE$).q9 = function () {
|
|
1398
|
-
var suspendResult = this.k9_1;
|
|
1399
|
-
$sm: do
|
|
1400
|
-
try {
|
|
1401
|
-
var tmp = this.i9_1;
|
|
1402
|
-
switch (tmp) {
|
|
1403
|
-
case 0:
|
|
1404
|
-
this.j9_1 = 2;
|
|
1405
|
-
this.i9_1 = 1;
|
|
1406
|
-
suspendResult = this.in7_1.on6_1.nn4(this.in7_1.nn6_1, BearerAuthProvider$refreshToken$slambda_0(this.in7_1, this.jn7_1, null), this);
|
|
1407
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1408
|
-
return suspendResult;
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
continue $sm;
|
|
1412
|
-
case 1:
|
|
1413
|
-
var newToken = suspendResult;
|
|
1414
|
-
return !(newToken == null);
|
|
1415
|
-
case 2:
|
|
1416
|
-
throw this.l9_1;
|
|
1417
|
-
}
|
|
1418
|
-
} catch ($p) {
|
|
1419
|
-
var e = $p;
|
|
1420
|
-
if (this.j9_1 === 2) {
|
|
1421
|
-
throw e;
|
|
1422
|
-
} else {
|
|
1423
|
-
this.i9_1 = this.j9_1;
|
|
1424
|
-
this.l9_1 = e;
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
while (true);
|
|
1428
|
-
};
|
|
1429
|
-
function BearerAuthProvider(refreshTokens, loadTokens, sendWithoutRequestCallback, realm, cacheTokens, nonCancellableRefresh) {
|
|
1430
|
-
var tmp;
|
|
1431
|
-
if (sendWithoutRequestCallback === VOID) {
|
|
1432
|
-
tmp = BearerAuthProvider$_init_$lambda_lcdiwf;
|
|
1433
|
-
} else {
|
|
1434
|
-
tmp = sendWithoutRequestCallback;
|
|
1435
|
-
}
|
|
1436
|
-
sendWithoutRequestCallback = tmp;
|
|
1437
|
-
cacheTokens = cacheTokens === VOID ? true : cacheTokens;
|
|
1438
|
-
nonCancellableRefresh = nonCancellableRefresh === VOID ? false : nonCancellableRefresh;
|
|
1439
|
-
this.kn6_1 = refreshTokens;
|
|
1440
|
-
this.ln6_1 = sendWithoutRequestCallback;
|
|
1441
|
-
this.mn6_1 = realm;
|
|
1442
|
-
this.nn6_1 = nonCancellableRefresh;
|
|
1443
|
-
this.on6_1 = new AuthTokenHolder(loadTokens, cacheTokens);
|
|
1444
|
-
}
|
|
1445
|
-
protoOf(BearerAuthProvider).on2 = function () {
|
|
1446
|
-
var message = 'Deprecated';
|
|
1447
|
-
throw IllegalStateException_init_$Create$(toString(message));
|
|
1448
|
-
};
|
|
1449
|
-
protoOf(BearerAuthProvider).rn1 = function (request) {
|
|
1450
|
-
return this.ln6_1(request);
|
|
1451
|
-
};
|
|
1452
|
-
protoOf(BearerAuthProvider).ymz = function (auth) {
|
|
1453
|
-
if (!(auth.l3p_1 === 'Bearer')) {
|
|
1454
|
-
get_LOGGER().z3b('Bearer Auth Provider is not applicable for ' + auth.toString());
|
|
1455
|
-
return false;
|
|
1456
|
-
}
|
|
1457
|
-
var tmp;
|
|
1458
|
-
if (this.mn6_1 == null) {
|
|
1459
|
-
tmp = true;
|
|
1460
|
-
} else {
|
|
1461
|
-
if (!(auth instanceof Parameterized)) {
|
|
1462
|
-
tmp = false;
|
|
1463
|
-
} else {
|
|
1464
|
-
tmp = auth.m3e('realm') == this.mn6_1;
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1467
|
-
var isSameRealm = tmp;
|
|
1468
|
-
if (!isSameRealm) {
|
|
1469
|
-
get_LOGGER().z3b('Bearer Auth Provider is not applicable for this realm');
|
|
1470
|
-
}
|
|
1471
|
-
return isSameRealm;
|
|
1472
|
-
};
|
|
1473
|
-
protoOf(BearerAuthProvider).nn2 = function (request, authHeader, $completion) {
|
|
1474
|
-
var tmp = new $addRequestHeadersCOROUTINE$(this, request, authHeader, $completion);
|
|
1475
|
-
tmp.k9_1 = Unit_instance;
|
|
1476
|
-
tmp.l9_1 = null;
|
|
1477
|
-
return tmp.q9();
|
|
1478
|
-
};
|
|
1479
|
-
protoOf(BearerAuthProvider).mn2 = function (response, $completion) {
|
|
1480
|
-
var tmp = new $refreshTokenCOROUTINE$(this, response, $completion);
|
|
1481
|
-
tmp.k9_1 = Unit_instance;
|
|
1482
|
-
tmp.l9_1 = null;
|
|
1483
|
-
return tmp.q9();
|
|
1484
|
-
};
|
|
1485
|
-
protoOf(BearerAuthProvider).kn7 = function () {
|
|
1486
|
-
this.on6_1.pn4();
|
|
1487
|
-
};
|
|
1488
|
-
//region block: post-declaration
|
|
1489
|
-
protoOf(SetTokenContext).v9 = get;
|
|
1490
|
-
protoOf(SetTokenContext).pj = fold;
|
|
1491
|
-
protoOf(SetTokenContext).oj = minusKey;
|
|
1492
|
-
protoOf(SetTokenContext).qj = plus;
|
|
1493
|
-
protoOf(BearerAuthProvider).sn1 = addRequestHeaders$default;
|
|
1494
|
-
//endregion
|
|
1495
|
-
//region block: init
|
|
1496
|
-
Companion_instance = new Companion();
|
|
1497
|
-
//endregion
|
|
1498
|
-
//region block: exports
|
|
1499
|
-
_.$_$ = _.$_$ || {};
|
|
1500
|
-
_.$_$.a = BearerAuthProvider;
|
|
1501
|
-
_.$_$.b = BearerTokens;
|
|
1502
|
-
_.$_$.c = RefreshTokensParams;
|
|
1503
|
-
_.$_$.d = bearer;
|
|
1504
|
-
_.$_$.e = get_Auth;
|
|
1505
|
-
_.$_$.f = get_authProviders;
|
|
1506
|
-
//endregion
|
|
1507
|
-
return _;
|
|
1508
|
-
}));
|
|
1509
|
-
|
|
1510
|
-
//# sourceMappingURL=ktor-ktor-client-auth.js.map
|