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