@goauthentik/api 2024.10.5-1733854821 → 2024.10.5-1734022840
Sign up to get free protection for your applications and to get access to all the features.
- package/.openapi-generator/FILES +7 -0
- package/dist/apis/RbacApi.d.ts +2 -0
- package/dist/apis/RbacApi.js +2 -0
- package/dist/apis/SourcesApi.d.ts +11 -0
- package/dist/apis/SourcesApi.js +13 -1
- package/dist/apis/StagesApi.d.ts +84 -1
- package/dist/apis/StagesApi.js +265 -0
- package/dist/esm/apis/RbacApi.d.ts +2 -0
- package/dist/esm/apis/RbacApi.js +2 -0
- package/dist/esm/apis/SourcesApi.d.ts +11 -0
- package/dist/esm/apis/SourcesApi.js +12 -0
- package/dist/esm/apis/StagesApi.d.ts +84 -1
- package/dist/esm/apis/StagesApi.js +266 -1
- package/dist/esm/models/AppEnum.d.ts +1 -0
- package/dist/esm/models/AppEnum.js +1 -0
- package/dist/esm/models/AuthenticationEnum.d.ts +1 -0
- package/dist/esm/models/AuthenticationEnum.js +1 -0
- package/dist/esm/models/FlowChallengeResponseRequest.d.ts +4 -1
- package/dist/esm/models/FlowChallengeResponseRequest.js +5 -0
- package/dist/esm/models/KadminTypeEnum.d.ts +25 -0
- package/dist/esm/models/KadminTypeEnum.js +32 -0
- package/dist/esm/models/KerberosSource.d.ts +7 -0
- package/dist/esm/models/KerberosSource.js +3 -0
- package/dist/esm/models/KerberosSourceRequest.d.ts +7 -0
- package/dist/esm/models/KerberosSourceRequest.js +3 -0
- package/dist/esm/models/ModelEnum.d.ts +1 -0
- package/dist/esm/models/ModelEnum.js +1 -0
- package/dist/esm/models/PaginatedRedirectStageList.d.ts +39 -0
- package/dist/esm/models/PaginatedRedirectStageList.js +48 -0
- package/dist/esm/models/PatchedKerberosSourceRequest.d.ts +7 -0
- package/dist/esm/models/PatchedKerberosSourceRequest.js +3 -0
- package/dist/esm/models/PatchedRedirectStageRequest.d.ts +63 -0
- package/dist/esm/models/PatchedRedirectStageRequest.js +55 -0
- package/dist/esm/models/RedirectChallengeResponseRequest.d.ts +37 -0
- package/dist/esm/models/RedirectChallengeResponseRequest.js +46 -0
- package/dist/esm/models/RedirectStage.d.ts +93 -0
- package/dist/esm/models/RedirectStage.js +67 -0
- package/dist/esm/models/RedirectStageModeEnum.d.ts +24 -0
- package/dist/esm/models/RedirectStageModeEnum.js +31 -0
- package/dist/esm/models/RedirectStageRequest.d.ts +63 -0
- package/dist/esm/models/RedirectStageRequest.js +57 -0
- package/dist/esm/models/index.d.ts +7 -0
- package/dist/esm/models/index.js +7 -0
- package/dist/models/AppEnum.d.ts +1 -0
- package/dist/models/AppEnum.js +1 -0
- package/dist/models/AuthenticationEnum.d.ts +1 -0
- package/dist/models/AuthenticationEnum.js +1 -0
- package/dist/models/FlowChallengeResponseRequest.d.ts +4 -1
- package/dist/models/FlowChallengeResponseRequest.js +5 -0
- package/dist/models/KadminTypeEnum.d.ts +25 -0
- package/dist/models/KadminTypeEnum.js +38 -0
- package/dist/models/KerberosSource.d.ts +7 -0
- package/dist/models/KerberosSource.js +3 -0
- package/dist/models/KerberosSourceRequest.d.ts +7 -0
- package/dist/models/KerberosSourceRequest.js +3 -0
- package/dist/models/ModelEnum.d.ts +1 -0
- package/dist/models/ModelEnum.js +1 -0
- package/dist/models/PaginatedRedirectStageList.d.ts +39 -0
- package/dist/models/PaginatedRedirectStageList.js +55 -0
- package/dist/models/PatchedKerberosSourceRequest.d.ts +7 -0
- package/dist/models/PatchedKerberosSourceRequest.js +3 -0
- package/dist/models/PatchedRedirectStageRequest.d.ts +63 -0
- package/dist/models/PatchedRedirectStageRequest.js +62 -0
- package/dist/models/RedirectChallengeResponseRequest.d.ts +37 -0
- package/dist/models/RedirectChallengeResponseRequest.js +53 -0
- package/dist/models/RedirectStage.d.ts +93 -0
- package/dist/models/RedirectStage.js +74 -0
- package/dist/models/RedirectStageModeEnum.d.ts +24 -0
- package/dist/models/RedirectStageModeEnum.js +37 -0
- package/dist/models/RedirectStageRequest.d.ts +63 -0
- package/dist/models/RedirectStageRequest.js +64 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/package.json +1 -1
- package/src/apis/RbacApi.ts +2 -0
- package/src/apis/SourcesApi.ts +15 -0
- package/src/apis/StagesApi.ts +340 -0
- package/src/models/AppEnum.ts +1 -0
- package/src/models/AuthenticationEnum.ts +1 -0
- package/src/models/FlowChallengeResponseRequest.ts +12 -1
- package/src/models/KadminTypeEnum.ts +40 -0
- package/src/models/KerberosSource.ts +14 -0
- package/src/models/KerberosSourceRequest.ts +14 -0
- package/src/models/ModelEnum.ts +1 -0
- package/src/models/PaginatedRedirectStageList.ts +88 -0
- package/src/models/PatchedKerberosSourceRequest.ts +14 -0
- package/src/models/PatchedRedirectStageRequest.ts +118 -0
- package/src/models/RedirectChallengeResponseRequest.ts +74 -0
- package/src/models/RedirectStage.ts +160 -0
- package/src/models/RedirectStageModeEnum.ts +39 -0
- package/src/models/RedirectStageRequest.ts +120 -0
- package/src/models/index.ts +7 -0
package/src/apis/StagesApi.ts
CHANGED
@@ -67,6 +67,7 @@ import type {
|
|
67
67
|
PaginatedPasswordStageList,
|
68
68
|
PaginatedPromptList,
|
69
69
|
PaginatedPromptStageList,
|
70
|
+
PaginatedRedirectStageList,
|
70
71
|
PaginatedSourceStageList,
|
71
72
|
PaginatedStageList,
|
72
73
|
PaginatedUserDeleteStageList,
|
@@ -94,6 +95,7 @@ import type {
|
|
94
95
|
PatchedPasswordStageRequest,
|
95
96
|
PatchedPromptRequest,
|
96
97
|
PatchedPromptStageRequest,
|
98
|
+
PatchedRedirectStageRequest,
|
97
99
|
PatchedSourceStageRequest,
|
98
100
|
PatchedUserDeleteStageRequest,
|
99
101
|
PatchedUserLoginStageRequest,
|
@@ -104,6 +106,8 @@ import type {
|
|
104
106
|
PromptRequest,
|
105
107
|
PromptStage,
|
106
108
|
PromptStageRequest,
|
109
|
+
RedirectStage,
|
110
|
+
RedirectStageRequest,
|
107
111
|
SourceStage,
|
108
112
|
SourceStageRequest,
|
109
113
|
Stage,
|
@@ -226,6 +230,8 @@ import {
|
|
226
230
|
PaginatedPromptListToJSON,
|
227
231
|
PaginatedPromptStageListFromJSON,
|
228
232
|
PaginatedPromptStageListToJSON,
|
233
|
+
PaginatedRedirectStageListFromJSON,
|
234
|
+
PaginatedRedirectStageListToJSON,
|
229
235
|
PaginatedSourceStageListFromJSON,
|
230
236
|
PaginatedSourceStageListToJSON,
|
231
237
|
PaginatedStageListFromJSON,
|
@@ -280,6 +286,8 @@ import {
|
|
280
286
|
PatchedPromptRequestToJSON,
|
281
287
|
PatchedPromptStageRequestFromJSON,
|
282
288
|
PatchedPromptStageRequestToJSON,
|
289
|
+
PatchedRedirectStageRequestFromJSON,
|
290
|
+
PatchedRedirectStageRequestToJSON,
|
283
291
|
PatchedSourceStageRequestFromJSON,
|
284
292
|
PatchedSourceStageRequestToJSON,
|
285
293
|
PatchedUserDeleteStageRequestFromJSON,
|
@@ -300,6 +308,10 @@ import {
|
|
300
308
|
PromptStageToJSON,
|
301
309
|
PromptStageRequestFromJSON,
|
302
310
|
PromptStageRequestToJSON,
|
311
|
+
RedirectStageFromJSON,
|
312
|
+
RedirectStageToJSON,
|
313
|
+
RedirectStageRequestFromJSON,
|
314
|
+
RedirectStageRequestToJSON,
|
303
315
|
SourceStageFromJSON,
|
304
316
|
SourceStageToJSON,
|
305
317
|
SourceStageRequestFromJSON,
|
@@ -1074,6 +1086,40 @@ export interface StagesPromptStagesUsedByListRequest {
|
|
1074
1086
|
stageUuid: string;
|
1075
1087
|
}
|
1076
1088
|
|
1089
|
+
export interface StagesRedirectCreateRequest {
|
1090
|
+
redirectStageRequest: RedirectStageRequest;
|
1091
|
+
}
|
1092
|
+
|
1093
|
+
export interface StagesRedirectDestroyRequest {
|
1094
|
+
stageUuid: string;
|
1095
|
+
}
|
1096
|
+
|
1097
|
+
export interface StagesRedirectListRequest {
|
1098
|
+
name?: string;
|
1099
|
+
ordering?: string;
|
1100
|
+
page?: number;
|
1101
|
+
pageSize?: number;
|
1102
|
+
search?: string;
|
1103
|
+
}
|
1104
|
+
|
1105
|
+
export interface StagesRedirectPartialUpdateRequest {
|
1106
|
+
stageUuid: string;
|
1107
|
+
patchedRedirectStageRequest?: PatchedRedirectStageRequest;
|
1108
|
+
}
|
1109
|
+
|
1110
|
+
export interface StagesRedirectRetrieveRequest {
|
1111
|
+
stageUuid: string;
|
1112
|
+
}
|
1113
|
+
|
1114
|
+
export interface StagesRedirectUpdateRequest {
|
1115
|
+
stageUuid: string;
|
1116
|
+
redirectStageRequest: RedirectStageRequest;
|
1117
|
+
}
|
1118
|
+
|
1119
|
+
export interface StagesRedirectUsedByListRequest {
|
1120
|
+
stageUuid: string;
|
1121
|
+
}
|
1122
|
+
|
1077
1123
|
export interface StagesSourceCreateRequest {
|
1078
1124
|
sourceStageRequest: SourceStageRequest;
|
1079
1125
|
}
|
@@ -7396,6 +7442,300 @@ export class StagesApi extends runtime.BaseAPI {
|
|
7396
7442
|
return await response.value();
|
7397
7443
|
}
|
7398
7444
|
|
7445
|
+
/**
|
7446
|
+
* RedirectStage Viewset
|
7447
|
+
*/
|
7448
|
+
async stagesRedirectCreateRaw(requestParameters: StagesRedirectCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RedirectStage>> {
|
7449
|
+
if (requestParameters.redirectStageRequest === null || requestParameters.redirectStageRequest === undefined) {
|
7450
|
+
throw new runtime.RequiredError('redirectStageRequest','Required parameter requestParameters.redirectStageRequest was null or undefined when calling stagesRedirectCreate.');
|
7451
|
+
}
|
7452
|
+
|
7453
|
+
const queryParameters: any = {};
|
7454
|
+
|
7455
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
7456
|
+
|
7457
|
+
headerParameters['Content-Type'] = 'application/json';
|
7458
|
+
|
7459
|
+
if (this.configuration && this.configuration.accessToken) {
|
7460
|
+
const token = this.configuration.accessToken;
|
7461
|
+
const tokenString = await token("authentik", []);
|
7462
|
+
|
7463
|
+
if (tokenString) {
|
7464
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
7465
|
+
}
|
7466
|
+
}
|
7467
|
+
const response = await this.request({
|
7468
|
+
path: `/stages/redirect/`,
|
7469
|
+
method: 'POST',
|
7470
|
+
headers: headerParameters,
|
7471
|
+
query: queryParameters,
|
7472
|
+
body: RedirectStageRequestToJSON(requestParameters.redirectStageRequest),
|
7473
|
+
}, initOverrides);
|
7474
|
+
|
7475
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RedirectStageFromJSON(jsonValue));
|
7476
|
+
}
|
7477
|
+
|
7478
|
+
/**
|
7479
|
+
* RedirectStage Viewset
|
7480
|
+
*/
|
7481
|
+
async stagesRedirectCreate(requestParameters: StagesRedirectCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RedirectStage> {
|
7482
|
+
const response = await this.stagesRedirectCreateRaw(requestParameters, initOverrides);
|
7483
|
+
return await response.value();
|
7484
|
+
}
|
7485
|
+
|
7486
|
+
/**
|
7487
|
+
* RedirectStage Viewset
|
7488
|
+
*/
|
7489
|
+
async stagesRedirectDestroyRaw(requestParameters: StagesRedirectDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
7490
|
+
if (requestParameters.stageUuid === null || requestParameters.stageUuid === undefined) {
|
7491
|
+
throw new runtime.RequiredError('stageUuid','Required parameter requestParameters.stageUuid was null or undefined when calling stagesRedirectDestroy.');
|
7492
|
+
}
|
7493
|
+
|
7494
|
+
const queryParameters: any = {};
|
7495
|
+
|
7496
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
7497
|
+
|
7498
|
+
if (this.configuration && this.configuration.accessToken) {
|
7499
|
+
const token = this.configuration.accessToken;
|
7500
|
+
const tokenString = await token("authentik", []);
|
7501
|
+
|
7502
|
+
if (tokenString) {
|
7503
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
7504
|
+
}
|
7505
|
+
}
|
7506
|
+
const response = await this.request({
|
7507
|
+
path: `/stages/redirect/{stage_uuid}/`.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters.stageUuid))),
|
7508
|
+
method: 'DELETE',
|
7509
|
+
headers: headerParameters,
|
7510
|
+
query: queryParameters,
|
7511
|
+
}, initOverrides);
|
7512
|
+
|
7513
|
+
return new runtime.VoidApiResponse(response);
|
7514
|
+
}
|
7515
|
+
|
7516
|
+
/**
|
7517
|
+
* RedirectStage Viewset
|
7518
|
+
*/
|
7519
|
+
async stagesRedirectDestroy(requestParameters: StagesRedirectDestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
7520
|
+
await this.stagesRedirectDestroyRaw(requestParameters, initOverrides);
|
7521
|
+
}
|
7522
|
+
|
7523
|
+
/**
|
7524
|
+
* RedirectStage Viewset
|
7525
|
+
*/
|
7526
|
+
async stagesRedirectListRaw(requestParameters: StagesRedirectListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedRedirectStageList>> {
|
7527
|
+
const queryParameters: any = {};
|
7528
|
+
|
7529
|
+
if (requestParameters.name !== undefined) {
|
7530
|
+
queryParameters['name'] = requestParameters.name;
|
7531
|
+
}
|
7532
|
+
|
7533
|
+
if (requestParameters.ordering !== undefined) {
|
7534
|
+
queryParameters['ordering'] = requestParameters.ordering;
|
7535
|
+
}
|
7536
|
+
|
7537
|
+
if (requestParameters.page !== undefined) {
|
7538
|
+
queryParameters['page'] = requestParameters.page;
|
7539
|
+
}
|
7540
|
+
|
7541
|
+
if (requestParameters.pageSize !== undefined) {
|
7542
|
+
queryParameters['page_size'] = requestParameters.pageSize;
|
7543
|
+
}
|
7544
|
+
|
7545
|
+
if (requestParameters.search !== undefined) {
|
7546
|
+
queryParameters['search'] = requestParameters.search;
|
7547
|
+
}
|
7548
|
+
|
7549
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
7550
|
+
|
7551
|
+
if (this.configuration && this.configuration.accessToken) {
|
7552
|
+
const token = this.configuration.accessToken;
|
7553
|
+
const tokenString = await token("authentik", []);
|
7554
|
+
|
7555
|
+
if (tokenString) {
|
7556
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
7557
|
+
}
|
7558
|
+
}
|
7559
|
+
const response = await this.request({
|
7560
|
+
path: `/stages/redirect/`,
|
7561
|
+
method: 'GET',
|
7562
|
+
headers: headerParameters,
|
7563
|
+
query: queryParameters,
|
7564
|
+
}, initOverrides);
|
7565
|
+
|
7566
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedRedirectStageListFromJSON(jsonValue));
|
7567
|
+
}
|
7568
|
+
|
7569
|
+
/**
|
7570
|
+
* RedirectStage Viewset
|
7571
|
+
*/
|
7572
|
+
async stagesRedirectList(requestParameters: StagesRedirectListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedRedirectStageList> {
|
7573
|
+
const response = await this.stagesRedirectListRaw(requestParameters, initOverrides);
|
7574
|
+
return await response.value();
|
7575
|
+
}
|
7576
|
+
|
7577
|
+
/**
|
7578
|
+
* RedirectStage Viewset
|
7579
|
+
*/
|
7580
|
+
async stagesRedirectPartialUpdateRaw(requestParameters: StagesRedirectPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RedirectStage>> {
|
7581
|
+
if (requestParameters.stageUuid === null || requestParameters.stageUuid === undefined) {
|
7582
|
+
throw new runtime.RequiredError('stageUuid','Required parameter requestParameters.stageUuid was null or undefined when calling stagesRedirectPartialUpdate.');
|
7583
|
+
}
|
7584
|
+
|
7585
|
+
const queryParameters: any = {};
|
7586
|
+
|
7587
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
7588
|
+
|
7589
|
+
headerParameters['Content-Type'] = 'application/json';
|
7590
|
+
|
7591
|
+
if (this.configuration && this.configuration.accessToken) {
|
7592
|
+
const token = this.configuration.accessToken;
|
7593
|
+
const tokenString = await token("authentik", []);
|
7594
|
+
|
7595
|
+
if (tokenString) {
|
7596
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
7597
|
+
}
|
7598
|
+
}
|
7599
|
+
const response = await this.request({
|
7600
|
+
path: `/stages/redirect/{stage_uuid}/`.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters.stageUuid))),
|
7601
|
+
method: 'PATCH',
|
7602
|
+
headers: headerParameters,
|
7603
|
+
query: queryParameters,
|
7604
|
+
body: PatchedRedirectStageRequestToJSON(requestParameters.patchedRedirectStageRequest),
|
7605
|
+
}, initOverrides);
|
7606
|
+
|
7607
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RedirectStageFromJSON(jsonValue));
|
7608
|
+
}
|
7609
|
+
|
7610
|
+
/**
|
7611
|
+
* RedirectStage Viewset
|
7612
|
+
*/
|
7613
|
+
async stagesRedirectPartialUpdate(requestParameters: StagesRedirectPartialUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RedirectStage> {
|
7614
|
+
const response = await this.stagesRedirectPartialUpdateRaw(requestParameters, initOverrides);
|
7615
|
+
return await response.value();
|
7616
|
+
}
|
7617
|
+
|
7618
|
+
/**
|
7619
|
+
* RedirectStage Viewset
|
7620
|
+
*/
|
7621
|
+
async stagesRedirectRetrieveRaw(requestParameters: StagesRedirectRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RedirectStage>> {
|
7622
|
+
if (requestParameters.stageUuid === null || requestParameters.stageUuid === undefined) {
|
7623
|
+
throw new runtime.RequiredError('stageUuid','Required parameter requestParameters.stageUuid was null or undefined when calling stagesRedirectRetrieve.');
|
7624
|
+
}
|
7625
|
+
|
7626
|
+
const queryParameters: any = {};
|
7627
|
+
|
7628
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
7629
|
+
|
7630
|
+
if (this.configuration && this.configuration.accessToken) {
|
7631
|
+
const token = this.configuration.accessToken;
|
7632
|
+
const tokenString = await token("authentik", []);
|
7633
|
+
|
7634
|
+
if (tokenString) {
|
7635
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
7636
|
+
}
|
7637
|
+
}
|
7638
|
+
const response = await this.request({
|
7639
|
+
path: `/stages/redirect/{stage_uuid}/`.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters.stageUuid))),
|
7640
|
+
method: 'GET',
|
7641
|
+
headers: headerParameters,
|
7642
|
+
query: queryParameters,
|
7643
|
+
}, initOverrides);
|
7644
|
+
|
7645
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RedirectStageFromJSON(jsonValue));
|
7646
|
+
}
|
7647
|
+
|
7648
|
+
/**
|
7649
|
+
* RedirectStage Viewset
|
7650
|
+
*/
|
7651
|
+
async stagesRedirectRetrieve(requestParameters: StagesRedirectRetrieveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RedirectStage> {
|
7652
|
+
const response = await this.stagesRedirectRetrieveRaw(requestParameters, initOverrides);
|
7653
|
+
return await response.value();
|
7654
|
+
}
|
7655
|
+
|
7656
|
+
/**
|
7657
|
+
* RedirectStage Viewset
|
7658
|
+
*/
|
7659
|
+
async stagesRedirectUpdateRaw(requestParameters: StagesRedirectUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RedirectStage>> {
|
7660
|
+
if (requestParameters.stageUuid === null || requestParameters.stageUuid === undefined) {
|
7661
|
+
throw new runtime.RequiredError('stageUuid','Required parameter requestParameters.stageUuid was null or undefined when calling stagesRedirectUpdate.');
|
7662
|
+
}
|
7663
|
+
|
7664
|
+
if (requestParameters.redirectStageRequest === null || requestParameters.redirectStageRequest === undefined) {
|
7665
|
+
throw new runtime.RequiredError('redirectStageRequest','Required parameter requestParameters.redirectStageRequest was null or undefined when calling stagesRedirectUpdate.');
|
7666
|
+
}
|
7667
|
+
|
7668
|
+
const queryParameters: any = {};
|
7669
|
+
|
7670
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
7671
|
+
|
7672
|
+
headerParameters['Content-Type'] = 'application/json';
|
7673
|
+
|
7674
|
+
if (this.configuration && this.configuration.accessToken) {
|
7675
|
+
const token = this.configuration.accessToken;
|
7676
|
+
const tokenString = await token("authentik", []);
|
7677
|
+
|
7678
|
+
if (tokenString) {
|
7679
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
7680
|
+
}
|
7681
|
+
}
|
7682
|
+
const response = await this.request({
|
7683
|
+
path: `/stages/redirect/{stage_uuid}/`.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters.stageUuid))),
|
7684
|
+
method: 'PUT',
|
7685
|
+
headers: headerParameters,
|
7686
|
+
query: queryParameters,
|
7687
|
+
body: RedirectStageRequestToJSON(requestParameters.redirectStageRequest),
|
7688
|
+
}, initOverrides);
|
7689
|
+
|
7690
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RedirectStageFromJSON(jsonValue));
|
7691
|
+
}
|
7692
|
+
|
7693
|
+
/**
|
7694
|
+
* RedirectStage Viewset
|
7695
|
+
*/
|
7696
|
+
async stagesRedirectUpdate(requestParameters: StagesRedirectUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RedirectStage> {
|
7697
|
+
const response = await this.stagesRedirectUpdateRaw(requestParameters, initOverrides);
|
7698
|
+
return await response.value();
|
7699
|
+
}
|
7700
|
+
|
7701
|
+
/**
|
7702
|
+
* Get a list of all objects that use this object
|
7703
|
+
*/
|
7704
|
+
async stagesRedirectUsedByListRaw(requestParameters: StagesRedirectUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UsedBy>>> {
|
7705
|
+
if (requestParameters.stageUuid === null || requestParameters.stageUuid === undefined) {
|
7706
|
+
throw new runtime.RequiredError('stageUuid','Required parameter requestParameters.stageUuid was null or undefined when calling stagesRedirectUsedByList.');
|
7707
|
+
}
|
7708
|
+
|
7709
|
+
const queryParameters: any = {};
|
7710
|
+
|
7711
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
7712
|
+
|
7713
|
+
if (this.configuration && this.configuration.accessToken) {
|
7714
|
+
const token = this.configuration.accessToken;
|
7715
|
+
const tokenString = await token("authentik", []);
|
7716
|
+
|
7717
|
+
if (tokenString) {
|
7718
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
7719
|
+
}
|
7720
|
+
}
|
7721
|
+
const response = await this.request({
|
7722
|
+
path: `/stages/redirect/{stage_uuid}/used_by/`.replace(`{${"stage_uuid"}}`, encodeURIComponent(String(requestParameters.stageUuid))),
|
7723
|
+
method: 'GET',
|
7724
|
+
headers: headerParameters,
|
7725
|
+
query: queryParameters,
|
7726
|
+
}, initOverrides);
|
7727
|
+
|
7728
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UsedByFromJSON));
|
7729
|
+
}
|
7730
|
+
|
7731
|
+
/**
|
7732
|
+
* Get a list of all objects that use this object
|
7733
|
+
*/
|
7734
|
+
async stagesRedirectUsedByList(requestParameters: StagesRedirectUsedByListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UsedBy>> {
|
7735
|
+
const response = await this.stagesRedirectUsedByListRaw(requestParameters, initOverrides);
|
7736
|
+
return await response.value();
|
7737
|
+
}
|
7738
|
+
|
7399
7739
|
/**
|
7400
7740
|
* SourceStage Viewset
|
7401
7741
|
*/
|
package/src/models/AppEnum.ts
CHANGED
@@ -62,6 +62,7 @@ export const AppEnum = {
|
|
62
62
|
StagesInvitation: 'authentik.stages.invitation',
|
63
63
|
StagesPassword: 'authentik.stages.password',
|
64
64
|
StagesPrompt: 'authentik.stages.prompt',
|
65
|
+
StagesRedirect: 'authentik.stages.redirect',
|
65
66
|
StagesUserDelete: 'authentik.stages.user_delete',
|
66
67
|
StagesUserLogin: 'authentik.stages.user_login',
|
67
68
|
StagesUserLogout: 'authentik.stages.user_logout',
|
@@ -22,6 +22,7 @@ export const AuthenticationEnum = {
|
|
22
22
|
RequireAuthenticated: 'require_authenticated',
|
23
23
|
RequireUnauthenticated: 'require_unauthenticated',
|
24
24
|
RequireSuperuser: 'require_superuser',
|
25
|
+
RequireRedirect: 'require_redirect',
|
25
26
|
RequireOutpost: 'require_outpost',
|
26
27
|
UnknownDefaultOpenApi: '11184809'
|
27
28
|
} as const;
|
@@ -145,6 +145,13 @@ import {
|
|
145
145
|
PromptChallengeResponseRequestFromJSONTyped,
|
146
146
|
PromptChallengeResponseRequestToJSON,
|
147
147
|
} from './PromptChallengeResponseRequest';
|
148
|
+
import {
|
149
|
+
RedirectChallengeResponseRequest,
|
150
|
+
instanceOfRedirectChallengeResponseRequest,
|
151
|
+
RedirectChallengeResponseRequestFromJSON,
|
152
|
+
RedirectChallengeResponseRequestFromJSONTyped,
|
153
|
+
RedirectChallengeResponseRequestToJSON,
|
154
|
+
} from './RedirectChallengeResponseRequest';
|
148
155
|
import {
|
149
156
|
UserLoginChallengeResponseRequest,
|
150
157
|
instanceOfUserLoginChallengeResponseRequest,
|
@@ -158,7 +165,7 @@ import {
|
|
158
165
|
*
|
159
166
|
* @export
|
160
167
|
*/
|
161
|
-
export type FlowChallengeResponseRequest = { component: 'ak-provider-oauth2-device-code' } & OAuthDeviceCodeChallengeResponseRequest | { component: 'ak-provider-oauth2-device-code-finish' } & OAuthDeviceCodeFinishChallengeResponseRequest | { component: 'ak-source-oauth-apple' } & AppleChallengeResponseRequest | { component: 'ak-source-plex' } & PlexAuthenticationChallengeResponseRequest | { component: 'ak-stage-authenticator-duo' } & AuthenticatorDuoChallengeResponseRequest | { component: 'ak-stage-authenticator-sms' } & AuthenticatorSMSChallengeResponseRequest | { component: 'ak-stage-authenticator-static' } & AuthenticatorStaticChallengeResponseRequest | { component: 'ak-stage-authenticator-totp' } & AuthenticatorTOTPChallengeResponseRequest | { component: 'ak-stage-authenticator-validate' } & AuthenticatorValidationChallengeResponseRequest | { component: 'ak-stage-authenticator-webauthn' } & AuthenticatorWebAuthnChallengeResponseRequest | { component: 'ak-stage-autosubmit' } & AutoSubmitChallengeResponseRequest | { component: 'ak-stage-captcha' } & CaptchaChallengeResponseRequest | { component: 'ak-stage-consent' } & ConsentChallengeResponseRequest | { component: 'ak-stage-dummy' } & DummyChallengeResponseRequest | { component: 'ak-stage-email' } & EmailChallengeResponseRequest | { component: 'ak-stage-identification' } & IdentificationChallengeResponseRequest | { component: 'ak-stage-password' } & PasswordChallengeResponseRequest | { component: 'ak-stage-prompt' } & PromptChallengeResponseRequest | { component: 'ak-stage-user-login' } & UserLoginChallengeResponseRequest | { component: 'xak-flow-frame' } & FrameChallengeResponseRequest;
|
168
|
+
export type FlowChallengeResponseRequest = { component: 'ak-provider-oauth2-device-code' } & OAuthDeviceCodeChallengeResponseRequest | { component: 'ak-provider-oauth2-device-code-finish' } & OAuthDeviceCodeFinishChallengeResponseRequest | { component: 'ak-source-oauth-apple' } & AppleChallengeResponseRequest | { component: 'ak-source-plex' } & PlexAuthenticationChallengeResponseRequest | { component: 'ak-stage-authenticator-duo' } & AuthenticatorDuoChallengeResponseRequest | { component: 'ak-stage-authenticator-sms' } & AuthenticatorSMSChallengeResponseRequest | { component: 'ak-stage-authenticator-static' } & AuthenticatorStaticChallengeResponseRequest | { component: 'ak-stage-authenticator-totp' } & AuthenticatorTOTPChallengeResponseRequest | { component: 'ak-stage-authenticator-validate' } & AuthenticatorValidationChallengeResponseRequest | { component: 'ak-stage-authenticator-webauthn' } & AuthenticatorWebAuthnChallengeResponseRequest | { component: 'ak-stage-autosubmit' } & AutoSubmitChallengeResponseRequest | { component: 'ak-stage-captcha' } & CaptchaChallengeResponseRequest | { component: 'ak-stage-consent' } & ConsentChallengeResponseRequest | { component: 'ak-stage-dummy' } & DummyChallengeResponseRequest | { component: 'ak-stage-email' } & EmailChallengeResponseRequest | { component: 'ak-stage-identification' } & IdentificationChallengeResponseRequest | { component: 'ak-stage-password' } & PasswordChallengeResponseRequest | { component: 'ak-stage-prompt' } & PromptChallengeResponseRequest | { component: 'ak-stage-user-login' } & UserLoginChallengeResponseRequest | { component: 'xak-flow-frame' } & FrameChallengeResponseRequest | { component: 'xak-flow-redirect' } & RedirectChallengeResponseRequest;
|
162
169
|
|
163
170
|
export function FlowChallengeResponseRequestFromJSON(json: any): FlowChallengeResponseRequest {
|
164
171
|
return FlowChallengeResponseRequestFromJSONTyped(json, false);
|
@@ -209,6 +216,8 @@ export function FlowChallengeResponseRequestFromJSONTyped(json: any, ignoreDiscr
|
|
209
216
|
return {...UserLoginChallengeResponseRequestFromJSONTyped(json, true), component: 'ak-stage-user-login'};
|
210
217
|
case 'xak-flow-frame':
|
211
218
|
return {...FrameChallengeResponseRequestFromJSONTyped(json, true), component: 'xak-flow-frame'};
|
219
|
+
case 'xak-flow-redirect':
|
220
|
+
return {...RedirectChallengeResponseRequestFromJSONTyped(json, true), component: 'xak-flow-redirect'};
|
212
221
|
default:
|
213
222
|
throw new Error(`No variant of FlowChallengeResponseRequest exists with 'component=${json['component']}'`);
|
214
223
|
}
|
@@ -262,6 +271,8 @@ export function FlowChallengeResponseRequestToJSON(value?: FlowChallengeResponse
|
|
262
271
|
return UserLoginChallengeResponseRequestToJSON(value);
|
263
272
|
case 'xak-flow-frame':
|
264
273
|
return FrameChallengeResponseRequestToJSON(value);
|
274
|
+
case 'xak-flow-redirect':
|
275
|
+
return RedirectChallengeResponseRequestToJSON(value);
|
265
276
|
default:
|
266
277
|
throw new Error(`No variant of FlowChallengeResponseRequest exists with 'component=${value['component']}'`);
|
267
278
|
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
/* tslint:disable */
|
2
|
+
/* eslint-disable */
|
3
|
+
/**
|
4
|
+
* authentik
|
5
|
+
* Making authentication simple.
|
6
|
+
*
|
7
|
+
* The version of the OpenAPI document: 2024.10.5
|
8
|
+
* Contact: hello@goauthentik.io
|
9
|
+
*
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
11
|
+
* https://openapi-generator.tech
|
12
|
+
* Do not edit the class manually.
|
13
|
+
*/
|
14
|
+
|
15
|
+
|
16
|
+
/**
|
17
|
+
*
|
18
|
+
* @export
|
19
|
+
*/
|
20
|
+
export const KadminTypeEnum = {
|
21
|
+
Mit: 'MIT',
|
22
|
+
Heimdal: 'Heimdal',
|
23
|
+
Other: 'other',
|
24
|
+
UnknownDefaultOpenApi: '11184809'
|
25
|
+
} as const;
|
26
|
+
export type KadminTypeEnum = typeof KadminTypeEnum[keyof typeof KadminTypeEnum];
|
27
|
+
|
28
|
+
|
29
|
+
export function KadminTypeEnumFromJSON(json: any): KadminTypeEnum {
|
30
|
+
return KadminTypeEnumFromJSONTyped(json, false);
|
31
|
+
}
|
32
|
+
|
33
|
+
export function KadminTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): KadminTypeEnum {
|
34
|
+
return json as KadminTypeEnum;
|
35
|
+
}
|
36
|
+
|
37
|
+
export function KadminTypeEnumToJSON(value?: KadminTypeEnum | null): any {
|
38
|
+
return value as any;
|
39
|
+
}
|
40
|
+
|
@@ -19,6 +19,12 @@ import {
|
|
19
19
|
GroupMatchingModeEnumFromJSONTyped,
|
20
20
|
GroupMatchingModeEnumToJSON,
|
21
21
|
} from './GroupMatchingModeEnum';
|
22
|
+
import type { KadminTypeEnum } from './KadminTypeEnum';
|
23
|
+
import {
|
24
|
+
KadminTypeEnumFromJSON,
|
25
|
+
KadminTypeEnumFromJSONTyped,
|
26
|
+
KadminTypeEnumToJSON,
|
27
|
+
} from './KadminTypeEnum';
|
22
28
|
import type { PolicyEngineMode } from './PolicyEngineMode';
|
23
29
|
import {
|
24
30
|
PolicyEngineModeFromJSON,
|
@@ -158,6 +164,12 @@ export interface KerberosSource {
|
|
158
164
|
* @memberof KerberosSource
|
159
165
|
*/
|
160
166
|
krb5Conf?: string;
|
167
|
+
/**
|
168
|
+
*
|
169
|
+
* @type {KadminTypeEnum}
|
170
|
+
* @memberof KerberosSource
|
171
|
+
*/
|
172
|
+
kadminType?: KadminTypeEnum;
|
161
173
|
/**
|
162
174
|
* Sync users from Kerberos into authentik
|
163
175
|
* @type {boolean}
|
@@ -258,6 +270,7 @@ export function KerberosSourceFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
258
270
|
'groupMatchingMode': !exists(json, 'group_matching_mode') ? undefined : GroupMatchingModeEnumFromJSON(json['group_matching_mode']),
|
259
271
|
'realm': json['realm'],
|
260
272
|
'krb5Conf': !exists(json, 'krb5_conf') ? undefined : json['krb5_conf'],
|
273
|
+
'kadminType': !exists(json, 'kadmin_type') ? undefined : KadminTypeEnumFromJSON(json['kadmin_type']),
|
261
274
|
'syncUsers': !exists(json, 'sync_users') ? undefined : json['sync_users'],
|
262
275
|
'syncUsersPassword': !exists(json, 'sync_users_password') ? undefined : json['sync_users_password'],
|
263
276
|
'syncPrincipal': !exists(json, 'sync_principal') ? undefined : json['sync_principal'],
|
@@ -291,6 +304,7 @@ export function KerberosSourceToJSON(value?: KerberosSource | null): any {
|
|
291
304
|
'group_matching_mode': GroupMatchingModeEnumToJSON(value.groupMatchingMode),
|
292
305
|
'realm': value.realm,
|
293
306
|
'krb5_conf': value.krb5Conf,
|
307
|
+
'kadmin_type': KadminTypeEnumToJSON(value.kadminType),
|
294
308
|
'sync_users': value.syncUsers,
|
295
309
|
'sync_users_password': value.syncUsersPassword,
|
296
310
|
'sync_principal': value.syncPrincipal,
|
@@ -19,6 +19,12 @@ import {
|
|
19
19
|
GroupMatchingModeEnumFromJSONTyped,
|
20
20
|
GroupMatchingModeEnumToJSON,
|
21
21
|
} from './GroupMatchingModeEnum';
|
22
|
+
import type { KadminTypeEnum } from './KadminTypeEnum';
|
23
|
+
import {
|
24
|
+
KadminTypeEnumFromJSON,
|
25
|
+
KadminTypeEnumFromJSONTyped,
|
26
|
+
KadminTypeEnumToJSON,
|
27
|
+
} from './KadminTypeEnum';
|
22
28
|
import type { PolicyEngineMode } from './PolicyEngineMode';
|
23
29
|
import {
|
24
30
|
PolicyEngineModeFromJSON,
|
@@ -116,6 +122,12 @@ export interface KerberosSourceRequest {
|
|
116
122
|
* @memberof KerberosSourceRequest
|
117
123
|
*/
|
118
124
|
krb5Conf?: string;
|
125
|
+
/**
|
126
|
+
*
|
127
|
+
* @type {KadminTypeEnum}
|
128
|
+
* @memberof KerberosSourceRequest
|
129
|
+
*/
|
130
|
+
kadminType?: KadminTypeEnum;
|
119
131
|
/**
|
120
132
|
* Sync users from Kerberos into authentik
|
121
133
|
* @type {boolean}
|
@@ -213,6 +225,7 @@ export function KerberosSourceRequestFromJSONTyped(json: any, ignoreDiscriminato
|
|
213
225
|
'groupMatchingMode': !exists(json, 'group_matching_mode') ? undefined : GroupMatchingModeEnumFromJSON(json['group_matching_mode']),
|
214
226
|
'realm': json['realm'],
|
215
227
|
'krb5Conf': !exists(json, 'krb5_conf') ? undefined : json['krb5_conf'],
|
228
|
+
'kadminType': !exists(json, 'kadmin_type') ? undefined : KadminTypeEnumFromJSON(json['kadmin_type']),
|
216
229
|
'syncUsers': !exists(json, 'sync_users') ? undefined : json['sync_users'],
|
217
230
|
'syncUsersPassword': !exists(json, 'sync_users_password') ? undefined : json['sync_users_password'],
|
218
231
|
'syncPrincipal': !exists(json, 'sync_principal') ? undefined : json['sync_principal'],
|
@@ -248,6 +261,7 @@ export function KerberosSourceRequestToJSON(value?: KerberosSourceRequest | null
|
|
248
261
|
'group_matching_mode': GroupMatchingModeEnumToJSON(value.groupMatchingMode),
|
249
262
|
'realm': value.realm,
|
250
263
|
'krb5_conf': value.krb5Conf,
|
264
|
+
'kadmin_type': KadminTypeEnumToJSON(value.kadminType),
|
251
265
|
'sync_users': value.syncUsers,
|
252
266
|
'sync_users_password': value.syncUsersPassword,
|
253
267
|
'sync_principal': value.syncPrincipal,
|
package/src/models/ModelEnum.ts
CHANGED
@@ -87,6 +87,7 @@ export const ModelEnum = {
|
|
87
87
|
StagesPasswordPasswordstage: 'authentik_stages_password.passwordstage',
|
88
88
|
StagesPromptPrompt: 'authentik_stages_prompt.prompt',
|
89
89
|
StagesPromptPromptstage: 'authentik_stages_prompt.promptstage',
|
90
|
+
StagesRedirectRedirectstage: 'authentik_stages_redirect.redirectstage',
|
90
91
|
StagesUserDeleteUserdeletestage: 'authentik_stages_user_delete.userdeletestage',
|
91
92
|
StagesUserLoginUserloginstage: 'authentik_stages_user_login.userloginstage',
|
92
93
|
StagesUserLogoutUserlogoutstage: 'authentik_stages_user_logout.userlogoutstage',
|
@@ -0,0 +1,88 @@
|
|
1
|
+
/* tslint:disable */
|
2
|
+
/* eslint-disable */
|
3
|
+
/**
|
4
|
+
* authentik
|
5
|
+
* Making authentication simple.
|
6
|
+
*
|
7
|
+
* The version of the OpenAPI document: 2024.10.5
|
8
|
+
* Contact: hello@goauthentik.io
|
9
|
+
*
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
11
|
+
* https://openapi-generator.tech
|
12
|
+
* Do not edit the class manually.
|
13
|
+
*/
|
14
|
+
|
15
|
+
import { exists, mapValues } from '../runtime';
|
16
|
+
import type { Pagination } from './Pagination';
|
17
|
+
import {
|
18
|
+
PaginationFromJSON,
|
19
|
+
PaginationFromJSONTyped,
|
20
|
+
PaginationToJSON,
|
21
|
+
} from './Pagination';
|
22
|
+
import type { RedirectStage } from './RedirectStage';
|
23
|
+
import {
|
24
|
+
RedirectStageFromJSON,
|
25
|
+
RedirectStageFromJSONTyped,
|
26
|
+
RedirectStageToJSON,
|
27
|
+
} from './RedirectStage';
|
28
|
+
|
29
|
+
/**
|
30
|
+
*
|
31
|
+
* @export
|
32
|
+
* @interface PaginatedRedirectStageList
|
33
|
+
*/
|
34
|
+
export interface PaginatedRedirectStageList {
|
35
|
+
/**
|
36
|
+
*
|
37
|
+
* @type {Pagination}
|
38
|
+
* @memberof PaginatedRedirectStageList
|
39
|
+
*/
|
40
|
+
pagination: Pagination;
|
41
|
+
/**
|
42
|
+
*
|
43
|
+
* @type {Array<RedirectStage>}
|
44
|
+
* @memberof PaginatedRedirectStageList
|
45
|
+
*/
|
46
|
+
results: Array<RedirectStage>;
|
47
|
+
}
|
48
|
+
|
49
|
+
/**
|
50
|
+
* Check if a given object implements the PaginatedRedirectStageList interface.
|
51
|
+
*/
|
52
|
+
export function instanceOfPaginatedRedirectStageList(value: object): boolean {
|
53
|
+
let isInstance = true;
|
54
|
+
isInstance = isInstance && "pagination" in value;
|
55
|
+
isInstance = isInstance && "results" in value;
|
56
|
+
|
57
|
+
return isInstance;
|
58
|
+
}
|
59
|
+
|
60
|
+
export function PaginatedRedirectStageListFromJSON(json: any): PaginatedRedirectStageList {
|
61
|
+
return PaginatedRedirectStageListFromJSONTyped(json, false);
|
62
|
+
}
|
63
|
+
|
64
|
+
export function PaginatedRedirectStageListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedRedirectStageList {
|
65
|
+
if ((json === undefined) || (json === null)) {
|
66
|
+
return json;
|
67
|
+
}
|
68
|
+
return {
|
69
|
+
|
70
|
+
'pagination': PaginationFromJSON(json['pagination']),
|
71
|
+
'results': ((json['results'] as Array<any>).map(RedirectStageFromJSON)),
|
72
|
+
};
|
73
|
+
}
|
74
|
+
|
75
|
+
export function PaginatedRedirectStageListToJSON(value?: PaginatedRedirectStageList | null): any {
|
76
|
+
if (value === undefined) {
|
77
|
+
return undefined;
|
78
|
+
}
|
79
|
+
if (value === null) {
|
80
|
+
return null;
|
81
|
+
}
|
82
|
+
return {
|
83
|
+
|
84
|
+
'pagination': PaginationToJSON(value.pagination),
|
85
|
+
'results': ((value.results as Array<any>).map(RedirectStageToJSON)),
|
86
|
+
};
|
87
|
+
}
|
88
|
+
|