-
-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathFrontendApiTests.cs
465 lines (429 loc) · 18.9 KB
/
FrontendApiTests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
/*
* Ory APIs
*
* # Introduction Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. ## SDKs This document describes the APIs available in the Ory Network. The APIs are available as SDKs for the following languages: | Language | Download SDK | Documentation | | - -- -- -- -- -- -- - | - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | | Dart | [pub.dev](https://pub.dev/packages/ory_client) | [README](https://github.com/ory/sdk/blob/master/clients/client/dart/README.md) | | .NET | [nuget.org](https://www.nuget.org/packages/Ory.Client/) | [README](https://github.com/ory/sdk/blob/master/clients/client/dotnet/README.md) | | Elixir | [hex.pm](https://hex.pm/packages/ory_client) | [README](https://github.com/ory/sdk/blob/master/clients/client/elixir/README.md) | | Go | [github.com](https://github.com/ory/client-go) | [README](https://github.com/ory/sdk/blob/master/clients/client/go/README.md) | | Java | [maven.org](https://search.maven.org/artifact/sh.ory/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/java/README.md) | | JavaScript | [npmjs.com](https://www.npmjs.com/package/@ory/client) | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript/README.md) | | JavaScript (With fetch) | [npmjs.com](https://www.npmjs.com/package/@ory/client-fetch) | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript-fetch/README.md) | | PHP | [packagist.org](https://packagist.org/packages/ory/client) | [README](https://github.com/ory/sdk/blob/master/clients/client/php/README.md) | | Python | [pypi.org](https://pypi.org/project/ory-client/) | [README](https://github.com/ory/sdk/blob/master/clients/client/python/README.md) | | Ruby | [rubygems.org](https://rubygems.org/gems/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/ruby/README.md) | | Rust | [crates.io](https://crates.io/crates/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/rust/README.md) |
*
* The version of the OpenAPI document: v1.15.11
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.IO;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reflection;
using RestSharp;
using Xunit;
using Ory.Client.Client;
using Ory.Client.Api;
// uncomment below to import models
//using Ory.Client.Model;
namespace Ory.Client.Test.Api
{
/// <summary>
/// Class for testing FrontendApi
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the API endpoint.
/// </remarks>
public class FrontendApiTests : IDisposable
{
private FrontendApi instance;
public FrontendApiTests()
{
instance = new FrontendApi();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of FrontendApi
/// </summary>
[Fact]
public void InstanceTest()
{
// TODO uncomment below to test 'IsType' FrontendApi
//Assert.IsType<FrontendApi>(instance);
}
/// <summary>
/// Test CreateBrowserLoginFlow
/// </summary>
[Fact]
public void CreateBrowserLoginFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//bool? refresh = null;
//string? aal = null;
//string? returnTo = null;
//string? cookie = null;
//string? loginChallenge = null;
//string? organization = null;
//string? via = null;
//var response = instance.CreateBrowserLoginFlow(refresh, aal, returnTo, cookie, loginChallenge, organization, via);
//Assert.IsType<ClientLoginFlow>(response);
}
/// <summary>
/// Test CreateBrowserLogoutFlow
/// </summary>
[Fact]
public void CreateBrowserLogoutFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string? cookie = null;
//string? returnTo = null;
//var response = instance.CreateBrowserLogoutFlow(cookie, returnTo);
//Assert.IsType<ClientLogoutFlow>(response);
}
/// <summary>
/// Test CreateBrowserRecoveryFlow
/// </summary>
[Fact]
public void CreateBrowserRecoveryFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string? returnTo = null;
//var response = instance.CreateBrowserRecoveryFlow(returnTo);
//Assert.IsType<ClientRecoveryFlow>(response);
}
/// <summary>
/// Test CreateBrowserRegistrationFlow
/// </summary>
[Fact]
public void CreateBrowserRegistrationFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string? returnTo = null;
//string? loginChallenge = null;
//string? afterVerificationReturnTo = null;
//string? organization = null;
//var response = instance.CreateBrowserRegistrationFlow(returnTo, loginChallenge, afterVerificationReturnTo, organization);
//Assert.IsType<ClientRegistrationFlow>(response);
}
/// <summary>
/// Test CreateBrowserSettingsFlow
/// </summary>
[Fact]
public void CreateBrowserSettingsFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string? returnTo = null;
//string? cookie = null;
//var response = instance.CreateBrowserSettingsFlow(returnTo, cookie);
//Assert.IsType<ClientSettingsFlow>(response);
}
/// <summary>
/// Test CreateBrowserVerificationFlow
/// </summary>
[Fact]
public void CreateBrowserVerificationFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string? returnTo = null;
//var response = instance.CreateBrowserVerificationFlow(returnTo);
//Assert.IsType<ClientVerificationFlow>(response);
}
/// <summary>
/// Test CreateNativeLoginFlow
/// </summary>
[Fact]
public void CreateNativeLoginFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//bool? refresh = null;
//string? aal = null;
//string? xSessionToken = null;
//bool? returnSessionTokenExchangeCode = null;
//string? returnTo = null;
//string? organization = null;
//string? via = null;
//var response = instance.CreateNativeLoginFlow(refresh, aal, xSessionToken, returnSessionTokenExchangeCode, returnTo, organization, via);
//Assert.IsType<ClientLoginFlow>(response);
}
/// <summary>
/// Test CreateNativeRecoveryFlow
/// </summary>
[Fact]
public void CreateNativeRecoveryFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//var response = instance.CreateNativeRecoveryFlow();
//Assert.IsType<ClientRecoveryFlow>(response);
}
/// <summary>
/// Test CreateNativeRegistrationFlow
/// </summary>
[Fact]
public void CreateNativeRegistrationFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//bool? returnSessionTokenExchangeCode = null;
//string? returnTo = null;
//string? organization = null;
//var response = instance.CreateNativeRegistrationFlow(returnSessionTokenExchangeCode, returnTo, organization);
//Assert.IsType<ClientRegistrationFlow>(response);
}
/// <summary>
/// Test CreateNativeSettingsFlow
/// </summary>
[Fact]
public void CreateNativeSettingsFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string? xSessionToken = null;
//var response = instance.CreateNativeSettingsFlow(xSessionToken);
//Assert.IsType<ClientSettingsFlow>(response);
}
/// <summary>
/// Test CreateNativeVerificationFlow
/// </summary>
[Fact]
public void CreateNativeVerificationFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string? returnTo = null;
//var response = instance.CreateNativeVerificationFlow(returnTo);
//Assert.IsType<ClientVerificationFlow>(response);
}
/// <summary>
/// Test DisableMyOtherSessions
/// </summary>
[Fact]
public void DisableMyOtherSessionsTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string? xSessionToken = null;
//string? cookie = null;
//var response = instance.DisableMyOtherSessions(xSessionToken, cookie);
//Assert.IsType<ClientDeleteMySessionsCount>(response);
}
/// <summary>
/// Test DisableMySession
/// </summary>
[Fact]
public void DisableMySessionTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string id = null;
//string? xSessionToken = null;
//string? cookie = null;
//instance.DisableMySession(id, xSessionToken, cookie);
}
/// <summary>
/// Test ExchangeSessionToken
/// </summary>
[Fact]
public void ExchangeSessionTokenTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string initCode = null;
//string returnToCode = null;
//var response = instance.ExchangeSessionToken(initCode, returnToCode);
//Assert.IsType<ClientSuccessfulNativeLogin>(response);
}
/// <summary>
/// Test GetFlowError
/// </summary>
[Fact]
public void GetFlowErrorTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string id = null;
//var response = instance.GetFlowError(id);
//Assert.IsType<ClientFlowError>(response);
}
/// <summary>
/// Test GetLoginFlow
/// </summary>
[Fact]
public void GetLoginFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string id = null;
//string? cookie = null;
//var response = instance.GetLoginFlow(id, cookie);
//Assert.IsType<ClientLoginFlow>(response);
}
/// <summary>
/// Test GetRecoveryFlow
/// </summary>
[Fact]
public void GetRecoveryFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string id = null;
//string? cookie = null;
//var response = instance.GetRecoveryFlow(id, cookie);
//Assert.IsType<ClientRecoveryFlow>(response);
}
/// <summary>
/// Test GetRegistrationFlow
/// </summary>
[Fact]
public void GetRegistrationFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string id = null;
//string? cookie = null;
//var response = instance.GetRegistrationFlow(id, cookie);
//Assert.IsType<ClientRegistrationFlow>(response);
}
/// <summary>
/// Test GetSettingsFlow
/// </summary>
[Fact]
public void GetSettingsFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string id = null;
//string? xSessionToken = null;
//string? cookie = null;
//var response = instance.GetSettingsFlow(id, xSessionToken, cookie);
//Assert.IsType<ClientSettingsFlow>(response);
}
/// <summary>
/// Test GetVerificationFlow
/// </summary>
[Fact]
public void GetVerificationFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string id = null;
//string? cookie = null;
//var response = instance.GetVerificationFlow(id, cookie);
//Assert.IsType<ClientVerificationFlow>(response);
}
/// <summary>
/// Test GetWebAuthnJavaScript
/// </summary>
[Fact]
public void GetWebAuthnJavaScriptTest()
{
// TODO uncomment below to test the method and replace null with proper value
//var response = instance.GetWebAuthnJavaScript();
//Assert.IsType<string>(response);
}
/// <summary>
/// Test ListMySessions
/// </summary>
[Fact]
public void ListMySessionsTest()
{
// TODO uncomment below to test the method and replace null with proper value
//long? perPage = null;
//long? page = null;
//long? pageSize = null;
//string? pageToken = null;
//string? xSessionToken = null;
//string? cookie = null;
//var response = instance.ListMySessions(perPage, page, pageSize, pageToken, xSessionToken, cookie);
//Assert.IsType<List<ClientSession>>(response);
}
/// <summary>
/// Test PerformNativeLogout
/// </summary>
[Fact]
public void PerformNativeLogoutTest()
{
// TODO uncomment below to test the method and replace null with proper value
//ClientPerformNativeLogoutBody clientPerformNativeLogoutBody = null;
//instance.PerformNativeLogout(clientPerformNativeLogoutBody);
}
/// <summary>
/// Test ToSession
/// </summary>
[Fact]
public void ToSessionTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string? xSessionToken = null;
//string? cookie = null;
//string? tokenizeAs = null;
//var response = instance.ToSession(xSessionToken, cookie, tokenizeAs);
//Assert.IsType<ClientSession>(response);
}
/// <summary>
/// Test UpdateLoginFlow
/// </summary>
[Fact]
public void UpdateLoginFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string flow = null;
//ClientUpdateLoginFlowBody clientUpdateLoginFlowBody = null;
//string? xSessionToken = null;
//string? cookie = null;
//var response = instance.UpdateLoginFlow(flow, clientUpdateLoginFlowBody, xSessionToken, cookie);
//Assert.IsType<ClientSuccessfulNativeLogin>(response);
}
/// <summary>
/// Test UpdateLogoutFlow
/// </summary>
[Fact]
public void UpdateLogoutFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string? token = null;
//string? returnTo = null;
//string? cookie = null;
//instance.UpdateLogoutFlow(token, returnTo, cookie);
}
/// <summary>
/// Test UpdateRecoveryFlow
/// </summary>
[Fact]
public void UpdateRecoveryFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string flow = null;
//ClientUpdateRecoveryFlowBody clientUpdateRecoveryFlowBody = null;
//string? token = null;
//string? cookie = null;
//var response = instance.UpdateRecoveryFlow(flow, clientUpdateRecoveryFlowBody, token, cookie);
//Assert.IsType<ClientRecoveryFlow>(response);
}
/// <summary>
/// Test UpdateRegistrationFlow
/// </summary>
[Fact]
public void UpdateRegistrationFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string flow = null;
//ClientUpdateRegistrationFlowBody clientUpdateRegistrationFlowBody = null;
//string? cookie = null;
//var response = instance.UpdateRegistrationFlow(flow, clientUpdateRegistrationFlowBody, cookie);
//Assert.IsType<ClientSuccessfulNativeRegistration>(response);
}
/// <summary>
/// Test UpdateSettingsFlow
/// </summary>
[Fact]
public void UpdateSettingsFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string flow = null;
//ClientUpdateSettingsFlowBody clientUpdateSettingsFlowBody = null;
//string? xSessionToken = null;
//string? cookie = null;
//var response = instance.UpdateSettingsFlow(flow, clientUpdateSettingsFlowBody, xSessionToken, cookie);
//Assert.IsType<ClientSettingsFlow>(response);
}
/// <summary>
/// Test UpdateVerificationFlow
/// </summary>
[Fact]
public void UpdateVerificationFlowTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string flow = null;
//ClientUpdateVerificationFlowBody clientUpdateVerificationFlowBody = null;
//string? token = null;
//string? cookie = null;
//var response = instance.UpdateVerificationFlow(flow, clientUpdateVerificationFlowBody, token, cookie);
//Assert.IsType<ClientVerificationFlow>(response);
}
}
}