@openfort/openfort-node 0.6.44 → 0.6.45
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/dist/apis/iamApiWrapper.d.ts +47 -4
- package/dist/apis/iamApiWrapper.js +60 -3
- package/dist/apis/iamApiWrapper.js.map +1 -1
- package/dist/generated/apis/AccountsApi.d.ts +2 -2
- package/dist/generated/apis/AccountsApi.js +2 -2
- package/dist/generated/apis/{OAuthApi.d.ts → AdminAuthenticationApi.d.ts} +59 -26
- package/dist/generated/apis/{OAuthApi.js → AdminAuthenticationApi.js} +189 -87
- package/dist/generated/apis/AdminAuthenticationApi.js.map +1 -0
- package/dist/generated/apis/AuthenticationApi.d.ts +194 -16
- package/dist/generated/apis/AuthenticationApi.js +716 -43
- package/dist/generated/apis/AuthenticationApi.js.map +1 -1
- package/dist/generated/apis/EmbeddedApi.d.ts +78 -0
- package/dist/generated/apis/{PlayersAuthenticationApi.js → EmbeddedApi.js} +136 -60
- package/dist/generated/apis/EmbeddedApi.js.map +1 -0
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/index.js +2 -4
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/models/AuthPlayerResponse.d.ts +2 -6
- package/dist/generated/models/AuthPlayerResponse.js +3 -27
- package/dist/generated/models/AuthPlayerResponse.js.map +1 -1
- package/dist/generated/models/AuthProvider.d.ts +15 -0
- package/dist/generated/models/AuthProvider.js +14 -0
- package/dist/generated/models/AuthProvider.js.map +1 -0
- package/dist/generated/models/AuthResponse.d.ts +6 -4
- package/dist/generated/models/AuthResponse.js +9 -3
- package/dist/generated/models/AuthResponse.js.map +1 -1
- package/dist/generated/models/AuthSessionResponse.d.ts +34 -0
- package/dist/generated/models/{RetrievePlayerEncryptedKeyResponse.js → AuthSessionResponse.js} +29 -23
- package/dist/generated/models/AuthSessionResponse.js.map +1 -0
- package/dist/generated/models/AuthenticateOAuthRequest.d.ts +33 -0
- package/dist/generated/models/AuthenticateOAuthRequest.js +38 -0
- package/dist/generated/models/AuthenticateOAuthRequest.js.map +1 -0
- package/dist/generated/models/BaseEntityListResponseDeviceResponse.d.ts +35 -0
- package/dist/generated/models/BaseEntityListResponseDeviceResponse.js +62 -0
- package/dist/generated/models/BaseEntityListResponseDeviceResponse.js.map +1 -0
- package/dist/generated/models/BaseEntityListResponseShareResponse.d.ts +35 -0
- package/dist/generated/models/BaseEntityListResponseShareResponse.js +62 -0
- package/dist/generated/models/BaseEntityListResponseShareResponse.js.map +1 -0
- package/dist/generated/models/{RegisterPlayerEncryptedKeyResponse.d.ts → CheckoutSubscriptionRequest.d.ts} +4 -5
- package/dist/generated/models/{RegisterPlayerEncryptedKeyRequest.js → CheckoutSubscriptionRequest.js} +13 -13
- package/dist/generated/models/CheckoutSubscriptionRequest.js.map +1 -0
- package/dist/generated/models/CreateAccountRequest.d.ts +1 -1
- package/dist/generated/models/CreateDeviceRequest.d.ts +31 -0
- package/dist/generated/models/{AuthenticatedPlayerResponse.js → CreateDeviceRequest.js} +9 -9
- package/dist/generated/models/CreateDeviceRequest.js.map +1 -0
- package/dist/generated/models/{RegisterPlayerEncryptedKeyRequest.d.ts → CreateShareRequest.d.ts} +7 -9
- package/dist/generated/models/CreateShareRequest.js +44 -0
- package/dist/generated/models/CreateShareRequest.js.map +1 -0
- package/dist/generated/models/{AuthorizeWithOAuthToken200Response.d.ts → DeprecatedAuthenticatedPlayerResponse.d.ts} +2 -2
- package/dist/generated/models/{AuthorizeWithOAuthToken200Response.js → DeprecatedAuthenticatedPlayerResponse.js} +7 -7
- package/dist/generated/models/DeprecatedAuthenticatedPlayerResponse.js.map +1 -0
- package/dist/generated/models/DeviceListQueries.d.ts +41 -0
- package/dist/generated/models/DeviceListQueries.js +50 -0
- package/dist/generated/models/DeviceListQueries.js.map +1 -0
- package/dist/generated/models/{RetrievePlayerEncryptedKeyResponse.d.ts → DeviceResponse.d.ts} +5 -6
- package/dist/generated/models/{RegisterPlayerEncryptedKeyResponse.js → DeviceResponse.js} +17 -17
- package/dist/generated/models/DeviceResponse.js.map +1 -0
- package/dist/generated/models/EntityTypeDEVICE.d.ts +12 -0
- package/dist/generated/models/EntityTypeDEVICE.js +14 -0
- package/dist/generated/models/EntityTypeDEVICE.js.map +1 -0
- package/dist/generated/models/EntityTypeSHARE.d.ts +12 -0
- package/dist/generated/models/EntityTypeSHARE.js +14 -0
- package/dist/generated/models/EntityTypeSHARE.js.map +1 -0
- package/dist/generated/models/JwtKey.d.ts +34 -0
- package/dist/generated/models/JwtKey.js +68 -0
- package/dist/generated/models/JwtKey.js.map +1 -0
- package/dist/generated/models/JwtKeyResponse.d.ts +29 -0
- package/dist/generated/models/JwtKeyResponse.js +32 -0
- package/dist/generated/models/JwtKeyResponse.js.map +1 -0
- package/dist/generated/models/LinkRequest.d.ts +36 -0
- package/dist/generated/models/LinkRequest.js +41 -0
- package/dist/generated/models/LinkRequest.js.map +1 -0
- package/dist/generated/models/LinkedAccountResponse.d.ts +36 -0
- package/dist/generated/models/LinkedAccountResponse.js +68 -0
- package/dist/generated/models/LinkedAccountResponse.js.map +1 -0
- package/dist/generated/models/{AuthenticatedPlayerResponse.d.ts → LogoutRequest.d.ts} +3 -3
- package/dist/generated/models/LogoutRequest.js +32 -0
- package/dist/generated/models/LogoutRequest.js.map +1 -0
- package/dist/generated/models/OAuthInitRequest.d.ts +33 -0
- package/dist/generated/models/OAuthInitRequest.js +38 -0
- package/dist/generated/models/OAuthInitRequest.js.map +1 -0
- package/dist/generated/models/ObjectSerializer.d.ts +29 -5
- package/dist/generated/models/ObjectSerializer.js +84 -15
- package/dist/generated/models/ObjectSerializer.js.map +1 -1
- package/dist/generated/models/Plan.d.ts +33 -0
- package/dist/generated/models/Plan.js +56 -0
- package/dist/generated/models/Plan.js.map +1 -0
- package/dist/generated/models/PlansResponse.d.ts +29 -0
- package/dist/generated/models/PlansResponse.js +32 -0
- package/dist/generated/models/PlansResponse.js.map +1 -0
- package/dist/generated/models/RefreshTokenRequest.d.ts +31 -0
- package/dist/generated/models/RefreshTokenRequest.js +32 -0
- package/dist/generated/models/RefreshTokenRequest.js.map +1 -0
- package/dist/generated/models/SIWEAuthenticateRequest.d.ts +43 -0
- package/dist/generated/models/SIWEAuthenticateRequest.js +50 -0
- package/dist/generated/models/SIWEAuthenticateRequest.js.map +1 -0
- package/dist/generated/models/SIWEInitResponse.d.ts +33 -0
- package/dist/generated/models/SIWEInitResponse.js +44 -0
- package/dist/generated/models/SIWEInitResponse.js.map +1 -0
- package/dist/generated/models/SIWERequest.d.ts +31 -0
- package/dist/generated/models/SIWERequest.js +32 -0
- package/dist/generated/models/SIWERequest.js.map +1 -0
- package/dist/generated/models/ShareResponse.d.ts +35 -0
- package/dist/generated/models/ShareResponse.js +62 -0
- package/dist/generated/models/ShareResponse.js.map +1 -0
- package/dist/generated/models/ShareType.d.ts +12 -0
- package/dist/generated/models/ShareType.js +14 -0
- package/dist/generated/models/ShareType.js.map +1 -0
- package/dist/generated/models/SubscriptionResponse.d.ts +32 -0
- package/dist/generated/models/SubscriptionResponse.js +50 -0
- package/dist/generated/models/SubscriptionResponse.js.map +1 -0
- package/dist/generated/models/SubscriptionResponsePlan.d.ts +30 -0
- package/dist/generated/models/SubscriptionResponsePlan.js +44 -0
- package/dist/generated/models/SubscriptionResponsePlan.js.map +1 -0
- package/dist/generated/models/all.d.ts +29 -5
- package/dist/generated/models/all.js +29 -5
- package/dist/generated/models/all.js.map +1 -1
- package/dist/generated/types/ObjectParamAPI.d.ts +439 -207
- package/dist/generated/types/ObjectParamAPI.js +233 -137
- package/dist/generated/types/ObjectParamAPI.js.map +1 -1
- package/dist/generated/types/ObservableAPI.d.ts +190 -99
- package/dist/generated/types/ObservableAPI.js +534 -264
- package/dist/generated/types/ObservableAPI.js.map +1 -1
- package/dist/generated/types/PromiseAPI.d.ts +188 -95
- package/dist/generated/types/PromiseAPI.js +270 -154
- package/dist/generated/types/PromiseAPI.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/apis/oauthApiWrapper.d.ts +0 -14
- package/dist/apis/oauthApiWrapper.js +0 -38
- package/dist/apis/oauthApiWrapper.js.map +0 -1
- package/dist/generated/apis/GoogleAuthenticationApi.d.ts +0 -37
- package/dist/generated/apis/GoogleAuthenticationApi.js +0 -118
- package/dist/generated/apis/GoogleAuthenticationApi.js.map +0 -1
- package/dist/generated/apis/OAuthApi.js.map +0 -1
- package/dist/generated/apis/PlayersAuthenticationApi.d.ts +0 -56
- package/dist/generated/apis/PlayersAuthenticationApi.js.map +0 -1
- package/dist/generated/models/AuthenticatedPlayerResponse.js.map +0 -1
- package/dist/generated/models/AuthorizeWithOAuthToken200Response.js.map +0 -1
- package/dist/generated/models/RegisterPlayerEncryptedKeyRequest.js.map +0 -1
- package/dist/generated/models/RegisterPlayerEncryptedKeyResponse.js.map +0 -1
- package/dist/generated/models/RetrievePlayerEncryptedKeyResponse.js.map +0 -1
|
@@ -12,18 +12,407 @@ const util_1 = require("../util");
|
|
|
12
12
|
*/
|
|
13
13
|
class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Authenticate player with oauth token.
|
|
16
|
+
* @param authenticateOAuthRequest
|
|
17
|
+
*/
|
|
18
|
+
async authenticateOAuth(authenticateOAuthRequest, _options) {
|
|
19
|
+
let _config = _options || this.configuration;
|
|
20
|
+
// verify required parameter 'authenticateOAuthRequest' is not null or undefined
|
|
21
|
+
if (authenticateOAuthRequest === null || authenticateOAuthRequest === undefined) {
|
|
22
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "authenticateOAuth", "authenticateOAuthRequest");
|
|
23
|
+
}
|
|
24
|
+
// Path Params
|
|
25
|
+
const localVarPath = '/iam/v1/oauth/authenticate';
|
|
26
|
+
// Make Request Context
|
|
27
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
28
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
29
|
+
// Body Params
|
|
30
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
31
|
+
"application/json"
|
|
32
|
+
]);
|
|
33
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
34
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(authenticateOAuthRequest, "AuthenticateOAuthRequest", ""), contentType);
|
|
35
|
+
requestContext.setBody(serializedBody);
|
|
36
|
+
let authMethod;
|
|
37
|
+
// Apply auth methods
|
|
38
|
+
authMethod = _config.authMethods["pk"];
|
|
39
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
40
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
41
|
+
}
|
|
42
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
43
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
44
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
45
|
+
}
|
|
46
|
+
return requestContext;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Authenticate player with SIWE
|
|
50
|
+
* @param sIWEAuthenticateRequest
|
|
51
|
+
*/
|
|
52
|
+
async authenticateSIWE(sIWEAuthenticateRequest, _options) {
|
|
53
|
+
let _config = _options || this.configuration;
|
|
54
|
+
// verify required parameter 'sIWEAuthenticateRequest' is not null or undefined
|
|
55
|
+
if (sIWEAuthenticateRequest === null || sIWEAuthenticateRequest === undefined) {
|
|
56
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "authenticateSIWE", "sIWEAuthenticateRequest");
|
|
57
|
+
}
|
|
58
|
+
// Path Params
|
|
59
|
+
const localVarPath = '/iam/v1/siwe/authenticate';
|
|
60
|
+
// Make Request Context
|
|
61
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
62
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
63
|
+
// Body Params
|
|
64
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
65
|
+
"application/json"
|
|
66
|
+
]);
|
|
67
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
68
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(sIWEAuthenticateRequest, "SIWEAuthenticateRequest", ""), contentType);
|
|
69
|
+
requestContext.setBody(serializedBody);
|
|
70
|
+
let authMethod;
|
|
71
|
+
// Apply auth methods
|
|
72
|
+
authMethod = _config.authMethods["pk"];
|
|
73
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
74
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
75
|
+
}
|
|
76
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
77
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
78
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
79
|
+
}
|
|
80
|
+
return requestContext;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The endpoint verifies the token generated by OAuth provider, creates or retrieves a player based on his email, and returns the jwt token for the player together with the player id.
|
|
84
|
+
* Authorize player with token.
|
|
85
|
+
* @param provider OAuth provider
|
|
86
|
+
* @param oAuthRequest
|
|
87
|
+
*/
|
|
88
|
+
async authorizeWithOAuthToken(provider, oAuthRequest, _options) {
|
|
89
|
+
let _config = _options || this.configuration;
|
|
90
|
+
// verify required parameter 'provider' is not null or undefined
|
|
91
|
+
if (provider === null || provider === undefined) {
|
|
92
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "authorizeWithOAuthToken", "provider");
|
|
93
|
+
}
|
|
94
|
+
// verify required parameter 'oAuthRequest' is not null or undefined
|
|
95
|
+
if (oAuthRequest === null || oAuthRequest === undefined) {
|
|
96
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "authorizeWithOAuthToken", "oAuthRequest");
|
|
97
|
+
}
|
|
98
|
+
// Path Params
|
|
99
|
+
const localVarPath = '/iam/v1/oauth/{provider}/authorize'
|
|
100
|
+
.replace('{' + 'provider' + '}', encodeURIComponent(String(provider)));
|
|
101
|
+
// Make Request Context
|
|
102
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
103
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
104
|
+
// Body Params
|
|
105
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
106
|
+
"application/json"
|
|
107
|
+
]);
|
|
108
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
109
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(oAuthRequest, "OAuthRequest", ""), contentType);
|
|
110
|
+
requestContext.setBody(serializedBody);
|
|
111
|
+
let authMethod;
|
|
112
|
+
// Apply auth methods
|
|
113
|
+
authMethod = _config.authMethods["sk"];
|
|
114
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
115
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
116
|
+
}
|
|
117
|
+
// Apply auth methods
|
|
118
|
+
authMethod = _config.authMethods["pk"];
|
|
119
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
120
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
121
|
+
}
|
|
122
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
123
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
124
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
125
|
+
}
|
|
126
|
+
return requestContext;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Get the jwks.json file. You can use the jwks.json file to verify the signature of a JWT token issued by Openfort Auth.
|
|
130
|
+
* Get the jwks.json file.
|
|
131
|
+
* @param publishableKey Specifies the project publishable key (starts with pk_).
|
|
132
|
+
*/
|
|
133
|
+
async getJwks(publishableKey, _options) {
|
|
134
|
+
let _config = _options || this.configuration;
|
|
135
|
+
// verify required parameter 'publishableKey' is not null or undefined
|
|
136
|
+
if (publishableKey === null || publishableKey === undefined) {
|
|
137
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "getJwks", "publishableKey");
|
|
138
|
+
}
|
|
139
|
+
// Path Params
|
|
140
|
+
const localVarPath = '/iam/v1/{publishable_key}/jwks.json'
|
|
141
|
+
.replace('{' + 'publishable_key' + '}', encodeURIComponent(String(publishableKey)));
|
|
142
|
+
// Make Request Context
|
|
143
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
144
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
145
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
146
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
147
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
148
|
+
}
|
|
149
|
+
return requestContext;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Initialize OAuth.
|
|
153
|
+
* @param oAuthInitRequest
|
|
154
|
+
*/
|
|
155
|
+
async initOAuth(oAuthInitRequest, _options) {
|
|
156
|
+
let _config = _options || this.configuration;
|
|
157
|
+
// verify required parameter 'oAuthInitRequest' is not null or undefined
|
|
158
|
+
if (oAuthInitRequest === null || oAuthInitRequest === undefined) {
|
|
159
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "initOAuth", "oAuthInitRequest");
|
|
160
|
+
}
|
|
161
|
+
// Path Params
|
|
162
|
+
const localVarPath = '/iam/v1/oauth/init';
|
|
163
|
+
// Make Request Context
|
|
164
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
165
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
166
|
+
// Body Params
|
|
167
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
168
|
+
"application/json"
|
|
169
|
+
]);
|
|
170
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
171
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(oAuthInitRequest, "OAuthInitRequest", ""), contentType);
|
|
172
|
+
requestContext.setBody(serializedBody);
|
|
173
|
+
let authMethod;
|
|
174
|
+
// Apply auth methods
|
|
175
|
+
authMethod = _config.authMethods["pk"];
|
|
176
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
177
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
178
|
+
}
|
|
179
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
180
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
181
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
182
|
+
}
|
|
183
|
+
return requestContext;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Create a challenge to link external wallet to the player.
|
|
187
|
+
* Initialize SIWE.
|
|
188
|
+
* @param sIWERequest
|
|
189
|
+
*/
|
|
190
|
+
async initSIWE(sIWERequest, _options) {
|
|
191
|
+
let _config = _options || this.configuration;
|
|
192
|
+
// verify required parameter 'sIWERequest' is not null or undefined
|
|
193
|
+
if (sIWERequest === null || sIWERequest === undefined) {
|
|
194
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "initSIWE", "sIWERequest");
|
|
195
|
+
}
|
|
196
|
+
// Path Params
|
|
197
|
+
const localVarPath = '/iam/v1/siwe/init';
|
|
198
|
+
// Make Request Context
|
|
199
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
200
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
201
|
+
// Body Params
|
|
202
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
203
|
+
"application/json"
|
|
204
|
+
]);
|
|
205
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
206
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(sIWERequest, "SIWERequest", ""), contentType);
|
|
207
|
+
requestContext.setBody(serializedBody);
|
|
208
|
+
let authMethod;
|
|
209
|
+
// Apply auth methods
|
|
210
|
+
authMethod = _config.authMethods["pk"];
|
|
211
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
212
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
213
|
+
}
|
|
214
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
215
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
216
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
217
|
+
}
|
|
218
|
+
return requestContext;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Link external wallet.
|
|
222
|
+
* @param sIWEAuthenticateRequest
|
|
223
|
+
*/
|
|
224
|
+
async linkSIWE(sIWEAuthenticateRequest, _options) {
|
|
225
|
+
let _config = _options || this.configuration;
|
|
226
|
+
// verify required parameter 'sIWEAuthenticateRequest' is not null or undefined
|
|
227
|
+
if (sIWEAuthenticateRequest === null || sIWEAuthenticateRequest === undefined) {
|
|
228
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "linkSIWE", "sIWEAuthenticateRequest");
|
|
229
|
+
}
|
|
230
|
+
// Path Params
|
|
231
|
+
const localVarPath = '/iam/v1/siwe/link';
|
|
232
|
+
// Make Request Context
|
|
233
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
234
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
235
|
+
// Body Params
|
|
236
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
237
|
+
"application/json"
|
|
238
|
+
]);
|
|
239
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
240
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(sIWEAuthenticateRequest, "SIWEAuthenticateRequest", ""), contentType);
|
|
241
|
+
requestContext.setBody(serializedBody);
|
|
242
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
243
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
244
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
245
|
+
}
|
|
246
|
+
return requestContext;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Authenticate a player based on email and password.
|
|
250
|
+
* Email and password login.
|
|
17
251
|
* @param loginRequest
|
|
18
252
|
*/
|
|
19
|
-
async
|
|
253
|
+
async loginEmailPassword(loginRequest, _options) {
|
|
254
|
+
let _config = _options || this.configuration;
|
|
255
|
+
// verify required parameter 'loginRequest' is not null or undefined
|
|
256
|
+
if (loginRequest === null || loginRequest === undefined) {
|
|
257
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "loginEmailPassword", "loginRequest");
|
|
258
|
+
}
|
|
259
|
+
// Path Params
|
|
260
|
+
const localVarPath = '/iam/v1/password/login';
|
|
261
|
+
// Make Request Context
|
|
262
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
263
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
264
|
+
// Body Params
|
|
265
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
266
|
+
"application/json"
|
|
267
|
+
]);
|
|
268
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
269
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(loginRequest, "LoginRequest", ""), contentType);
|
|
270
|
+
requestContext.setBody(serializedBody);
|
|
271
|
+
let authMethod;
|
|
272
|
+
// Apply auth methods
|
|
273
|
+
authMethod = _config.authMethods["pk"];
|
|
274
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
275
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
276
|
+
}
|
|
277
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
278
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
279
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
280
|
+
}
|
|
281
|
+
return requestContext;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* When using Openfort Auth, the endpoint logs out the player.
|
|
285
|
+
* Log out a player.
|
|
286
|
+
* @param logoutRequest
|
|
287
|
+
*/
|
|
288
|
+
async logout(logoutRequest, _options) {
|
|
289
|
+
let _config = _options || this.configuration;
|
|
290
|
+
// verify required parameter 'logoutRequest' is not null or undefined
|
|
291
|
+
if (logoutRequest === null || logoutRequest === undefined) {
|
|
292
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "logout", "logoutRequest");
|
|
293
|
+
}
|
|
294
|
+
// Path Params
|
|
295
|
+
const localVarPath = '/iam/v1/sessions/logout';
|
|
296
|
+
// Make Request Context
|
|
297
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
298
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
299
|
+
// Body Params
|
|
300
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
301
|
+
"application/json"
|
|
302
|
+
]);
|
|
303
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
304
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(logoutRequest, "LogoutRequest", ""), contentType);
|
|
305
|
+
requestContext.setBody(serializedBody);
|
|
306
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
307
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
308
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
309
|
+
}
|
|
310
|
+
return requestContext;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Get or create a new session for the player based on the refresh token.
|
|
314
|
+
* Refresh or create auth session.
|
|
315
|
+
* @param refreshTokenRequest
|
|
316
|
+
*/
|
|
317
|
+
async refresh(refreshTokenRequest, _options) {
|
|
318
|
+
let _config = _options || this.configuration;
|
|
319
|
+
// verify required parameter 'refreshTokenRequest' is not null or undefined
|
|
320
|
+
if (refreshTokenRequest === null || refreshTokenRequest === undefined) {
|
|
321
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "refresh", "refreshTokenRequest");
|
|
322
|
+
}
|
|
323
|
+
// Path Params
|
|
324
|
+
const localVarPath = '/iam/v1/sessions';
|
|
325
|
+
// Make Request Context
|
|
326
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
327
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
328
|
+
// Body Params
|
|
329
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
330
|
+
"application/json"
|
|
331
|
+
]);
|
|
332
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
333
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(refreshTokenRequest, "RefreshTokenRequest", ""), contentType);
|
|
334
|
+
requestContext.setBody(serializedBody);
|
|
335
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
336
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
337
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
338
|
+
}
|
|
339
|
+
return requestContext;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Create and authenticate a player based on email and password.
|
|
343
|
+
* Email and password signup.
|
|
344
|
+
* @param signupRequest
|
|
345
|
+
*/
|
|
346
|
+
async signupEmailPassword(signupRequest, _options) {
|
|
347
|
+
let _config = _options || this.configuration;
|
|
348
|
+
// verify required parameter 'signupRequest' is not null or undefined
|
|
349
|
+
if (signupRequest === null || signupRequest === undefined) {
|
|
350
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "signupEmailPassword", "signupRequest");
|
|
351
|
+
}
|
|
352
|
+
// Path Params
|
|
353
|
+
const localVarPath = '/iam/v1/password/signup';
|
|
354
|
+
// Make Request Context
|
|
355
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
356
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
357
|
+
// Body Params
|
|
358
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
359
|
+
"application/json"
|
|
360
|
+
]);
|
|
361
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
362
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(signupRequest, "SignupRequest", ""), contentType);
|
|
363
|
+
requestContext.setBody(serializedBody);
|
|
364
|
+
let authMethod;
|
|
365
|
+
// Apply auth methods
|
|
366
|
+
authMethod = _config.authMethods["pk"];
|
|
367
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
368
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
369
|
+
}
|
|
370
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
371
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
372
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
373
|
+
}
|
|
374
|
+
return requestContext;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Unlink OAuth account
|
|
378
|
+
* @param linkRequest
|
|
379
|
+
*/
|
|
380
|
+
async unlinkOAuth(linkRequest, _options) {
|
|
381
|
+
let _config = _options || this.configuration;
|
|
382
|
+
// verify required parameter 'linkRequest' is not null or undefined
|
|
383
|
+
if (linkRequest === null || linkRequest === undefined) {
|
|
384
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "unlinkOAuth", "linkRequest");
|
|
385
|
+
}
|
|
386
|
+
// Path Params
|
|
387
|
+
const localVarPath = '/iam/v1/oauth/unlink';
|
|
388
|
+
// Make Request Context
|
|
389
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
390
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
391
|
+
// Body Params
|
|
392
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
393
|
+
"application/json"
|
|
394
|
+
]);
|
|
395
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
396
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(linkRequest, "LinkRequest", ""), contentType);
|
|
397
|
+
requestContext.setBody(serializedBody);
|
|
398
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
399
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
400
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
401
|
+
}
|
|
402
|
+
return requestContext;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Unlink external wallet.
|
|
406
|
+
* @param sIWERequest
|
|
407
|
+
*/
|
|
408
|
+
async unlinkSIWE(sIWERequest, _options) {
|
|
20
409
|
let _config = _options || this.configuration;
|
|
21
|
-
// verify required parameter '
|
|
22
|
-
if (
|
|
23
|
-
throw new baseapi_1.RequiredError("AuthenticationApi", "
|
|
410
|
+
// verify required parameter 'sIWERequest' is not null or undefined
|
|
411
|
+
if (sIWERequest === null || sIWERequest === undefined) {
|
|
412
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "unlinkSIWE", "sIWERequest");
|
|
24
413
|
}
|
|
25
414
|
// Path Params
|
|
26
|
-
const localVarPath = '/iam/v1/
|
|
415
|
+
const localVarPath = '/iam/v1/siwe/unlink';
|
|
27
416
|
// Make Request Context
|
|
28
417
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
29
418
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
@@ -32,14 +421,8 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
32
421
|
"application/json"
|
|
33
422
|
]);
|
|
34
423
|
requestContext.setHeaderParam("Content-Type", contentType);
|
|
35
|
-
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(
|
|
424
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(sIWERequest, "SIWERequest", ""), contentType);
|
|
36
425
|
requestContext.setBody(serializedBody);
|
|
37
|
-
let authMethod;
|
|
38
|
-
// Apply auth methods
|
|
39
|
-
authMethod = _config.authMethods["pk"];
|
|
40
|
-
if (authMethod?.applySecurityAuthentication) {
|
|
41
|
-
await authMethod?.applySecurityAuthentication(requestContext);
|
|
42
|
-
}
|
|
43
426
|
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
44
427
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
45
428
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
@@ -47,18 +430,18 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
47
430
|
return requestContext;
|
|
48
431
|
}
|
|
49
432
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* @param
|
|
433
|
+
* The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.
|
|
434
|
+
* Retrieve player by oauth token.
|
|
435
|
+
* @param authenticateOAuthRequest
|
|
53
436
|
*/
|
|
54
|
-
async
|
|
437
|
+
async verifyOAuth(authenticateOAuthRequest, _options) {
|
|
55
438
|
let _config = _options || this.configuration;
|
|
56
|
-
// verify required parameter '
|
|
57
|
-
if (
|
|
58
|
-
throw new baseapi_1.RequiredError("AuthenticationApi", "
|
|
439
|
+
// verify required parameter 'authenticateOAuthRequest' is not null or undefined
|
|
440
|
+
if (authenticateOAuthRequest === null || authenticateOAuthRequest === undefined) {
|
|
441
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "verifyOAuth", "authenticateOAuthRequest");
|
|
59
442
|
}
|
|
60
443
|
// Path Params
|
|
61
|
-
const localVarPath = '/iam/v1/
|
|
444
|
+
const localVarPath = '/iam/v1/oauth/verify';
|
|
62
445
|
// Make Request Context
|
|
63
446
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
64
447
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
@@ -67,11 +450,11 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
67
450
|
"application/json"
|
|
68
451
|
]);
|
|
69
452
|
requestContext.setHeaderParam("Content-Type", contentType);
|
|
70
|
-
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(
|
|
453
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(authenticateOAuthRequest, "AuthenticateOAuthRequest", ""), contentType);
|
|
71
454
|
requestContext.setBody(serializedBody);
|
|
72
455
|
let authMethod;
|
|
73
456
|
// Apply auth methods
|
|
74
|
-
authMethod = _config.authMethods["
|
|
457
|
+
authMethod = _config.authMethods["sk"];
|
|
75
458
|
if (authMethod?.applySecurityAuthentication) {
|
|
76
459
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
77
460
|
}
|
|
@@ -82,25 +465,34 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
82
465
|
return requestContext;
|
|
83
466
|
}
|
|
84
467
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* @param
|
|
468
|
+
* The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.
|
|
469
|
+
* Retrieve player by token.
|
|
470
|
+
* @param provider OAuth provider
|
|
471
|
+
* @param oAuthRequest
|
|
88
472
|
*/
|
|
89
|
-
async
|
|
473
|
+
async verifyOAuthToken(provider, oAuthRequest, _options) {
|
|
90
474
|
let _config = _options || this.configuration;
|
|
91
|
-
// verify required parameter '
|
|
92
|
-
if (
|
|
93
|
-
throw new baseapi_1.RequiredError("AuthenticationApi", "
|
|
475
|
+
// verify required parameter 'provider' is not null or undefined
|
|
476
|
+
if (provider === null || provider === undefined) {
|
|
477
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "verifyOAuthToken", "provider");
|
|
478
|
+
}
|
|
479
|
+
// verify required parameter 'oAuthRequest' is not null or undefined
|
|
480
|
+
if (oAuthRequest === null || oAuthRequest === undefined) {
|
|
481
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "verifyOAuthToken", "oAuthRequest");
|
|
94
482
|
}
|
|
95
483
|
// Path Params
|
|
96
|
-
const localVarPath = '/iam/v1/
|
|
484
|
+
const localVarPath = '/iam/v1/oauth/{provider}/verify'
|
|
485
|
+
.replace('{' + 'provider' + '}', encodeURIComponent(String(provider)));
|
|
97
486
|
// Make Request Context
|
|
98
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.
|
|
487
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
99
488
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
100
|
-
//
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
489
|
+
// Body Params
|
|
490
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
491
|
+
"application/json"
|
|
492
|
+
]);
|
|
493
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
494
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(oAuthRequest, "OAuthRequest", ""), contentType);
|
|
495
|
+
requestContext.setBody(serializedBody);
|
|
104
496
|
let authMethod;
|
|
105
497
|
// Apply auth methods
|
|
106
498
|
authMethod = _config.authMethods["sk"];
|
|
@@ -120,10 +512,219 @@ class AuthenticationApiResponseProcessor {
|
|
|
120
512
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
121
513
|
* to the expected objects
|
|
122
514
|
*
|
|
123
|
-
* @params response Response returned by the server for a request to
|
|
515
|
+
* @params response Response returned by the server for a request to authenticateOAuth
|
|
516
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
517
|
+
*/
|
|
518
|
+
async authenticateOAuth(response) {
|
|
519
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
520
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
521
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "AuthResponse", "");
|
|
522
|
+
return body;
|
|
523
|
+
}
|
|
524
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
525
|
+
throw new exception_1.ApiException(response.httpStatusCode, "", undefined, response.headers);
|
|
526
|
+
}
|
|
527
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
528
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
529
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "AuthResponse", "");
|
|
530
|
+
return body;
|
|
531
|
+
}
|
|
532
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
536
|
+
* to the expected objects
|
|
537
|
+
*
|
|
538
|
+
* @params response Response returned by the server for a request to authenticateSIWE
|
|
539
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
540
|
+
*/
|
|
541
|
+
async authenticateSIWE(response) {
|
|
542
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
543
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
544
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "AuthResponse", "");
|
|
545
|
+
return body;
|
|
546
|
+
}
|
|
547
|
+
if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
551
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized - No active session or invalid token", undefined, response.headers);
|
|
552
|
+
}
|
|
553
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
554
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
555
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "void | AuthResponse", "");
|
|
556
|
+
return body;
|
|
557
|
+
}
|
|
558
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
562
|
+
* to the expected objects
|
|
563
|
+
*
|
|
564
|
+
* @params response Response returned by the server for a request to authorizeWithOAuthToken
|
|
565
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
566
|
+
*/
|
|
567
|
+
async authorizeWithOAuthToken(response) {
|
|
568
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
569
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
570
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "DeprecatedAuthenticatedPlayerResponse", "");
|
|
571
|
+
return body;
|
|
572
|
+
}
|
|
573
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
574
|
+
throw new exception_1.ApiException(response.httpStatusCode, "", undefined, response.headers);
|
|
575
|
+
}
|
|
576
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
577
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
578
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "DeprecatedAuthenticatedPlayerResponse", "");
|
|
579
|
+
return body;
|
|
580
|
+
}
|
|
581
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
585
|
+
* to the expected objects
|
|
586
|
+
*
|
|
587
|
+
* @params response Response returned by the server for a request to getJwks
|
|
588
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
589
|
+
*/
|
|
590
|
+
async getJwks(response) {
|
|
591
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
592
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
593
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "JwtKeyResponse", "");
|
|
594
|
+
return body;
|
|
595
|
+
}
|
|
596
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
597
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
598
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "JwtKeyResponse", "");
|
|
599
|
+
return body;
|
|
600
|
+
}
|
|
601
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
605
|
+
* to the expected objects
|
|
606
|
+
*
|
|
607
|
+
* @params response Response returned by the server for a request to initOAuth
|
|
608
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
609
|
+
*/
|
|
610
|
+
async initOAuth(response) {
|
|
611
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
612
|
+
if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
|
|
613
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetSigninUrlResponse", "");
|
|
614
|
+
return body;
|
|
615
|
+
}
|
|
616
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
617
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Api key is not valid", undefined, response.headers);
|
|
618
|
+
}
|
|
619
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
620
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
621
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "GetSigninUrlResponse", "");
|
|
622
|
+
return body;
|
|
623
|
+
}
|
|
624
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
628
|
+
* to the expected objects
|
|
629
|
+
*
|
|
630
|
+
* @params response Response returned by the server for a request to initSIWE
|
|
631
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
632
|
+
*/
|
|
633
|
+
async initSIWE(response) {
|
|
634
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
635
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
636
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "SIWEInitResponse", "");
|
|
637
|
+
return body;
|
|
638
|
+
}
|
|
639
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
640
|
+
throw new exception_1.ApiException(response.httpStatusCode, "", undefined, response.headers);
|
|
641
|
+
}
|
|
642
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
643
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
644
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "SIWEInitResponse", "");
|
|
645
|
+
return body;
|
|
646
|
+
}
|
|
647
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
651
|
+
* to the expected objects
|
|
652
|
+
*
|
|
653
|
+
* @params response Response returned by the server for a request to linkSIWE
|
|
654
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
655
|
+
*/
|
|
656
|
+
async linkSIWE(response) {
|
|
657
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
658
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
659
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "AuthPlayerResponse", "");
|
|
660
|
+
return body;
|
|
661
|
+
}
|
|
662
|
+
if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
666
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized - No active session or invalid token", undefined, response.headers);
|
|
667
|
+
}
|
|
668
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
669
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
670
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "AuthPlayerResponse | void", "");
|
|
671
|
+
return body;
|
|
672
|
+
}
|
|
673
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
677
|
+
* to the expected objects
|
|
678
|
+
*
|
|
679
|
+
* @params response Response returned by the server for a request to loginEmailPassword
|
|
680
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
681
|
+
*/
|
|
682
|
+
async loginEmailPassword(response) {
|
|
683
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
684
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
685
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "AuthResponse", "");
|
|
686
|
+
return body;
|
|
687
|
+
}
|
|
688
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
689
|
+
throw new exception_1.ApiException(response.httpStatusCode, "", undefined, response.headers);
|
|
690
|
+
}
|
|
691
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
692
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
693
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "AuthResponse", "");
|
|
694
|
+
return body;
|
|
695
|
+
}
|
|
696
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
700
|
+
* to the expected objects
|
|
701
|
+
*
|
|
702
|
+
* @params response Response returned by the server for a request to logout
|
|
703
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
704
|
+
*/
|
|
705
|
+
async logout(response) {
|
|
706
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
707
|
+
if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
|
|
708
|
+
return;
|
|
709
|
+
}
|
|
710
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
711
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized - No active session or invalid token", undefined, response.headers);
|
|
712
|
+
}
|
|
713
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
714
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
715
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "void", "");
|
|
716
|
+
return body;
|
|
717
|
+
}
|
|
718
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
722
|
+
* to the expected objects
|
|
723
|
+
*
|
|
724
|
+
* @params response Response returned by the server for a request to refresh
|
|
124
725
|
* @throws ApiException if the response code was not in [200, 299]
|
|
125
726
|
*/
|
|
126
|
-
async
|
|
727
|
+
async refresh(response) {
|
|
127
728
|
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
128
729
|
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
129
730
|
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "AuthResponse", "");
|
|
@@ -143,10 +744,10 @@ class AuthenticationApiResponseProcessor {
|
|
|
143
744
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
144
745
|
* to the expected objects
|
|
145
746
|
*
|
|
146
|
-
* @params response Response returned by the server for a request to
|
|
747
|
+
* @params response Response returned by the server for a request to signupEmailPassword
|
|
147
748
|
* @throws ApiException if the response code was not in [200, 299]
|
|
148
749
|
*/
|
|
149
|
-
async
|
|
750
|
+
async signupEmailPassword(response) {
|
|
150
751
|
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
151
752
|
if ((0, util_1.isCodeInRange)("201", response.httpStatusCode)) {
|
|
152
753
|
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "AuthResponse", "");
|
|
@@ -169,10 +770,82 @@ class AuthenticationApiResponseProcessor {
|
|
|
169
770
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
170
771
|
* to the expected objects
|
|
171
772
|
*
|
|
172
|
-
* @params response Response returned by the server for a request to
|
|
773
|
+
* @params response Response returned by the server for a request to unlinkOAuth
|
|
774
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
775
|
+
*/
|
|
776
|
+
async unlinkOAuth(response) {
|
|
777
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
778
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
779
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "AuthPlayerResponse", "");
|
|
780
|
+
return body;
|
|
781
|
+
}
|
|
782
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
783
|
+
throw new exception_1.ApiException(response.httpStatusCode, "", undefined, response.headers);
|
|
784
|
+
}
|
|
785
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
786
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
787
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "AuthPlayerResponse", "");
|
|
788
|
+
return body;
|
|
789
|
+
}
|
|
790
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
794
|
+
* to the expected objects
|
|
795
|
+
*
|
|
796
|
+
* @params response Response returned by the server for a request to unlinkSIWE
|
|
797
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
798
|
+
*/
|
|
799
|
+
async unlinkSIWE(response) {
|
|
800
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
801
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
802
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "AuthPlayerResponse", "");
|
|
803
|
+
return body;
|
|
804
|
+
}
|
|
805
|
+
if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
|
|
806
|
+
return;
|
|
807
|
+
}
|
|
808
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
809
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unauthorized - No active session or invalid token", undefined, response.headers);
|
|
810
|
+
}
|
|
811
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
812
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
813
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "AuthPlayerResponse | void", "");
|
|
814
|
+
return body;
|
|
815
|
+
}
|
|
816
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
820
|
+
* to the expected objects
|
|
821
|
+
*
|
|
822
|
+
* @params response Response returned by the server for a request to verifyOAuth
|
|
823
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
824
|
+
*/
|
|
825
|
+
async verifyOAuth(response) {
|
|
826
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
827
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
828
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "PlayerResponse", "");
|
|
829
|
+
return body;
|
|
830
|
+
}
|
|
831
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
832
|
+
throw new exception_1.ApiException(response.httpStatusCode, "", undefined, response.headers);
|
|
833
|
+
}
|
|
834
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
835
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
836
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "PlayerResponse", "");
|
|
837
|
+
return body;
|
|
838
|
+
}
|
|
839
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
843
|
+
* to the expected objects
|
|
844
|
+
*
|
|
845
|
+
* @params response Response returned by the server for a request to verifyOAuthToken
|
|
173
846
|
* @throws ApiException if the response code was not in [200, 299]
|
|
174
847
|
*/
|
|
175
|
-
async
|
|
848
|
+
async verifyOAuthToken(response) {
|
|
176
849
|
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
177
850
|
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
178
851
|
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "PlayerResponse", "");
|