Files
auth/backend/keycloak/kc-client/apis/AuthenticationManagementApi.ts
2022-09-05 17:02:45 +02:00

1607 lines
74 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* tslint:disable */
/* eslint-disable */
/**
* Keycloak Admin REST API
* This is a REST API reference for the Keycloak Admin
*
* The version of the OpenAPI document: 1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from '../runtime';
import {
AuthenticationExecutionInfoRepresentation,
AuthenticationExecutionInfoRepresentationFromJSON,
AuthenticationExecutionInfoRepresentationToJSON,
AuthenticationExecutionRepresentation,
AuthenticationExecutionRepresentationFromJSON,
AuthenticationExecutionRepresentationToJSON,
AuthenticationFlowRepresentation,
AuthenticationFlowRepresentationFromJSON,
AuthenticationFlowRepresentationToJSON,
AuthenticatorConfigInfoRepresentation,
AuthenticatorConfigInfoRepresentationFromJSON,
AuthenticatorConfigInfoRepresentationToJSON,
AuthenticatorConfigRepresentation,
AuthenticatorConfigRepresentationFromJSON,
AuthenticatorConfigRepresentationToJSON,
RequiredActionProviderRepresentation,
RequiredActionProviderRepresentationFromJSON,
RequiredActionProviderRepresentationToJSON,
} from '../models';
export interface RealmAuthenticationAuthenticatorProvidersGetRequest {
realm: string;
}
export interface RealmAuthenticationClientAuthenticatorProvidersGetRequest {
realm: string;
}
export interface RealmAuthenticationConfigDescriptionProviderIdGetRequest {
realm: string;
providerId: string;
}
export interface RealmAuthenticationConfigIdDeleteRequest {
realm: string;
id: string;
}
export interface RealmAuthenticationConfigIdGetRequest {
realm: string;
id: string;
}
export interface RealmAuthenticationConfigIdPutRequest {
realm: string;
id: string;
authenticatorConfigRepresentation: AuthenticatorConfigRepresentation;
}
export interface RealmAuthenticationExecutionsExecutionIdConfigPostRequest {
realm: string;
executionId: string;
authenticatorConfigRepresentation: AuthenticatorConfigRepresentation;
}
export interface RealmAuthenticationExecutionsExecutionIdDeleteRequest {
realm: string;
executionId: string;
}
export interface RealmAuthenticationExecutionsExecutionIdGetRequest {
realm: string;
executionId: string;
}
export interface RealmAuthenticationExecutionsExecutionIdLowerPriorityPostRequest {
realm: string;
executionId: string;
}
export interface RealmAuthenticationExecutionsExecutionIdRaisePriorityPostRequest {
realm: string;
executionId: string;
}
export interface RealmAuthenticationExecutionsPostRequest {
realm: string;
authenticationExecutionRepresentation: AuthenticationExecutionRepresentation;
}
export interface RealmAuthenticationFlowsFlowAliasCopyPostRequest {
realm: string;
flowAlias: string;
requestBody: { [key: string]: object; };
}
export interface RealmAuthenticationFlowsFlowAliasExecutionsExecutionPostRequest {
realm: string;
flowAlias: string;
requestBody: { [key: string]: object; };
}
export interface RealmAuthenticationFlowsFlowAliasExecutionsFlowPostRequest {
realm: string;
flowAlias: string;
requestBody: { [key: string]: object; };
}
export interface RealmAuthenticationFlowsFlowAliasExecutionsGetRequest {
realm: string;
flowAlias: string;
}
export interface RealmAuthenticationFlowsFlowAliasExecutionsPutRequest {
realm: string;
flowAlias: string;
authenticationExecutionInfoRepresentation: AuthenticationExecutionInfoRepresentation;
}
export interface RealmAuthenticationFlowsGetRequest {
realm: string;
}
export interface RealmAuthenticationFlowsIdDeleteRequest {
realm: string;
id: string;
}
export interface RealmAuthenticationFlowsIdGetRequest {
realm: string;
id: string;
}
export interface RealmAuthenticationFlowsIdPutRequest {
realm: string;
id: string;
authenticationFlowRepresentation: AuthenticationFlowRepresentation;
}
export interface RealmAuthenticationFlowsPostRequest {
realm: string;
authenticationFlowRepresentation: AuthenticationFlowRepresentation;
}
export interface RealmAuthenticationFormActionProvidersGetRequest {
realm: string;
}
export interface RealmAuthenticationFormProvidersGetRequest {
realm: string;
}
export interface RealmAuthenticationPerClientConfigDescriptionGetRequest {
realm: string;
}
export interface RealmAuthenticationRegisterRequiredActionPostRequest {
realm: string;
requestBody: { [key: string]: object; };
}
export interface RealmAuthenticationRequiredActionsAliasDeleteRequest {
realm: string;
alias: string;
}
export interface RealmAuthenticationRequiredActionsAliasGetRequest {
realm: string;
alias: string;
}
export interface RealmAuthenticationRequiredActionsAliasLowerPriorityPostRequest {
realm: string;
alias: string;
}
export interface RealmAuthenticationRequiredActionsAliasPutRequest {
realm: string;
alias: string;
requiredActionProviderRepresentation: RequiredActionProviderRepresentation;
}
export interface RealmAuthenticationRequiredActionsAliasRaisePriorityPostRequest {
realm: string;
alias: string;
}
export interface RealmAuthenticationRequiredActionsGetRequest {
realm: string;
}
export interface RealmAuthenticationUnregisteredRequiredActionsGetRequest {
realm: string;
}
/**
*
*/
export class AuthenticationManagementApi extends runtime.BaseAPI {
/**
* Get authenticator providers Returns a stream of authenticator providers.
*/
async realmAuthenticationAuthenticatorProvidersGetRaw(requestParameters: RealmAuthenticationAuthenticatorProvidersGetRequest): Promise<runtime.ApiResponse<Array<{ [key: string]: object; }>>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationAuthenticatorProvidersGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/authenticator-providers`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get authenticator providers Returns a stream of authenticator providers.
*/
async realmAuthenticationAuthenticatorProvidersGet(requestParameters: RealmAuthenticationAuthenticatorProvidersGetRequest): Promise<Array<{ [key: string]: object; }>> {
const response = await this.realmAuthenticationAuthenticatorProvidersGetRaw(requestParameters);
return await response.value();
}
/**
* Get client authenticator providers Returns a stream of client authenticator providers.
*/
async realmAuthenticationClientAuthenticatorProvidersGetRaw(requestParameters: RealmAuthenticationClientAuthenticatorProvidersGetRequest): Promise<runtime.ApiResponse<Array<{ [key: string]: object; }>>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationClientAuthenticatorProvidersGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/client-authenticator-providers`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get client authenticator providers Returns a stream of client authenticator providers.
*/
async realmAuthenticationClientAuthenticatorProvidersGet(requestParameters: RealmAuthenticationClientAuthenticatorProvidersGetRequest): Promise<Array<{ [key: string]: object; }>> {
const response = await this.realmAuthenticationClientAuthenticatorProvidersGetRaw(requestParameters);
return await response.value();
}
/**
* Get authenticator providers configuration description
*/
async realmAuthenticationConfigDescriptionProviderIdGetRaw(requestParameters: RealmAuthenticationConfigDescriptionProviderIdGetRequest): Promise<runtime.ApiResponse<AuthenticatorConfigInfoRepresentation>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationConfigDescriptionProviderIdGet.');
}
if (requestParameters.providerId === null || requestParameters.providerId === undefined) {
throw new runtime.RequiredError('providerId','Required parameter requestParameters.providerId was null or undefined when calling realmAuthenticationConfigDescriptionProviderIdGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/config-description/{providerId}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"providerId"}}`, encodeURIComponent(String(requestParameters.providerId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorConfigInfoRepresentationFromJSON(jsonValue));
}
/**
* Get authenticator providers configuration description
*/
async realmAuthenticationConfigDescriptionProviderIdGet(requestParameters: RealmAuthenticationConfigDescriptionProviderIdGetRequest): Promise<AuthenticatorConfigInfoRepresentation> {
const response = await this.realmAuthenticationConfigDescriptionProviderIdGetRaw(requestParameters);
return await response.value();
}
/**
* Delete authenticator configuration
*/
async realmAuthenticationConfigIdDeleteRaw(requestParameters: RealmAuthenticationConfigIdDeleteRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationConfigIdDelete.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmAuthenticationConfigIdDelete.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/config/{id}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
});
return new runtime.VoidApiResponse(response);
}
/**
* Delete authenticator configuration
*/
async realmAuthenticationConfigIdDelete(requestParameters: RealmAuthenticationConfigIdDeleteRequest): Promise<void> {
await this.realmAuthenticationConfigIdDeleteRaw(requestParameters);
}
/**
* Get authenticator configuration
*/
async realmAuthenticationConfigIdGetRaw(requestParameters: RealmAuthenticationConfigIdGetRequest): Promise<runtime.ApiResponse<AuthenticatorConfigRepresentation>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationConfigIdGet.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmAuthenticationConfigIdGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/config/{id}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticatorConfigRepresentationFromJSON(jsonValue));
}
/**
* Get authenticator configuration
*/
async realmAuthenticationConfigIdGet(requestParameters: RealmAuthenticationConfigIdGetRequest): Promise<AuthenticatorConfigRepresentation> {
const response = await this.realmAuthenticationConfigIdGetRaw(requestParameters);
return await response.value();
}
/**
* Update authenticator configuration
*/
async realmAuthenticationConfigIdPutRaw(requestParameters: RealmAuthenticationConfigIdPutRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationConfigIdPut.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmAuthenticationConfigIdPut.');
}
if (requestParameters.authenticatorConfigRepresentation === null || requestParameters.authenticatorConfigRepresentation === undefined) {
throw new runtime.RequiredError('authenticatorConfigRepresentation','Required parameter requestParameters.authenticatorConfigRepresentation was null or undefined when calling realmAuthenticationConfigIdPut.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/config/{id}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: AuthenticatorConfigRepresentationToJSON(requestParameters.authenticatorConfigRepresentation),
});
return new runtime.VoidApiResponse(response);
}
/**
* Update authenticator configuration
*/
async realmAuthenticationConfigIdPut(requestParameters: RealmAuthenticationConfigIdPutRequest): Promise<void> {
await this.realmAuthenticationConfigIdPutRaw(requestParameters);
}
/**
* Update execution with new configuration
*/
async realmAuthenticationExecutionsExecutionIdConfigPostRaw(requestParameters: RealmAuthenticationExecutionsExecutionIdConfigPostRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationExecutionsExecutionIdConfigPost.');
}
if (requestParameters.executionId === null || requestParameters.executionId === undefined) {
throw new runtime.RequiredError('executionId','Required parameter requestParameters.executionId was null or undefined when calling realmAuthenticationExecutionsExecutionIdConfigPost.');
}
if (requestParameters.authenticatorConfigRepresentation === null || requestParameters.authenticatorConfigRepresentation === undefined) {
throw new runtime.RequiredError('authenticatorConfigRepresentation','Required parameter requestParameters.authenticatorConfigRepresentation was null or undefined when calling realmAuthenticationExecutionsExecutionIdConfigPost.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/executions/{executionId}/config`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"executionId"}}`, encodeURIComponent(String(requestParameters.executionId))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: AuthenticatorConfigRepresentationToJSON(requestParameters.authenticatorConfigRepresentation),
});
return new runtime.VoidApiResponse(response);
}
/**
* Update execution with new configuration
*/
async realmAuthenticationExecutionsExecutionIdConfigPost(requestParameters: RealmAuthenticationExecutionsExecutionIdConfigPostRequest): Promise<void> {
await this.realmAuthenticationExecutionsExecutionIdConfigPostRaw(requestParameters);
}
/**
* Delete execution
*/
async realmAuthenticationExecutionsExecutionIdDeleteRaw(requestParameters: RealmAuthenticationExecutionsExecutionIdDeleteRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationExecutionsExecutionIdDelete.');
}
if (requestParameters.executionId === null || requestParameters.executionId === undefined) {
throw new runtime.RequiredError('executionId','Required parameter requestParameters.executionId was null or undefined when calling realmAuthenticationExecutionsExecutionIdDelete.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/executions/{executionId}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"executionId"}}`, encodeURIComponent(String(requestParameters.executionId))),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
});
return new runtime.VoidApiResponse(response);
}
/**
* Delete execution
*/
async realmAuthenticationExecutionsExecutionIdDelete(requestParameters: RealmAuthenticationExecutionsExecutionIdDeleteRequest): Promise<void> {
await this.realmAuthenticationExecutionsExecutionIdDeleteRaw(requestParameters);
}
/**
* Get Single Execution
*/
async realmAuthenticationExecutionsExecutionIdGetRaw(requestParameters: RealmAuthenticationExecutionsExecutionIdGetRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationExecutionsExecutionIdGet.');
}
if (requestParameters.executionId === null || requestParameters.executionId === undefined) {
throw new runtime.RequiredError('executionId','Required parameter requestParameters.executionId was null or undefined when calling realmAuthenticationExecutionsExecutionIdGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/executions/{executionId}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"executionId"}}`, encodeURIComponent(String(requestParameters.executionId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.VoidApiResponse(response);
}
/**
* Get Single Execution
*/
async realmAuthenticationExecutionsExecutionIdGet(requestParameters: RealmAuthenticationExecutionsExecutionIdGetRequest): Promise<void> {
await this.realmAuthenticationExecutionsExecutionIdGetRaw(requestParameters);
}
/**
* Lower executions priority
*/
async realmAuthenticationExecutionsExecutionIdLowerPriorityPostRaw(requestParameters: RealmAuthenticationExecutionsExecutionIdLowerPriorityPostRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationExecutionsExecutionIdLowerPriorityPost.');
}
if (requestParameters.executionId === null || requestParameters.executionId === undefined) {
throw new runtime.RequiredError('executionId','Required parameter requestParameters.executionId was null or undefined when calling realmAuthenticationExecutionsExecutionIdLowerPriorityPost.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/executions/{executionId}/lower-priority`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"executionId"}}`, encodeURIComponent(String(requestParameters.executionId))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
});
return new runtime.VoidApiResponse(response);
}
/**
* Lower executions priority
*/
async realmAuthenticationExecutionsExecutionIdLowerPriorityPost(requestParameters: RealmAuthenticationExecutionsExecutionIdLowerPriorityPostRequest): Promise<void> {
await this.realmAuthenticationExecutionsExecutionIdLowerPriorityPostRaw(requestParameters);
}
/**
* Raise executions priority
*/
async realmAuthenticationExecutionsExecutionIdRaisePriorityPostRaw(requestParameters: RealmAuthenticationExecutionsExecutionIdRaisePriorityPostRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationExecutionsExecutionIdRaisePriorityPost.');
}
if (requestParameters.executionId === null || requestParameters.executionId === undefined) {
throw new runtime.RequiredError('executionId','Required parameter requestParameters.executionId was null or undefined when calling realmAuthenticationExecutionsExecutionIdRaisePriorityPost.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/executions/{executionId}/raise-priority`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"executionId"}}`, encodeURIComponent(String(requestParameters.executionId))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
});
return new runtime.VoidApiResponse(response);
}
/**
* Raise executions priority
*/
async realmAuthenticationExecutionsExecutionIdRaisePriorityPost(requestParameters: RealmAuthenticationExecutionsExecutionIdRaisePriorityPostRequest): Promise<void> {
await this.realmAuthenticationExecutionsExecutionIdRaisePriorityPostRaw(requestParameters);
}
/**
* Add new authentication execution
*/
async realmAuthenticationExecutionsPostRaw(requestParameters: RealmAuthenticationExecutionsPostRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationExecutionsPost.');
}
if (requestParameters.authenticationExecutionRepresentation === null || requestParameters.authenticationExecutionRepresentation === undefined) {
throw new runtime.RequiredError('authenticationExecutionRepresentation','Required parameter requestParameters.authenticationExecutionRepresentation was null or undefined when calling realmAuthenticationExecutionsPost.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/executions`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: AuthenticationExecutionRepresentationToJSON(requestParameters.authenticationExecutionRepresentation),
});
return new runtime.VoidApiResponse(response);
}
/**
* Add new authentication execution
*/
async realmAuthenticationExecutionsPost(requestParameters: RealmAuthenticationExecutionsPostRequest): Promise<void> {
await this.realmAuthenticationExecutionsPostRaw(requestParameters);
}
/**
* Copy existing authentication flow under a new name The new name is given as \'newName\' attribute of the passed JSON object
*/
async realmAuthenticationFlowsFlowAliasCopyPostRaw(requestParameters: RealmAuthenticationFlowsFlowAliasCopyPostRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationFlowsFlowAliasCopyPost.');
}
if (requestParameters.flowAlias === null || requestParameters.flowAlias === undefined) {
throw new runtime.RequiredError('flowAlias','Required parameter requestParameters.flowAlias was null or undefined when calling realmAuthenticationFlowsFlowAliasCopyPost.');
}
if (requestParameters.requestBody === null || requestParameters.requestBody === undefined) {
throw new runtime.RequiredError('requestBody','Required parameter requestParameters.requestBody was null or undefined when calling realmAuthenticationFlowsFlowAliasCopyPost.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/flows/{flowAlias}/copy`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"flowAlias"}}`, encodeURIComponent(String(requestParameters.flowAlias))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.requestBody,
});
return new runtime.VoidApiResponse(response);
}
/**
* Copy existing authentication flow under a new name The new name is given as \'newName\' attribute of the passed JSON object
*/
async realmAuthenticationFlowsFlowAliasCopyPost(requestParameters: RealmAuthenticationFlowsFlowAliasCopyPostRequest): Promise<void> {
await this.realmAuthenticationFlowsFlowAliasCopyPostRaw(requestParameters);
}
/**
* Add new authentication execution to a flow
*/
async realmAuthenticationFlowsFlowAliasExecutionsExecutionPostRaw(requestParameters: RealmAuthenticationFlowsFlowAliasExecutionsExecutionPostRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationFlowsFlowAliasExecutionsExecutionPost.');
}
if (requestParameters.flowAlias === null || requestParameters.flowAlias === undefined) {
throw new runtime.RequiredError('flowAlias','Required parameter requestParameters.flowAlias was null or undefined when calling realmAuthenticationFlowsFlowAliasExecutionsExecutionPost.');
}
if (requestParameters.requestBody === null || requestParameters.requestBody === undefined) {
throw new runtime.RequiredError('requestBody','Required parameter requestParameters.requestBody was null or undefined when calling realmAuthenticationFlowsFlowAliasExecutionsExecutionPost.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/flows/{flowAlias}/executions/execution`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"flowAlias"}}`, encodeURIComponent(String(requestParameters.flowAlias))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.requestBody,
});
return new runtime.VoidApiResponse(response);
}
/**
* Add new authentication execution to a flow
*/
async realmAuthenticationFlowsFlowAliasExecutionsExecutionPost(requestParameters: RealmAuthenticationFlowsFlowAliasExecutionsExecutionPostRequest): Promise<void> {
await this.realmAuthenticationFlowsFlowAliasExecutionsExecutionPostRaw(requestParameters);
}
/**
* Add new flow with new execution to existing flow
*/
async realmAuthenticationFlowsFlowAliasExecutionsFlowPostRaw(requestParameters: RealmAuthenticationFlowsFlowAliasExecutionsFlowPostRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationFlowsFlowAliasExecutionsFlowPost.');
}
if (requestParameters.flowAlias === null || requestParameters.flowAlias === undefined) {
throw new runtime.RequiredError('flowAlias','Required parameter requestParameters.flowAlias was null or undefined when calling realmAuthenticationFlowsFlowAliasExecutionsFlowPost.');
}
if (requestParameters.requestBody === null || requestParameters.requestBody === undefined) {
throw new runtime.RequiredError('requestBody','Required parameter requestParameters.requestBody was null or undefined when calling realmAuthenticationFlowsFlowAliasExecutionsFlowPost.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/flows/{flowAlias}/executions/flow`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"flowAlias"}}`, encodeURIComponent(String(requestParameters.flowAlias))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.requestBody,
});
return new runtime.VoidApiResponse(response);
}
/**
* Add new flow with new execution to existing flow
*/
async realmAuthenticationFlowsFlowAliasExecutionsFlowPost(requestParameters: RealmAuthenticationFlowsFlowAliasExecutionsFlowPostRequest): Promise<void> {
await this.realmAuthenticationFlowsFlowAliasExecutionsFlowPostRaw(requestParameters);
}
/**
* Get authentication executions for a flow
*/
async realmAuthenticationFlowsFlowAliasExecutionsGetRaw(requestParameters: RealmAuthenticationFlowsFlowAliasExecutionsGetRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationFlowsFlowAliasExecutionsGet.');
}
if (requestParameters.flowAlias === null || requestParameters.flowAlias === undefined) {
throw new runtime.RequiredError('flowAlias','Required parameter requestParameters.flowAlias was null or undefined when calling realmAuthenticationFlowsFlowAliasExecutionsGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/flows/{flowAlias}/executions`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"flowAlias"}}`, encodeURIComponent(String(requestParameters.flowAlias))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.VoidApiResponse(response);
}
/**
* Get authentication executions for a flow
*/
async realmAuthenticationFlowsFlowAliasExecutionsGet(requestParameters: RealmAuthenticationFlowsFlowAliasExecutionsGetRequest): Promise<void> {
await this.realmAuthenticationFlowsFlowAliasExecutionsGetRaw(requestParameters);
}
/**
* Update authentication executions of a Flow
*/
async realmAuthenticationFlowsFlowAliasExecutionsPutRaw(requestParameters: RealmAuthenticationFlowsFlowAliasExecutionsPutRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationFlowsFlowAliasExecutionsPut.');
}
if (requestParameters.flowAlias === null || requestParameters.flowAlias === undefined) {
throw new runtime.RequiredError('flowAlias','Required parameter requestParameters.flowAlias was null or undefined when calling realmAuthenticationFlowsFlowAliasExecutionsPut.');
}
if (requestParameters.authenticationExecutionInfoRepresentation === null || requestParameters.authenticationExecutionInfoRepresentation === undefined) {
throw new runtime.RequiredError('authenticationExecutionInfoRepresentation','Required parameter requestParameters.authenticationExecutionInfoRepresentation was null or undefined when calling realmAuthenticationFlowsFlowAliasExecutionsPut.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/flows/{flowAlias}/executions`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"flowAlias"}}`, encodeURIComponent(String(requestParameters.flowAlias))),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: AuthenticationExecutionInfoRepresentationToJSON(requestParameters.authenticationExecutionInfoRepresentation),
});
return new runtime.VoidApiResponse(response);
}
/**
* Update authentication executions of a Flow
*/
async realmAuthenticationFlowsFlowAliasExecutionsPut(requestParameters: RealmAuthenticationFlowsFlowAliasExecutionsPutRequest): Promise<void> {
await this.realmAuthenticationFlowsFlowAliasExecutionsPutRaw(requestParameters);
}
/**
* Get authentication flows Returns a stream of authentication flows.
*/
async realmAuthenticationFlowsGetRaw(requestParameters: RealmAuthenticationFlowsGetRequest): Promise<runtime.ApiResponse<Array<{ [key: string]: object; }>>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationFlowsGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/flows`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get authentication flows Returns a stream of authentication flows.
*/
async realmAuthenticationFlowsGet(requestParameters: RealmAuthenticationFlowsGetRequest): Promise<Array<{ [key: string]: object; }>> {
const response = await this.realmAuthenticationFlowsGetRaw(requestParameters);
return await response.value();
}
/**
* Delete an authentication flow
*/
async realmAuthenticationFlowsIdDeleteRaw(requestParameters: RealmAuthenticationFlowsIdDeleteRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationFlowsIdDelete.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmAuthenticationFlowsIdDelete.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/flows/{id}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
});
return new runtime.VoidApiResponse(response);
}
/**
* Delete an authentication flow
*/
async realmAuthenticationFlowsIdDelete(requestParameters: RealmAuthenticationFlowsIdDeleteRequest): Promise<void> {
await this.realmAuthenticationFlowsIdDeleteRaw(requestParameters);
}
/**
* Get authentication flow for id
*/
async realmAuthenticationFlowsIdGetRaw(requestParameters: RealmAuthenticationFlowsIdGetRequest): Promise<runtime.ApiResponse<AuthenticationFlowRepresentation>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationFlowsIdGet.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmAuthenticationFlowsIdGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/flows/{id}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse(response, (jsonValue) => AuthenticationFlowRepresentationFromJSON(jsonValue));
}
/**
* Get authentication flow for id
*/
async realmAuthenticationFlowsIdGet(requestParameters: RealmAuthenticationFlowsIdGetRequest): Promise<AuthenticationFlowRepresentation> {
const response = await this.realmAuthenticationFlowsIdGetRaw(requestParameters);
return await response.value();
}
/**
* Update an authentication flow
*/
async realmAuthenticationFlowsIdPutRaw(requestParameters: RealmAuthenticationFlowsIdPutRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationFlowsIdPut.');
}
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling realmAuthenticationFlowsIdPut.');
}
if (requestParameters.authenticationFlowRepresentation === null || requestParameters.authenticationFlowRepresentation === undefined) {
throw new runtime.RequiredError('authenticationFlowRepresentation','Required parameter requestParameters.authenticationFlowRepresentation was null or undefined when calling realmAuthenticationFlowsIdPut.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/flows/{id}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: AuthenticationFlowRepresentationToJSON(requestParameters.authenticationFlowRepresentation),
});
return new runtime.VoidApiResponse(response);
}
/**
* Update an authentication flow
*/
async realmAuthenticationFlowsIdPut(requestParameters: RealmAuthenticationFlowsIdPutRequest): Promise<void> {
await this.realmAuthenticationFlowsIdPutRaw(requestParameters);
}
/**
* Create a new authentication flow
*/
async realmAuthenticationFlowsPostRaw(requestParameters: RealmAuthenticationFlowsPostRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationFlowsPost.');
}
if (requestParameters.authenticationFlowRepresentation === null || requestParameters.authenticationFlowRepresentation === undefined) {
throw new runtime.RequiredError('authenticationFlowRepresentation','Required parameter requestParameters.authenticationFlowRepresentation was null or undefined when calling realmAuthenticationFlowsPost.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/flows`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: AuthenticationFlowRepresentationToJSON(requestParameters.authenticationFlowRepresentation),
});
return new runtime.VoidApiResponse(response);
}
/**
* Create a new authentication flow
*/
async realmAuthenticationFlowsPost(requestParameters: RealmAuthenticationFlowsPostRequest): Promise<void> {
await this.realmAuthenticationFlowsPostRaw(requestParameters);
}
/**
* Get form action providers Returns a stream of form action providers.
*/
async realmAuthenticationFormActionProvidersGetRaw(requestParameters: RealmAuthenticationFormActionProvidersGetRequest): Promise<runtime.ApiResponse<Array<{ [key: string]: object; }>>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationFormActionProvidersGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/form-action-providers`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get form action providers Returns a stream of form action providers.
*/
async realmAuthenticationFormActionProvidersGet(requestParameters: RealmAuthenticationFormActionProvidersGetRequest): Promise<Array<{ [key: string]: object; }>> {
const response = await this.realmAuthenticationFormActionProvidersGetRaw(requestParameters);
return await response.value();
}
/**
* Get form providers Returns a stream of form providers.
*/
async realmAuthenticationFormProvidersGetRaw(requestParameters: RealmAuthenticationFormProvidersGetRequest): Promise<runtime.ApiResponse<Array<{ [key: string]: object; }>>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationFormProvidersGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/form-providers`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get form providers Returns a stream of form providers.
*/
async realmAuthenticationFormProvidersGet(requestParameters: RealmAuthenticationFormProvidersGetRequest): Promise<Array<{ [key: string]: object; }>> {
const response = await this.realmAuthenticationFormProvidersGetRaw(requestParameters);
return await response.value();
}
/**
* Get configuration descriptions for all clients
*/
async realmAuthenticationPerClientConfigDescriptionGetRaw(requestParameters: RealmAuthenticationPerClientConfigDescriptionGetRequest): Promise<runtime.ApiResponse<{ [key: string]: object; }>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationPerClientConfigDescriptionGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/per-client-config-description`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get configuration descriptions for all clients
*/
async realmAuthenticationPerClientConfigDescriptionGet(requestParameters: RealmAuthenticationPerClientConfigDescriptionGetRequest): Promise<{ [key: string]: object; }> {
const response = await this.realmAuthenticationPerClientConfigDescriptionGetRaw(requestParameters);
return await response.value();
}
/**
* Register a new required actions
*/
async realmAuthenticationRegisterRequiredActionPostRaw(requestParameters: RealmAuthenticationRegisterRequiredActionPostRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationRegisterRequiredActionPost.');
}
if (requestParameters.requestBody === null || requestParameters.requestBody === undefined) {
throw new runtime.RequiredError('requestBody','Required parameter requestParameters.requestBody was null or undefined when calling realmAuthenticationRegisterRequiredActionPost.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/register-required-action`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.requestBody,
});
return new runtime.VoidApiResponse(response);
}
/**
* Register a new required actions
*/
async realmAuthenticationRegisterRequiredActionPost(requestParameters: RealmAuthenticationRegisterRequiredActionPostRequest): Promise<void> {
await this.realmAuthenticationRegisterRequiredActionPostRaw(requestParameters);
}
/**
* Delete required action
*/
async realmAuthenticationRequiredActionsAliasDeleteRaw(requestParameters: RealmAuthenticationRequiredActionsAliasDeleteRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationRequiredActionsAliasDelete.');
}
if (requestParameters.alias === null || requestParameters.alias === undefined) {
throw new runtime.RequiredError('alias','Required parameter requestParameters.alias was null or undefined when calling realmAuthenticationRequiredActionsAliasDelete.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/required-actions/{alias}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"alias"}}`, encodeURIComponent(String(requestParameters.alias))),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
});
return new runtime.VoidApiResponse(response);
}
/**
* Delete required action
*/
async realmAuthenticationRequiredActionsAliasDelete(requestParameters: RealmAuthenticationRequiredActionsAliasDeleteRequest): Promise<void> {
await this.realmAuthenticationRequiredActionsAliasDeleteRaw(requestParameters);
}
/**
* Get required action for alias
*/
async realmAuthenticationRequiredActionsAliasGetRaw(requestParameters: RealmAuthenticationRequiredActionsAliasGetRequest): Promise<runtime.ApiResponse<RequiredActionProviderRepresentation>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationRequiredActionsAliasGet.');
}
if (requestParameters.alias === null || requestParameters.alias === undefined) {
throw new runtime.RequiredError('alias','Required parameter requestParameters.alias was null or undefined when calling realmAuthenticationRequiredActionsAliasGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/required-actions/{alias}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"alias"}}`, encodeURIComponent(String(requestParameters.alias))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse(response, (jsonValue) => RequiredActionProviderRepresentationFromJSON(jsonValue));
}
/**
* Get required action for alias
*/
async realmAuthenticationRequiredActionsAliasGet(requestParameters: RealmAuthenticationRequiredActionsAliasGetRequest): Promise<RequiredActionProviderRepresentation> {
const response = await this.realmAuthenticationRequiredActionsAliasGetRaw(requestParameters);
return await response.value();
}
/**
* Lower required actions priority
*/
async realmAuthenticationRequiredActionsAliasLowerPriorityPostRaw(requestParameters: RealmAuthenticationRequiredActionsAliasLowerPriorityPostRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationRequiredActionsAliasLowerPriorityPost.');
}
if (requestParameters.alias === null || requestParameters.alias === undefined) {
throw new runtime.RequiredError('alias','Required parameter requestParameters.alias was null or undefined when calling realmAuthenticationRequiredActionsAliasLowerPriorityPost.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/required-actions/{alias}/lower-priority`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"alias"}}`, encodeURIComponent(String(requestParameters.alias))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
});
return new runtime.VoidApiResponse(response);
}
/**
* Lower required actions priority
*/
async realmAuthenticationRequiredActionsAliasLowerPriorityPost(requestParameters: RealmAuthenticationRequiredActionsAliasLowerPriorityPostRequest): Promise<void> {
await this.realmAuthenticationRequiredActionsAliasLowerPriorityPostRaw(requestParameters);
}
/**
* Update required action
*/
async realmAuthenticationRequiredActionsAliasPutRaw(requestParameters: RealmAuthenticationRequiredActionsAliasPutRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationRequiredActionsAliasPut.');
}
if (requestParameters.alias === null || requestParameters.alias === undefined) {
throw new runtime.RequiredError('alias','Required parameter requestParameters.alias was null or undefined when calling realmAuthenticationRequiredActionsAliasPut.');
}
if (requestParameters.requiredActionProviderRepresentation === null || requestParameters.requiredActionProviderRepresentation === undefined) {
throw new runtime.RequiredError('requiredActionProviderRepresentation','Required parameter requestParameters.requiredActionProviderRepresentation was null or undefined when calling realmAuthenticationRequiredActionsAliasPut.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/required-actions/{alias}`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"alias"}}`, encodeURIComponent(String(requestParameters.alias))),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: RequiredActionProviderRepresentationToJSON(requestParameters.requiredActionProviderRepresentation),
});
return new runtime.VoidApiResponse(response);
}
/**
* Update required action
*/
async realmAuthenticationRequiredActionsAliasPut(requestParameters: RealmAuthenticationRequiredActionsAliasPutRequest): Promise<void> {
await this.realmAuthenticationRequiredActionsAliasPutRaw(requestParameters);
}
/**
* Raise required actions priority
*/
async realmAuthenticationRequiredActionsAliasRaisePriorityPostRaw(requestParameters: RealmAuthenticationRequiredActionsAliasRaisePriorityPostRequest): Promise<runtime.ApiResponse<void>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationRequiredActionsAliasRaisePriorityPost.');
}
if (requestParameters.alias === null || requestParameters.alias === undefined) {
throw new runtime.RequiredError('alias','Required parameter requestParameters.alias was null or undefined when calling realmAuthenticationRequiredActionsAliasRaisePriorityPost.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/required-actions/{alias}/raise-priority`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))).replace(`{${"alias"}}`, encodeURIComponent(String(requestParameters.alias))),
method: 'POST',
headers: headerParameters,
query: queryParameters,
});
return new runtime.VoidApiResponse(response);
}
/**
* Raise required actions priority
*/
async realmAuthenticationRequiredActionsAliasRaisePriorityPost(requestParameters: RealmAuthenticationRequiredActionsAliasRaisePriorityPostRequest): Promise<void> {
await this.realmAuthenticationRequiredActionsAliasRaisePriorityPostRaw(requestParameters);
}
/**
* Get required actions Returns a stream of required actions.
*/
async realmAuthenticationRequiredActionsGetRaw(requestParameters: RealmAuthenticationRequiredActionsGetRequest): Promise<runtime.ApiResponse<Array<{ [key: string]: object; }>>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationRequiredActionsGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/required-actions`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get required actions Returns a stream of required actions.
*/
async realmAuthenticationRequiredActionsGet(requestParameters: RealmAuthenticationRequiredActionsGetRequest): Promise<Array<{ [key: string]: object; }>> {
const response = await this.realmAuthenticationRequiredActionsGetRaw(requestParameters);
return await response.value();
}
/**
* Get unregistered required actions Returns a stream of unregistered required actions.
*/
async realmAuthenticationUnregisteredRequiredActionsGetRaw(requestParameters: RealmAuthenticationUnregisteredRequiredActionsGetRequest): Promise<runtime.ApiResponse<Array<{ [key: string]: object; }>>> {
if (requestParameters.realm === null || requestParameters.realm === undefined) {
throw new runtime.RequiredError('realm','Required parameter requestParameters.realm was null or undefined when calling realmAuthenticationUnregisteredRequiredActionsGet.');
}
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("access_token", []) : token;
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/{realm}/authentication/unregistered-required-actions`.replace(`{${"realm"}}`, encodeURIComponent(String(requestParameters.realm))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get unregistered required actions Returns a stream of unregistered required actions.
*/
async realmAuthenticationUnregisteredRequiredActionsGet(requestParameters: RealmAuthenticationUnregisteredRequiredActionsGetRequest): Promise<Array<{ [key: string]: object; }>> {
const response = await this.realmAuthenticationUnregisteredRequiredActionsGetRaw(requestParameters);
return await response.value();
}
}