Project Slug |
diff --git a/frontend/src/storybook/user.ts b/frontend/src/storybook/user.ts
index e1b21f559..4375ad935 100644
--- a/frontend/src/storybook/user.ts
+++ b/frontend/src/storybook/user.ts
@@ -13,6 +13,7 @@ import {
export const mockUser: Readonly = {
id: 1,
name: 'fakeUser',
+ idp_identifier: 'fakeIdPIdentifier',
role: 'user',
created: '2024-04-29T14:00:00Z',
last_login: '2024-04-29T14:59:00Z',
diff --git a/helm/config/backend.yaml b/helm/config/backend.yaml
index a3700a1de..3583a31f0 100644
--- a/helm/config/backend.yaml
+++ b/helm/config/backend.yaml
@@ -42,13 +42,14 @@ extensions:
password: "{{ .Values.guacamole.password }}"
authentication:
- jwt:
- usernameClaim: "{{ .Values.backend.authentication.jwt.usernameClaim }}"
endpoints:
authorization: "{{ .Values.backend.authentication.endpoints.authorization }}"
wellKnown: "{{ .Values.backend.authentication.endpoints.wellKnown }}"
audience: "{{ .Values.backend.authentication.audience }}"
- issuer: "{{ .Values.backend.authentication.issuer }}"
+ mapping:
+ identifier: "{{ .Values.backend.authentication.claimMapping.idpIdentifier }}"
+ username: "{{ .Values.backend.authentication.claimMapping.username }}"
+ email: "{{ .Values.backend.authentication.claimMapping.email }}"
scopes:
{{ .Values.backend.authentication.scopes | toYaml | nindent 4 }}
client:
diff --git a/helm/values.yaml b/helm/values.yaml
index 7021cc19b..2e1d17b83 100644
--- a/helm/values.yaml
+++ b/helm/values.yaml
@@ -142,23 +142,26 @@ database:
backend:
authentication:
- jwt:
- usernameClaim: sub # azure: preferred_username
-
endpoints:
wellKnown: http://dev-oauth-mock:8080/default/.well-known/openid-configuration
# Override endpoint that authorizes the User
# In the local development setup, use the following values:
# - HTTP: http://localhost:8080/default/authorize
# - HTTPS: https://localhost/default/authorize
- authorization: https://localhost/default/authorize
+ authorization: null
audience: default
- issuer: http://dev-oauth-mock:8080/default
+
+ claimMapping:
+ idpIdentifier: sub
+ username: preferred_username
+ email: email
scopes:
- openid
+ - profile
- offline_access
+
client:
id: tbd
secret: tbd
diff --git a/mocks/oauth/Makefile b/mocks/oauth/Makefile
index 64723dea2..05c86e7ff 100644
--- a/mocks/oauth/Makefile
+++ b/mocks/oauth/Makefile
@@ -9,7 +9,7 @@ start:
-v $$(pwd)/conf.json:/opt/conf.json \
-p 8083:8080 \
-e JSON_CONFIG_PATH=/opt/conf.json \
- ghcr.io/navikt/mock-oauth2-server:0.5.8
+ ghcr.io/navikt/mock-oauth2-server:2.1.8
stop:
docker stop oauth-mock && \
diff --git a/mocks/oauth/conf.json b/mocks/oauth/conf.json
index 33c8ea93f..c955ce90f 100644
--- a/mocks/oauth/conf.json
+++ b/mocks/oauth/conf.json
@@ -1,24 +1,7 @@
{
- "interactiveLogin": true,
- "httpServer": {
- "type": "NettyWrapper"
- },
- "tokenCallbacks": [
- {
- "issuerId": "issuer1",
- "tokenExpiry": 120,
- "requestMappings": [
- {
- "requestParam": "scope",
- "match": "openid",
- "claims": {
- "sub": "subByScope",
- "aud": [
- "audByScope"
- ]
- }
- }
- ]
- }
- ]
+ "interactiveLogin": true,
+ "httpServer": {
+ "type": "NettyWrapper"
+ },
+ "tokenCallbacks": []
}
From ee0535bbf849a3f42e5432414b0ae8b60a1f800d Mon Sep 17 00:00:00 2001
From: dominik003
Date: Mon, 29 Jul 2024 18:36:30 +0200
Subject: [PATCH 6/8] chore: Update openapi client
---
.../src/app/openapi/.openapi-generator/FILES | 4 +-
frontend/src/app/openapi/api/api.ts | 4 +-
.../src/app/openapi/api/default.service.ts | 363 ++++++++++++--
.../src/app/openapi/api/events.service.ts | 6 -
.../src/app/openapi/api/health.service.ts | 12 -
.../src/app/openapi/api/notices.service.ts | 12 -
frontend/src/app/openapi/api/oauth.service.ts | 444 ------------------
.../openapi/api/projects-events.service.ts | 6 -
.../api/projects-models-backups.service.ts | 54 ---
.../api/projects-models-diagrams.service.ts | 12 -
.../api/projects-models-git.service.ts | 42 --
...s-models-model-complexity-badge.service.ts | 6 -
.../projects-models-restrictions.service.ts | 12 -
.../api/projects-models-t4-c.service.ts | 30 --
.../openapi/api/projects-models.service.ts | 216 ---------
.../src/app/openapi/api/projects.service.ts | 66 ---
.../src/app/openapi/api/sessions.service.ts | 54 ---
.../api/settings-modelsources-git.service.ts | 42 --
.../api/settings-modelsources-t4-c.service.ts | 66 ---
frontend/src/app/openapi/api/tools.service.ts | 114 -----
.../app/openapi/api/users-sessions.service.ts | 6 -
.../app/openapi/api/users-token.service.ts | 18 -
.../openapi/api/users-workspaces.service.ts | 12 -
frontend/src/app/openapi/api/users.service.ts | 108 +----
frontend/src/app/openapi/configuration.ts | 9 -
frontend/src/app/openapi/model/base-user.ts | 1 +
frontend/src/app/openapi/model/models.ts | 3 +-
...refresh-token-request.ts => patch-user.ts} | 12 +-
frontend/src/app/openapi/model/post-user.ts | 2 +
.../model/session-connection-information.ts | 4 -
.../src/app/openapi/model/token-request.ts | 3 +-
frontend/src/app/openapi/model/user.ts | 1 +
32 files changed, 358 insertions(+), 1386 deletions(-)
delete mode 100644 frontend/src/app/openapi/api/oauth.service.ts
rename frontend/src/app/openapi/model/{refresh-token-request.ts => patch-user.ts} (61%)
diff --git a/frontend/src/app/openapi/.openapi-generator/FILES b/frontend/src/app/openapi/.openapi-generator/FILES
index 53519d803..ef2e6ad6e 100644
--- a/frontend/src/app/openapi/.openapi-generator/FILES
+++ b/frontend/src/app/openapi/.openapi-generator/FILES
@@ -5,7 +5,6 @@ api/events.service.ts
api/health.service.ts
api/metadata.service.ts
api/notices.service.ts
-api/oauth.service.ts
api/projects-events.service.ts
api/projects-models-backups.service.ts
api/projects-models-diagrams.service.ts
@@ -83,7 +82,7 @@ model/patch-project-user.ts
model/patch-project.ts
model/patch-t4-c-instance.ts
model/patch-tool-model.ts
-model/patch-user-role-request.ts
+model/patch-user.ts
model/path-validation.ts
model/payload-response-model-list-t4-c-repository.ts
model/payload-response-model-session-connection-information.ts
@@ -114,7 +113,6 @@ model/pure-variants-licenses-input.ts
model/pure-variants-licenses-output.ts
model/rdp-ports-input.ts
model/rdp-ports-output.ts
-model/refresh-token-request.ts
model/resources-input.ts
model/resources-output.ts
model/response-model.ts
diff --git a/frontend/src/app/openapi/api/api.ts b/frontend/src/app/openapi/api/api.ts
index 288056feb..7de12560a 100644
--- a/frontend/src/app/openapi/api/api.ts
+++ b/frontend/src/app/openapi/api/api.ts
@@ -19,8 +19,6 @@ export * from './metadata.service';
import { MetadataService } from './metadata.service';
export * from './notices.service';
import { NoticesService } from './notices.service';
-export * from './oauth.service';
-import { OauthService } from './oauth.service';
export * from './projects.service';
import { ProjectsService } from './projects.service';
export * from './projects-events.service';
@@ -55,4 +53,4 @@ export * from './users-token.service';
import { UsersTokenService } from './users-token.service';
export * from './users-workspaces.service';
import { UsersWorkspacesService } from './users-workspaces.service';
-export const APIS = [DefaultService, EventsService, HealthService, MetadataService, NoticesService, OauthService, ProjectsService, ProjectsEventsService, ProjectsModelsService, ProjectsModelsBackupsService, ProjectsModelsDiagramsService, ProjectsModelsGitService, ProjectsModelsModelComplexityBadgeService, ProjectsModelsRestrictionsService, ProjectsModelsT4CService, SessionsService, SettingsModelsourcesGitService, SettingsModelsourcesT4CService, ToolsService, UsersService, UsersSessionsService, UsersTokenService, UsersWorkspacesService];
+export const APIS = [DefaultService, EventsService, HealthService, MetadataService, NoticesService, ProjectsService, ProjectsEventsService, ProjectsModelsService, ProjectsModelsBackupsService, ProjectsModelsDiagramsService, ProjectsModelsGitService, ProjectsModelsModelComplexityBadgeService, ProjectsModelsRestrictionsService, ProjectsModelsT4CService, SessionsService, SettingsModelsourcesGitService, SettingsModelsourcesT4CService, ToolsService, UsersService, UsersSessionsService, UsersTokenService, UsersWorkspacesService];
diff --git a/frontend/src/app/openapi/api/default.service.ts b/frontend/src/app/openapi/api/default.service.ts
index 71dd268df..b6094b8cb 100644
--- a/frontend/src/app/openapi/api/default.service.ts
+++ b/frontend/src/app/openapi/api/default.service.ts
@@ -28,6 +28,10 @@ import { HTTPValidationError } from '../model/http-validation-error';
import { PureVariantsLicensesInput } from '../model/pure-variants-licenses-input';
// @ts-ignore
import { PureVariantsLicensesOutput } from '../model/pure-variants-licenses-output';
+// @ts-ignore
+import { Role } from '../model/role';
+// @ts-ignore
+import { TokenRequest } from '../model/token-request';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
@@ -113,6 +117,80 @@ export class DefaultService {
return httpParams;
}
+ /**
+ * Create The Identity Token
+ * @param tokenRequest
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public createTheIdentityToken(tokenRequest: TokenRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public createTheIdentityToken(tokenRequest: TokenRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public createTheIdentityToken(tokenRequest: TokenRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public createTheIdentityToken(tokenRequest: TokenRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+ if (tokenRequest === null || tokenRequest === undefined) {
+ throw new Error('Required parameter tokenRequest was null or undefined when calling createTheIdentityToken.');
+ }
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ // to determine the Content-Type header
+ const consumes: string[] = [
+ 'application/json'
+ ];
+ const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
+ if (httpContentTypeSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
+ }
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/authentication/tokens`;
+ return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ body: tokenRequest,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
/**
* Delete License Key File
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@@ -132,12 +210,6 @@ export class DefaultService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -205,12 +277,6 @@ export class DefaultService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -338,12 +404,6 @@ export class DefaultService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -392,6 +452,187 @@ export class DefaultService {
);
}
+ /**
+ * Get The Authorization Url For The Oauth Server
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public getTheAuthorizationURLForTheOAuthServer(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<{ [key: string]: string | null; }>;
+ public getTheAuthorizationURLForTheOAuthServer(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getTheAuthorizationURLForTheOAuthServer(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getTheAuthorizationURLForTheOAuthServer(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/authentication`;
+ return this.httpClient.request<{ [key: string]: string | null; }>('get', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
+ /**
+ * Refresh The Identity Token
+ * @param refreshToken
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public refreshTheIdentityToken(refreshToken?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public refreshTheIdentityToken(refreshToken?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public refreshTheIdentityToken(refreshToken?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public refreshTheIdentityToken(refreshToken?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/authentication/tokens`;
+ return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
+ /**
+ * Remove The Token (Log Out)
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public removeTheTokenLogOut(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public removeTheTokenLogOut(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public removeTheTokenLogOut(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public removeTheTokenLogOut(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/authentication/tokens`;
+ return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
/**
* Set License
* @param pureVariantsLicensesInput
@@ -415,12 +656,6 @@ export class DefaultService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -502,12 +737,6 @@ export class DefaultService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -589,12 +818,6 @@ export class DefaultService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -666,4 +889,72 @@ export class DefaultService {
);
}
+ /**
+ * Validate The Token
+ * @param scope
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public validateTheToken(scope?: Role, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public validateTheToken(scope?: Role, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public validateTheToken(scope?: Role, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public validateTheToken(scope?: Role, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+
+ let localVarQueryParameters = new HttpParams({encoder: this.encoder});
+ if (scope !== undefined && scope !== null) {
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
+ scope, 'scope');
+ }
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/authentication/tokens`;
+ return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ params: localVarQueryParameters,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
}
diff --git a/frontend/src/app/openapi/api/events.service.ts b/frontend/src/app/openapi/api/events.service.ts
index 874664fdc..8586ba8f7 100644
--- a/frontend/src/app/openapi/api/events.service.ts
+++ b/frontend/src/app/openapi/api/events.service.ts
@@ -111,12 +111,6 @@ export class EventsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/health.service.ts b/frontend/src/app/openapi/api/health.service.ts
index 60a64ea4c..d9c8e51fe 100644
--- a/frontend/src/app/openapi/api/health.service.ts
+++ b/frontend/src/app/openapi/api/health.service.ts
@@ -175,12 +175,6 @@ export class HealthService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -248,12 +242,6 @@ export class HealthService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/notices.service.ts b/frontend/src/app/openapi/api/notices.service.ts
index de2975dfc..9b5d15b6e 100644
--- a/frontend/src/app/openapi/api/notices.service.ts
+++ b/frontend/src/app/openapi/api/notices.service.ts
@@ -119,12 +119,6 @@ export class NoticesService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -206,12 +200,6 @@ export class NoticesService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/oauth.service.ts b/frontend/src/app/openapi/api/oauth.service.ts
deleted file mode 100644
index 96a9b4d0d..000000000
--- a/frontend/src/app/openapi/api/oauth.service.ts
+++ /dev/null
@@ -1,444 +0,0 @@
-/*
- * SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
- * SPDX-License-Identifier: Apache-2.0
- *
- * Capella Collaboration
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * Do not edit the class manually.
- + To generate a new version, run `make openapi` in the root directory of this repository.
- */
-
-/* tslint:disable:no-unused-variable member-ordering */
-
-import { Inject, Injectable, Optional } from '@angular/core';
-import { HttpClient, HttpHeaders, HttpParams,
- HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
- } from '@angular/common/http';
-import { CustomHttpParameterCodec } from '../encoder';
-import { Observable } from 'rxjs';
-
-// @ts-ignore
-import { HTTPValidationError } from '../model/http-validation-error';
-// @ts-ignore
-import { RefreshTokenRequest } from '../model/refresh-token-request';
-// @ts-ignore
-import { Role } from '../model/role';
-// @ts-ignore
-import { TokenRequest } from '../model/token-request';
-
-// @ts-ignore
-import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
-import { Configuration } from '../configuration';
-
-
-
-@Injectable({
- providedIn: 'root'
-})
-export class OauthService {
-
- protected basePath = 'http://localhost';
- public defaultHeaders = new HttpHeaders();
- public configuration = new Configuration();
- public encoder: HttpParameterCodec;
-
- constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
- if (configuration) {
- this.configuration = configuration;
- }
- if (typeof this.configuration.basePath !== 'string') {
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
- if (firstBasePath != undefined) {
- basePath = firstBasePath;
- }
-
- if (typeof basePath !== 'string') {
- basePath = this.basePath;
- }
- this.configuration.basePath = basePath;
- }
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
- }
-
-
- // @ts-ignore
- private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
- if (typeof value === "object" && value instanceof Date === false) {
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
- } else {
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
- }
- return httpParams;
- }
-
- private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
- if (value == null) {
- return httpParams;
- }
-
- if (typeof value === "object") {
- if (Array.isArray(value)) {
- (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
- } else if (value instanceof Date) {
- if (key != null) {
- httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
- } else {
- throw Error("key may not be null if value is Date");
- }
- } else {
- Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
- httpParams, value[k], key != null ? `${key}.${k}` : k));
- }
- } else if (key != null) {
- httpParams = httpParams.append(key, value);
- } else {
- throw Error("key may not be null if value is not object or array");
- }
- return httpParams;
- }
-
- /**
- * Create Access Token
- * @param tokenRequest
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public createAccessToken(tokenRequest: TokenRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public createAccessToken(tokenRequest: TokenRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public createAccessToken(tokenRequest: TokenRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public createAccessToken(tokenRequest: TokenRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
- if (tokenRequest === null || tokenRequest === undefined) {
- throw new Error('Required parameter tokenRequest was null or undefined when calling createAccessToken.');
- }
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- // to determine the Content-Type header
- const consumes: string[] = [
- 'application/json'
- ];
- const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
- if (httpContentTypeSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
- }
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/authentication/tokens`;
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: tokenRequest,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Get Redirect Url For Oauth
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public getRedirectURLForOAuth(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public getRedirectURLForOAuth(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public getRedirectURLForOAuth(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public getRedirectURLForOAuth(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/authentication`;
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Invalidate The Token (Log Out)
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public invalidateTheTokenLogOut(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public invalidateTheTokenLogOut(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public invalidateTheTokenLogOut(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public invalidateTheTokenLogOut(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/authentication/tokens`;
- return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Refresh The Access Token
- * @param refreshTokenRequest
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public refreshTheAccessToken(refreshTokenRequest: RefreshTokenRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public refreshTheAccessToken(refreshTokenRequest: RefreshTokenRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public refreshTheAccessToken(refreshTokenRequest: RefreshTokenRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public refreshTheAccessToken(refreshTokenRequest: RefreshTokenRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
- if (refreshTokenRequest === null || refreshTokenRequest === undefined) {
- throw new Error('Required parameter refreshTokenRequest was null or undefined when calling refreshTheAccessToken.');
- }
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- // to determine the Content-Type header
- const consumes: string[] = [
- 'application/json'
- ];
- const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
- if (httpContentTypeSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
- }
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/authentication/tokens`;
- return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: refreshTokenRequest,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Validate The Token
- * @param scope
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public validateTheToken(scope?: Role, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public validateTheToken(scope?: Role, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public validateTheToken(scope?: Role, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public validateTheToken(scope?: Role, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
-
- let localVarQueryParameters = new HttpParams({encoder: this.encoder});
- if (scope !== undefined && scope !== null) {
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
- scope, 'scope');
- }
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarCredential: string | undefined;
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/authentication/tokens`;
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- params: localVarQueryParameters,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
-}
diff --git a/frontend/src/app/openapi/api/projects-events.service.ts b/frontend/src/app/openapi/api/projects-events.service.ts
index 1cbd7537d..9d0b8af49 100644
--- a/frontend/src/app/openapi/api/projects-events.service.ts
+++ b/frontend/src/app/openapi/api/projects-events.service.ts
@@ -129,12 +129,6 @@ export class ProjectsEventsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/projects-models-backups.service.ts b/frontend/src/app/openapi/api/projects-models-backups.service.ts
index 81a2f8d05..339346eff 100644
--- a/frontend/src/app/openapi/api/projects-models-backups.service.ts
+++ b/frontend/src/app/openapi/api/projects-models-backups.service.ts
@@ -133,12 +133,6 @@ export class ProjectsModelsBackupsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -232,12 +226,6 @@ export class ProjectsModelsBackupsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -334,12 +322,6 @@ export class ProjectsModelsBackupsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -424,12 +406,6 @@ export class ProjectsModelsBackupsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -509,12 +485,6 @@ export class ProjectsModelsBackupsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -598,12 +568,6 @@ export class ProjectsModelsBackupsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -687,12 +651,6 @@ export class ProjectsModelsBackupsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -784,12 +742,6 @@ export class ProjectsModelsBackupsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -866,12 +818,6 @@ export class ProjectsModelsBackupsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/projects-models-diagrams.service.ts b/frontend/src/app/openapi/api/projects-models-diagrams.service.ts
index b95c96566..ac18cd4c8 100644
--- a/frontend/src/app/openapi/api/projects-models-diagrams.service.ts
+++ b/frontend/src/app/openapi/api/projects-models-diagrams.service.ts
@@ -125,12 +125,6 @@ export class ProjectsModelsDiagramsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -196,12 +190,6 @@ export class ProjectsModelsDiagramsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/projects-models-git.service.ts b/frontend/src/app/openapi/api/projects-models-git.service.ts
index cb2a807cd..9a74a5beb 100644
--- a/frontend/src/app/openapi/api/projects-models-git.service.ts
+++ b/frontend/src/app/openapi/api/projects-models-git.service.ts
@@ -131,12 +131,6 @@ export class ProjectsModelsGitService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -226,12 +220,6 @@ export class ProjectsModelsGitService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -311,12 +299,6 @@ export class ProjectsModelsGitService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -392,12 +374,6 @@ export class ProjectsModelsGitService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -473,12 +449,6 @@ export class ProjectsModelsGitService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -562,12 +532,6 @@ export class ProjectsModelsGitService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -661,12 +625,6 @@ export class ProjectsModelsGitService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/projects-models-model-complexity-badge.service.ts b/frontend/src/app/openapi/api/projects-models-model-complexity-badge.service.ts
index a6d4d4545..e5d45f88b 100644
--- a/frontend/src/app/openapi/api/projects-models-model-complexity-badge.service.ts
+++ b/frontend/src/app/openapi/api/projects-models-model-complexity-badge.service.ts
@@ -119,12 +119,6 @@ export class ProjectsModelsModelComplexityBadgeService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/projects-models-restrictions.service.ts b/frontend/src/app/openapi/api/projects-models-restrictions.service.ts
index 562293777..8fe21b176 100644
--- a/frontend/src/app/openapi/api/projects-models-restrictions.service.ts
+++ b/frontend/src/app/openapi/api/projects-models-restrictions.service.ts
@@ -121,12 +121,6 @@ export class ProjectsModelsRestrictionsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -206,12 +200,6 @@ export class ProjectsModelsRestrictionsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/projects-models-t4-c.service.ts b/frontend/src/app/openapi/api/projects-models-t4-c.service.ts
index 4afdab418..5a6dc8a2d 100644
--- a/frontend/src/app/openapi/api/projects-models-t4-c.service.ts
+++ b/frontend/src/app/openapi/api/projects-models-t4-c.service.ts
@@ -127,12 +127,6 @@ export class ProjectsModelsT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -222,12 +216,6 @@ export class ProjectsModelsT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -311,12 +299,6 @@ export class ProjectsModelsT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -406,12 +388,6 @@ export class ProjectsModelsT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -487,12 +463,6 @@ export class ProjectsModelsT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/projects-models.service.ts b/frontend/src/app/openapi/api/projects-models.service.ts
index 0efcf2587..8da3503a2 100644
--- a/frontend/src/app/openapi/api/projects-models.service.ts
+++ b/frontend/src/app/openapi/api/projects-models.service.ts
@@ -155,12 +155,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -250,12 +244,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -341,12 +329,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -432,12 +414,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -531,12 +507,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -626,12 +596,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -721,12 +685,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -813,12 +771,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -899,12 +851,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -980,12 +926,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1061,12 +1001,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1150,12 +1084,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1245,12 +1173,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1316,12 +1238,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1401,12 +1317,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1482,12 +1392,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1571,12 +1475,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1652,12 +1550,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1733,12 +1625,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1814,12 +1700,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1881,12 +1761,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1958,12 +1832,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -2043,12 +1911,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -2132,12 +1994,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -2221,12 +2077,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -2318,12 +2168,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -2400,12 +2244,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -2481,12 +2319,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -2562,12 +2394,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -2651,12 +2477,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -2746,12 +2566,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -2827,12 +2641,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -2912,12 +2720,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -3007,12 +2809,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -3106,12 +2902,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -3201,12 +2991,6 @@ export class ProjectsModelsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/projects.service.ts b/frontend/src/app/openapi/api/projects.service.ts
index be7ade9f3..73b986089 100644
--- a/frontend/src/app/openapi/api/projects.service.ts
+++ b/frontend/src/app/openapi/api/projects.service.ts
@@ -133,12 +133,6 @@ export class ProjectsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -220,12 +214,6 @@ export class ProjectsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -307,12 +295,6 @@ export class ProjectsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -384,12 +366,6 @@ export class ProjectsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -461,12 +437,6 @@ export class ProjectsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -538,12 +508,6 @@ export class ProjectsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -618,12 +582,6 @@ export class ProjectsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -696,12 +654,6 @@ export class ProjectsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -781,12 +733,6 @@ export class ProjectsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -872,12 +818,6 @@ export class ProjectsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -967,12 +907,6 @@ export class ProjectsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/sessions.service.ts b/frontend/src/app/openapi/api/sessions.service.ts
index 54aaed68f..214fd2a43 100644
--- a/frontend/src/app/openapi/api/sessions.service.ts
+++ b/frontend/src/app/openapi/api/sessions.service.ts
@@ -150,12 +150,6 @@ export class SessionsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -228,12 +222,6 @@ export class SessionsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -301,12 +289,6 @@ export class SessionsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -378,12 +360,6 @@ export class SessionsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -455,12 +431,6 @@ export class SessionsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -542,12 +512,6 @@ export class SessionsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -620,12 +584,6 @@ export class SessionsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -711,12 +669,6 @@ export class SessionsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -802,12 +754,6 @@ export class SessionsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/settings-modelsources-git.service.ts b/frontend/src/app/openapi/api/settings-modelsources-git.service.ts
index 9137d0584..4e9c25a86 100644
--- a/frontend/src/app/openapi/api/settings-modelsources-git.service.ts
+++ b/frontend/src/app/openapi/api/settings-modelsources-git.service.ts
@@ -125,12 +125,6 @@ export class SettingsModelsourcesGitService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -212,12 +206,6 @@ export class SettingsModelsourcesGitService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -293,12 +281,6 @@ export class SettingsModelsourcesGitService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -380,12 +362,6 @@ export class SettingsModelsourcesGitService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -457,12 +433,6 @@ export class SettingsModelsourcesGitService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -540,12 +510,6 @@ export class SettingsModelsourcesGitService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -617,12 +581,6 @@ export class SettingsModelsourcesGitService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/settings-modelsources-t4-c.service.ts b/frontend/src/app/openapi/api/settings-modelsources-t4-c.service.ts
index 98a18d74c..ad06b5d7f 100644
--- a/frontend/src/app/openapi/api/settings-modelsources-t4-c.service.ts
+++ b/frontend/src/app/openapi/api/settings-modelsources-t4-c.service.ts
@@ -131,12 +131,6 @@ export class SettingsModelsourcesT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -222,12 +216,6 @@ export class SettingsModelsourcesT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -313,12 +301,6 @@ export class SettingsModelsourcesT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -394,12 +376,6 @@ export class SettingsModelsourcesT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -481,12 +457,6 @@ export class SettingsModelsourcesT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -558,12 +528,6 @@ export class SettingsModelsourcesT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -631,12 +595,6 @@ export class SettingsModelsourcesT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -708,12 +666,6 @@ export class SettingsModelsourcesT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -789,12 +741,6 @@ export class SettingsModelsourcesT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -870,12 +816,6 @@ export class SettingsModelsourcesT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -951,12 +891,6 @@ export class SettingsModelsourcesT4CService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/tools.service.ts b/frontend/src/app/openapi/api/tools.service.ts
index f18e6c687..40711b7bd 100644
--- a/frontend/src/app/openapi/api/tools.service.ts
+++ b/frontend/src/app/openapi/api/tools.service.ts
@@ -136,12 +136,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -227,12 +221,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -318,12 +306,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -405,12 +387,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -486,12 +462,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -567,12 +537,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -640,12 +604,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -717,12 +675,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -794,12 +746,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -871,12 +817,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -952,12 +892,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1029,12 +963,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1110,12 +1038,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1187,12 +1109,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1260,12 +1176,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1333,12 +1243,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1414,12 +1318,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1509,12 +1407,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1604,12 +1496,6 @@ export class ToolsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/users-sessions.service.ts b/frontend/src/app/openapi/api/users-sessions.service.ts
index bb5050bad..3d97ee293 100644
--- a/frontend/src/app/openapi/api/users-sessions.service.ts
+++ b/frontend/src/app/openapi/api/users-sessions.service.ts
@@ -117,12 +117,6 @@ export class UsersSessionsService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/users-token.service.ts b/frontend/src/app/openapi/api/users-token.service.ts
index 02f3bd6cb..8afe09772 100644
--- a/frontend/src/app/openapi/api/users-token.service.ts
+++ b/frontend/src/app/openapi/api/users-token.service.ts
@@ -121,12 +121,6 @@ export class UsersTokenService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -208,12 +202,6 @@ export class UsersTokenService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -281,12 +269,6 @@ export class UsersTokenService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/users-workspaces.service.ts b/frontend/src/app/openapi/api/users-workspaces.service.ts
index 07c588936..d1c2f2942 100644
--- a/frontend/src/app/openapi/api/users-workspaces.service.ts
+++ b/frontend/src/app/openapi/api/users-workspaces.service.ts
@@ -121,12 +121,6 @@ export class UsersWorkspacesService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -198,12 +192,6 @@ export class UsersWorkspacesService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
diff --git a/frontend/src/app/openapi/api/users.service.ts b/frontend/src/app/openapi/api/users.service.ts
index 6f32b3f63..9495cfdf0 100644
--- a/frontend/src/app/openapi/api/users.service.ts
+++ b/frontend/src/app/openapi/api/users.service.ts
@@ -23,7 +23,7 @@ import { HTTPValidationError } from '../model/http-validation-error';
// @ts-ignore
import { HistoryEvent } from '../model/history-event';
// @ts-ignore
-import { PatchUserRoleRequest } from '../model/patch-user-role-request';
+import { PatchUser } from '../model/patch-user';
// @ts-ignore
import { PostToken } from '../model/post-token';
// @ts-ignore
@@ -135,12 +135,6 @@ export class UsersService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -222,12 +216,6 @@ export class UsersService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -309,12 +297,6 @@ export class UsersService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -386,12 +368,6 @@ export class UsersService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -467,12 +443,6 @@ export class UsersService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -540,12 +510,6 @@ export class UsersService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -617,12 +581,6 @@ export class UsersService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -690,12 +648,6 @@ export class UsersService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -767,12 +719,6 @@ export class UsersService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -844,12 +790,6 @@ export class UsersService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -921,12 +861,6 @@ export class UsersService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -994,12 +928,6 @@ export class UsersService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1071,12 +999,6 @@ export class UsersService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1126,21 +1048,21 @@ export class UsersService {
}
/**
- * Update Role Of User
+ * Update User
* @param userId
- * @param patchUserRoleRequest
+ * @param patchUser
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
- public updateRoleOfUser(userId: number, patchUserRoleRequest: PatchUserRoleRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public updateRoleOfUser(userId: number, patchUserRoleRequest: PatchUserRoleRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public updateRoleOfUser(userId: number, patchUserRoleRequest: PatchUserRoleRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public updateRoleOfUser(userId: number, patchUserRoleRequest: PatchUserRoleRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+ public updateUser(userId: number, patchUser: PatchUser, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public updateUser(userId: number, patchUser: PatchUser, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public updateUser(userId: number, patchUser: PatchUser, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public updateUser(userId: number, patchUser: PatchUser, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
if (userId === null || userId === undefined) {
- throw new Error('Required parameter userId was null or undefined when calling updateRoleOfUser.');
+ throw new Error('Required parameter userId was null or undefined when calling updateUser.');
}
- if (patchUserRoleRequest === null || patchUserRoleRequest === undefined) {
- throw new Error('Required parameter patchUserRoleRequest was null or undefined when calling updateRoleOfUser.');
+ if (patchUser === null || patchUser === undefined) {
+ throw new Error('Required parameter patchUser was null or undefined when calling updateUser.');
}
let localVarHeaders = this.defaultHeaders;
@@ -1152,12 +1074,6 @@ export class UsersService {
localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
}
- // authentication (JWTBearer) required
- localVarCredential = this.configuration.lookupCredential('JWTBearer');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
- }
-
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
@@ -1201,11 +1117,11 @@ export class UsersService {
}
}
- let localVarPath = `/api/v1/users/${this.configuration.encodeParam({name: "userId", value: userId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}/roles`;
+ let localVarPath = `/api/v1/users/${this.configuration.encodeParam({name: "userId", value: userId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`;
return this.httpClient.request('patch', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
- body: patchUserRoleRequest,
+ body: patchUser,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
diff --git a/frontend/src/app/openapi/configuration.ts b/frontend/src/app/openapi/configuration.ts
index 8079b4613..20b80128f 100644
--- a/frontend/src/app/openapi/configuration.ts
+++ b/frontend/src/app/openapi/configuration.ts
@@ -106,15 +106,6 @@ export class Configuration {
: undefined;
};
}
-
- // init default JWTBearer credential
- if (!this.credentials['JWTBearer']) {
- this.credentials['JWTBearer'] = () => {
- return typeof this.accessToken === 'function'
- ? this.accessToken()
- : this.accessToken;
- };
- }
}
/**
diff --git a/frontend/src/app/openapi/model/base-user.ts b/frontend/src/app/openapi/model/base-user.ts
index b7dcad0cd..e5f16e749 100644
--- a/frontend/src/app/openapi/model/base-user.ts
+++ b/frontend/src/app/openapi/model/base-user.ts
@@ -15,6 +15,7 @@ import { Role } from './role';
export interface BaseUser {
id: number;
name: string;
+ idp_identifier: string;
role: Role;
}
export namespace BaseUser {
diff --git a/frontend/src/app/openapi/model/models.ts b/frontend/src/app/openapi/model/models.ts
index bddf060d9..098253c3f 100644
--- a/frontend/src/app/openapi/model/models.ts
+++ b/frontend/src/app/openapi/model/models.ts
@@ -65,7 +65,7 @@ export * from './patch-project';
export * from './patch-project-user';
export * from './patch-t4-c-instance';
export * from './patch-tool-model';
-export * from './patch-user-role-request';
+export * from './patch-user';
export * from './path-validation';
export * from './payload-response-model-list-t4-c-repository';
export * from './payload-response-model-session-connection-information';
@@ -96,7 +96,6 @@ export * from './pure-variants-licenses-input';
export * from './pure-variants-licenses-output';
export * from './rdp-ports-input';
export * from './rdp-ports-output';
-export * from './refresh-token-request';
export * from './resources-input';
export * from './resources-output';
export * from './response-model';
diff --git a/frontend/src/app/openapi/model/refresh-token-request.ts b/frontend/src/app/openapi/model/patch-user.ts
similarity index 61%
rename from frontend/src/app/openapi/model/refresh-token-request.ts
rename to frontend/src/app/openapi/model/patch-user.ts
index 7c596d1c0..7a774eb6a 100644
--- a/frontend/src/app/openapi/model/refresh-token-request.ts
+++ b/frontend/src/app/openapi/model/patch-user.ts
@@ -9,9 +9,17 @@
+ To generate a new version, run `make openapi` in the root directory of this repository.
*/
+import { Role } from './role';
-export interface RefreshTokenRequest {
- refresh_token: string;
+export interface PatchUser {
+ name?: string | null;
+ idp_identifier?: string | null;
+ email?: string | null;
+ role?: Role | null;
+ reason?: string | null;
}
+export namespace PatchUser {
+}
+
diff --git a/frontend/src/app/openapi/model/post-user.ts b/frontend/src/app/openapi/model/post-user.ts
index 6b28083b6..7c7787dfc 100644
--- a/frontend/src/app/openapi/model/post-user.ts
+++ b/frontend/src/app/openapi/model/post-user.ts
@@ -14,6 +14,8 @@ import { Role } from './role';
export interface PostUser {
name: string;
+ idp_identifier: string;
+ email?: string | null;
role: Role;
reason: string;
}
diff --git a/frontend/src/app/openapi/model/session-connection-information.ts b/frontend/src/app/openapi/model/session-connection-information.ts
index 7d1119c3b..c7db275c6 100644
--- a/frontend/src/app/openapi/model/session-connection-information.ts
+++ b/frontend/src/app/openapi/model/session-connection-information.ts
@@ -19,10 +19,6 @@ export interface SessionConnectionInformation {
* Configuration for the local storage of the frontend. The provided key/value pairs should be set by the frontend.
*/
local_storage: { [key: string]: string; };
- /**
- * Cookies, which are required to connect to the session. The provided key/value pairs should be set by the frontend.
- */
- cookies: { [key: string]: string; };
t4c_token: string | null;
redirect_url: string | null;
}
diff --git a/frontend/src/app/openapi/model/token-request.ts b/frontend/src/app/openapi/model/token-request.ts
index 6d7242765..2477cbcd2 100644
--- a/frontend/src/app/openapi/model/token-request.ts
+++ b/frontend/src/app/openapi/model/token-request.ts
@@ -13,6 +13,7 @@
export interface TokenRequest {
code: string;
- state: string;
+ nonce: string;
+ code_verifier: string;
}
diff --git a/frontend/src/app/openapi/model/user.ts b/frontend/src/app/openapi/model/user.ts
index 6fc2cfb39..d3af471a2 100644
--- a/frontend/src/app/openapi/model/user.ts
+++ b/frontend/src/app/openapi/model/user.ts
@@ -15,6 +15,7 @@ import { Role } from './role';
export interface User {
id: number;
name: string;
+ idp_identifier: string;
role: Role;
created: string | null;
last_login: string | null;
From 4ca31f352da245d3c0851d99ca8be141c26d5103 Mon Sep 17 00:00:00 2001
From: dominik003
Date: Mon, 29 Jul 2024 20:15:52 +0200
Subject: [PATCH 7/8] fix: Apply code changes to tests
---
backend/capellacollab/config/models.py | 2 +-
.../core/authentication/api_key_cookie.py | 42 +++----
.../core/authentication/injectables.py | 24 ++--
.../core/authentication/routes.py | 24 ++--
.../capellacollab/core/logging/__init__.py | 6 +-
backend/tests/conftest.py | 17 ++-
backend/tests/core/conftest.py | 105 ++++++++++++++++--
backend/tests/core/test_auth.py | 88 ++-------------
backend/tests/core/test_auth_injectables.py | 26 ++++-
.../tests/projects/test_projects_routes.py | 40 +++++--
.../projects/test_projects_users_routes.py | 32 ++++--
.../pipeline-runs/test_pipeline_runs.py | 4 +-
.../toolmodels/test_toolmodel_routes.py | 12 +-
backend/tests/sessions/hooks/test_t4c_hook.py | 6 +-
backend/tests/sessions/test_session_routes.py | 2 +-
.../tests/sessions/test_session_sharing.py | 22 +++-
.../teamforcapella/test_t4c_instances.py | 36 ++++--
backend/tests/settings/test_alerts.py | 12 +-
.../settings/test_global_configuration.py | 4 +-
backend/tests/test_event_creation.py | 40 ++++---
backend/tests/users/conftest.py | 4 +-
backend/tests/users/fixtures.py | 12 +-
backend/tests/users/test_oauth.py | 4 +-
backend/tests/users/test_users.py | 14 ++-
24 files changed, 355 insertions(+), 223 deletions(-)
diff --git a/backend/capellacollab/config/models.py b/backend/capellacollab/config/models.py
index 66bece20a..39f1d9026 100644
--- a/backend/capellacollab/config/models.py
+++ b/backend/capellacollab/config/models.py
@@ -259,7 +259,7 @@ class AuthenticationConfig(BaseConfig):
mapping: ClaimMappingConfig = ClaimMappingConfig()
scopes: list[str] = pydantic.Field(
default=["openid", "profile", "offline_access"],
- description="List of scopes that application neeeds to access the required attributes.",
+ description="List of scopes that the application needs to access the required attributes.",
)
client: AuthOauthClientConfig = AuthOauthClientConfig()
redirect_uri: str = pydantic.Field(
diff --git a/backend/capellacollab/core/authentication/api_key_cookie.py b/backend/capellacollab/core/authentication/api_key_cookie.py
index 3c68b7376..772508e59 100644
--- a/backend/capellacollab/core/authentication/api_key_cookie.py
+++ b/backend/capellacollab/core/authentication/api_key_cookie.py
@@ -18,28 +18,24 @@
auth_config = config.authentication
-class JWTConfigBorg:
- _shared_state: dict[str, str] = {}
-
- def __init__(
- self, provider_config: oidc_provider.AbstractOIDCProviderConfig
- ):
- self.__dict__ = self._shared_state
- self.provider_config = provider_config
-
- if not hasattr(self, "jwks_client"):
- self.jwks_client = jwt.PyJWKClient(
- uri=self.provider_config.get_jwks_uri()
+class JWTConfig:
+ _jwks_client = None
+
+ def __init__(self, oidc_config: oidc_provider.AbstractOIDCProviderConfig):
+ self.oidc_config = oidc_config
+
+ if JWTConfig._jwks_client is None:
+ JWTConfig._jwks_client = jwt.PyJWKClient(
+ uri=self.oidc_config.get_jwks_uri()
)
+ self.jwks_client = JWTConfig._jwks_client
class JWTAPIKeyCookie(security.APIKeyCookie):
- def __init__(
- self, provider_config: oidc_provider.AbstractOIDCProviderConfig
- ):
+ def __init__(self, oidc_config: oidc_provider.AbstractOIDCProviderConfig):
super().__init__(name="id_token", auto_error=True)
- self.provider_config = provider_config
- self.jwt_config = JWTConfigBorg(provider_config)
+ self.oidc_config = oidc_config
+ self.jwt_config = JWTConfig(oidc_config)
async def __call__(self, request: fastapi.Request) -> str:
token: str | None = await super().__call__(request)
@@ -59,14 +55,10 @@ def validate_token(self, token: str) -> dict[str, t.Any]:
return jwt.decode(
jwt=token,
key=signing_key.key,
- algorithms=self.provider_config.get_supported_signing_algorithms(),
- audience=self.provider_config.get_client_id(),
- issuer=self.provider_config.get_issuer(),
- options={
- "verify_exp": True,
- "verify_iat": True,
- "verify_nbf": True,
- },
+ algorithms=self.oidc_config.get_supported_signing_algorithms(),
+ audience=self.oidc_config.get_client_id(),
+ issuer=self.oidc_config.get_issuer(),
+ options={"require": ["exp", "iat"]},
)
except jwt_exceptions.ExpiredSignatureError:
raise exceptions.TokenSignatureExpired()
diff --git a/backend/capellacollab/core/authentication/injectables.py b/backend/capellacollab/core/authentication/injectables.py
index d19982173..844c1a749 100644
--- a/backend/capellacollab/core/authentication/injectables.py
+++ b/backend/capellacollab/core/authentication/injectables.py
@@ -30,24 +30,20 @@
@functools.lru_cache
-def get_cached_oidc_provider_config() -> (
- oidc_provider.AbstractOIDCProviderConfig
-):
+def get_cached_oidc_config() -> oidc_provider.AbstractOIDCProviderConfig:
return oidc_provider.WellKnownOIDCProviderConfig()
-async def get_oidc_provider_config() -> (
- oidc_provider.AbstractOIDCProviderConfig
-):
- return get_cached_oidc_provider_config()
+async def get_oidc_config() -> oidc_provider.AbstractOIDCProviderConfig:
+ return get_cached_oidc_config()
async def get_oidc_provider(
- oidc_provider_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
- get_oidc_provider_config
+ oidc_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
+ get_oidc_config
),
) -> oidc_provider.AbstractOIDCProvider:
- return oidc_provider.OIDCProvider(oidc_provider_config)
+ return oidc_provider.OIDCProvider(oidc_config)
class OpenAPIFakeBase(security_base.SecurityBase):
@@ -83,15 +79,13 @@ class OpenAPIPersonalAccessToken(OpenAPIFakeBase):
async def get_username(
request: fastapi.Request,
- provider_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
- get_oidc_provider_config
+ oidc_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
+ get_oidc_config
),
_unused1=fastapi.Depends(OpenAPIPersonalAccessToken()),
) -> str:
if request.cookies.get("id_token"):
- username = await api_key_cookie.JWTAPIKeyCookie(provider_config)(
- request
- )
+ username = await api_key_cookie.JWTAPIKeyCookie(oidc_config)(request)
return username
authorization = request.headers.get("Authorization")
diff --git a/backend/capellacollab/core/authentication/routes.py b/backend/capellacollab/core/authentication/routes.py
index 82efdb9ac..1974833d4 100644
--- a/backend/capellacollab/core/authentication/routes.py
+++ b/backend/capellacollab/core/authentication/routes.py
@@ -46,8 +46,8 @@ async def api_get_token(
provider: oidc_provider.AbstractOIDCProvider = fastapi.Depends(
injectables.get_oidc_provider
),
- provider_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
- injectables.get_oidc_provider_config
+ oidc_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
+ injectables.get_oidc_config
),
):
tokens = provider.exchange_code_for_tokens(
@@ -55,7 +55,7 @@ async def api_get_token(
)
validated_id_token = validate_id_token(
- tokens["id_token"], provider_config, None
+ tokens["id_token"], oidc_config, None
)
user = create_or_update_user(db, validated_id_token)
@@ -72,8 +72,8 @@ async def api_refresh_token(
provider: oidc_provider.AbstractOIDCProvider = fastapi.Depends(
injectables.get_oidc_provider
),
- provider_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
- injectables.get_oidc_provider_config
+ oidc_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
+ injectables.get_oidc_config
),
):
if refresh_token is None or refresh_token == "":
@@ -82,7 +82,7 @@ async def api_refresh_token(
tokens = provider.refresh_token(refresh_token)
validated_id_token = validate_id_token(
- tokens["id_token"], provider_config, None
+ tokens["id_token"], oidc_config, None
)
user = create_or_update_user(db, validated_id_token)
@@ -102,11 +102,11 @@ async def validate_token(
request: fastapi.Request,
scope: users_models.Role | None = None,
db: orm.Session = fastapi.Depends(database.get_db),
- provider_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
- injectables.get_oidc_provider_config
+ oidc_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
+ injectables.get_oidc_config
),
):
- username = await api_key_cookie.JWTAPIKeyCookie(provider_config)(request)
+ username = await api_key_cookie.JWTAPIKeyCookie(oidc_config)(request)
if scope and scope.ADMIN:
auth_injectables.RoleVerification(
required_role=users_models.Role.ADMIN
@@ -116,17 +116,17 @@ async def validate_token(
def validate_id_token(
id_token: str,
- provider_config: oidc_provider.AbstractOIDCProviderConfig,
+ oidc_config: oidc_provider.AbstractOIDCProviderConfig,
nonce: str | None,
) -> dict[str, str]:
validated_id_token = api_key_cookie.JWTAPIKeyCookie(
- provider_config
+ oidc_config
).validate_token(id_token)
if nonce and not hmac.compare_digest(validated_id_token["nonce"], nonce):
raise exceptions.NonceMismatchError()
- if provider_config.get_client_id() not in validated_id_token["aud"]:
+ if oidc_config.get_client_id() not in validated_id_token["aud"]:
raise exceptions.UnauthenticatedError()
return validated_id_token
diff --git a/backend/capellacollab/core/logging/__init__.py b/backend/capellacollab/core/logging/__init__.py
index 0bc5be658..58cef5f9f 100644
--- a/backend/capellacollab/core/logging/__init__.py
+++ b/backend/capellacollab/core/logging/__init__.py
@@ -80,11 +80,9 @@ async def dispatch(
call_next: base.RequestResponseEndpoint,
):
try:
- oidc_provider_config = (
- await auth_injectables.get_oidc_provider_config()
- )
+ oidc_config = await auth_injectables.get_oidc_config()
username = await auth_injectables.get_username(
- request, oidc_provider_config
+ request, oidc_config
)
except fastapi.HTTPException:
username = "anonymous"
diff --git a/backend/tests/conftest.py b/backend/tests/conftest.py
index 1218ba50d..da5343f59 100644
--- a/backend/tests/conftest.py
+++ b/backend/tests/conftest.py
@@ -18,6 +18,7 @@
from testcontainers import postgres
from capellacollab.__main__ import app
+from capellacollab.core.authentication import oidc_provider
from capellacollab.core.database import migration
os.environ["DEVELOPMENT_MODE"] = "1"
@@ -93,8 +94,8 @@ def commit(*args, **kwargs):
@pytest.fixture()
def client(monkeypatch: pytest.MonkeyPatch) -> testclient.TestClient:
monkeypatch.setattr(
- "capellacollab.core.authentication.api_key_cookie.JWTConfigBorg",
- core_conftest.MockJWTConfigBorg,
+ "capellacollab.core.authentication.api_key_cookie.JWTConfig",
+ core_conftest.MockJWTConfig,
)
return testclient.TestClient(app, cookies={"id_token": "any"})
@@ -103,3 +104,15 @@ def client(monkeypatch: pytest.MonkeyPatch) -> testclient.TestClient:
@pytest.fixture(name="logger")
def fixture_logger() -> logging.LoggerAdapter:
return logging.LoggerAdapter(logging.getLogger())
+
+
+@pytest.fixture(name="mock_oidc_config")
+def fixture_mock_oidc_config():
+ return core_conftest.MockOIDCProviderConfig()
+
+
+@pytest.fixture(name="mock_oidc_provider")
+def fixture_mock_oidc_provider(
+ mock_oidc_config: oidc_provider.AbstractOIDCProviderConfig,
+):
+ return core_conftest.MockOIDCProvider(mock_oidc_config)
diff --git a/backend/tests/core/conftest.py b/backend/tests/core/conftest.py
index 5ab7c365f..3be79f875 100644
--- a/backend/tests/core/conftest.py
+++ b/backend/tests/core/conftest.py
@@ -2,10 +2,14 @@
# SPDX-License-Identifier: Apache-2.0
+import typing as t
+
import pytest
from fastapi import testclient
from capellacollab.__main__ import app
+from capellacollab.core.authentication import injectables as auth_injectables
+from capellacollab.core.authentication import oidc_provider
class MockPyJWK:
@@ -18,24 +22,103 @@ def get_signing_key_from_jwt(self, token: str):
return MockPyJWK()
-class MockJWTConfigBorg:
- _shared_state: dict[str, str] = {}
+class MockJWTConfig:
+ def __init__(
+ self, oidc_config: oidc_provider.AbstractOIDCProviderConfig
+ ) -> None:
+ self.oidc_config = oidc_config
+ self.jwks_client = MockJWKSClient()
+
+
+class MockOIDCProviderConfig(oidc_provider.AbstractOIDCProviderConfig):
+ def get_authorization_endpoint(self) -> str:
+ return "mock-authorization-endpoint"
+
+ def get_token_endpoint(self) -> str:
+ return "mock-token-endpoint"
+
+ def get_jwks_uri(self) -> str:
+ return "mock-jwks-uri"
+
+ def get_supported_signing_algorithms(self) -> list[str]:
+ return ["RS256"]
+
+ def get_issuer(self) -> str:
+ return "mock-issuer"
+
+ def get_scopes(self) -> list[str]:
+ return ["openid", "offline_access", "email"]
+
+ def get_client_secret(self) -> str:
+ return "mock-secret"
+
+ def get_client_id(self) -> str:
+ return "mock-client-id"
- def __init__(self) -> None:
- self.__dict__ = self._shared_state
- if not hasattr(self, "_jwks_client"):
- self.jwks_client = MockJWKSClient()
+class MockOIDCProvider(oidc_provider.AbstractOIDCProvider):
+ def __init__(self, oidc_config: oidc_provider.AbstractOIDCProviderConfig):
+ super().__init__(oidc_config)
+ self.oidc_config = oidc_config
- if not hasattr(self, "_supported_signing_algorithms"):
- self.supported_signing_algorithms = ["RS256"]
+ def get_authorization_url_with_parameters(
+ self,
+ ) -> t.Tuple[str, str, str, str]:
+ return (
+ "mock-auth-url",
+ "mock-state",
+ "mock-nonce",
+ "mock-code-verifier",
+ )
+ def exchange_code_for_tokens(
+ self, authorization_code: str, code_verifier: str
+ ) -> dict[str, t.Any]:
+ return {
+ "id_token": "mock-id-token",
+ "access-token": "mock-access-token",
+ "refresh-token": "mock-refresh-token",
+ }
+ def refresh_token(self, _refresh_token: str) -> dict[str, t.Any]:
+ return {
+ "id_token": "mock-id-token",
+ "access-token": "mock-access-token",
+ "refresh-token": "mock-refresh-token",
+ }
+
+
+@pytest.fixture(name="mock_oidc_provider_and_config")
+def fixture_mock_oidc_provider_and_config(
+ mock_oidc_config: oidc_provider.AbstractOIDCProviderConfig,
+ mock_oidc_provider: oidc_provider.AbstractOIDCProvider,
+):
+ async def get_mock_oidc_config() -> (
+ oidc_provider.AbstractOIDCProviderConfig
+ ):
+ return mock_oidc_config
+
+ async def get_mock_oidc_provider() -> oidc_provider.AbstractOIDCProvider:
+ return mock_oidc_provider
+
+ app.dependency_overrides[auth_injectables.get_oidc_config] = (
+ get_mock_oidc_config
+ )
+ app.dependency_overrides[auth_injectables.get_oidc_provider] = (
+ get_mock_oidc_provider
+ )
+
+ yield
+
+ del app.dependency_overrides[auth_injectables.get_oidc_config]
+ del app.dependency_overrides[auth_injectables.get_oidc_provider]
+
+
+@pytest.mark.usefixtures("mock_oidc_provider_and_config")
@pytest.fixture(name="unauthorized_client")
def fixture_unauthorized_client(monkeypatch: pytest.MonkeyPatch):
monkeypatch.setattr(
- "capellacollab.core.authentication.api_key_cookie.JWTConfigBorg",
- MockJWTConfigBorg,
+ "capellacollab.core.authentication.api_key_cookie.JWTConfig",
+ MockJWTConfig,
)
-
return testclient.TestClient(app)
diff --git a/backend/tests/core/test_auth.py b/backend/tests/core/test_auth.py
index 4ace9293f..6f47388e4 100644
--- a/backend/tests/core/test_auth.py
+++ b/backend/tests/core/test_auth.py
@@ -6,90 +6,15 @@
import pytest
from fastapi import status, testclient
-from sqlalchemy import orm
from capellacollab.core.authentication import (
api_key_cookie,
exceptions,
- flow,
+ oidc_provider,
routes,
)
-@pytest.fixture(name="mock_auth_endpoints")
-def fixture_mock_auth_endpoints(monkeypatch: pytest.MonkeyPatch):
- def mock_get_auth_endpoints() -> flow.AuthEndpoints:
- return {
- "authorization_endpoint": "https://pytest.mock/authorize",
- "token_endpoint": "https://pytest.mock/token",
- "jwks_uri": "https://pytest.mock/jwks_uri",
- }
-
- monkeypatch.setattr(flow, "get_auth_endpoints", mock_get_auth_endpoints)
-
-
-@pytest.mark.usefixtures("mock_auth_endpoints")
-def test_get_authorization_url_with_parameters(
- monkeypatch: pytest.MonkeyPatch,
-):
- mock_generate_token = mock.Mock(return_value="mock-token")
- monkeypatch.setattr("oauthlib.common.generate_token", mock_generate_token)
-
- mock_generate_nonce = mock.Mock(return_value="mock-nonce")
- monkeypatch.setattr("oauthlib.common.generate_nonce", mock_generate_nonce)
-
- monkeypatch.setattr(
- flow.auth_config, "redirect_uri", "https://pytest.mock/callback"
- )
- monkeypatch.setattr(flow.web_client, "client_id", "mock-clientID")
- monkeypatch.setattr(flow.auth_config, "scopes", ["openid", "profile"])
-
- auth_url, state, nonce, _ = flow.get_authorization_url_with_parameters()
-
- assert "https://pytest.mock/authorize" in auth_url
- assert "response_type=code" in auth_url
- assert "client_id=mock-clientID" in auth_url
- assert "redirect_uri=https%3A%2F%2Fpytest.mock%2Fcallback" in auth_url
- assert state == "mock-token"
- assert "state=mock-token" in auth_url
- assert nonce == "mock-nonce"
- assert "nonce=mock-nonce" in auth_url
- assert "code_challenge" in auth_url
- assert f"code_challenge_method={flow.CODE_CHALLENGE_METHOD}" in auth_url
-
-
-def test_get_redirect_url(
- unauthorized_client: testclient.TestClient, monkeypatch: pytest.MonkeyPatch
-):
- def mock_get_authorization_url_with_parameters():
- return (
- "mock-auth_url",
- "mock-state",
- "mock-nonce",
- "mock-code_verifier",
- )
-
- monkeypatch.setattr(
- flow,
- "get_authorization_url_with_parameters",
- mock_get_authorization_url_with_parameters,
- )
-
- response = unauthorized_client.get("api/v1/authentication")
- json_response = response.json()
-
- cookies = "".join(response.headers.get_list("set-cookie"))
-
- assert response.status_code == 200
- assert "auth_url" in json_response
- assert "state" in json_response
- assert "nonce" in json_response
- assert "code_verifier" in json_response
-
- assert 'id_token=""' in cookies
- assert 'refresh_token=""' in cookies
-
-
def test_missing_refresh_token(unauthorized_client: testclient.TestClient):
response = unauthorized_client.put("api/v1/authentication/tokens")
json_response = response.json()
@@ -100,7 +25,8 @@ def test_missing_refresh_token(unauthorized_client: testclient.TestClient):
@pytest.mark.usefixtures("mock_auth_endpoints")
def test_validate_id_token_nonce_mismatch(
- db: orm.Session, monkeypatch: pytest.MonkeyPatch
+ mock_oidc_config: oidc_provider.AbstractOIDCProviderConfig,
+ monkeypatch: pytest.MonkeyPatch,
):
mock_jwt_api_cookie = mock.MagicMock()
mock_jwt_api_cookie.return_value.validate_token.return_value = {
@@ -110,12 +36,13 @@ def test_validate_id_token_nonce_mismatch(
monkeypatch.setattr(api_key_cookie, "JWTAPIKeyCookie", mock_jwt_api_cookie)
with pytest.raises(exceptions.NonceMismatchError):
- routes.validate_id_token(db, "any", "correct-nonce")
+ routes.validate_id_token("any", mock_oidc_config, "correct-nonce")
@pytest.mark.usefixtures("mock_auth_endpoints")
def test_validate_id_token_audience_mismatch(
- db: orm.Session, monkeypatch: pytest.MonkeyPatch
+ mock_oidc_config: oidc_provider.AbstractOIDCProviderConfig,
+ monkeypatch: pytest.MonkeyPatch,
):
mock_jwt_api_cookie = mock.MagicMock()
mock_jwt_api_cookie.return_value.validate_token.return_value = {
@@ -124,7 +51,6 @@ def test_validate_id_token_audience_mismatch(
}
monkeypatch.setattr(api_key_cookie, "JWTAPIKeyCookie", mock_jwt_api_cookie)
- monkeypatch.setattr(flow.auth_config.client, "id", "mismatch-clientId")
with pytest.raises(exceptions.UnauthenticatedError):
- routes.validate_id_token(db, "any", "mock-nonce")
+ routes.validate_id_token("any", mock_oidc_config, "mock-nonce")
diff --git a/backend/tests/core/test_auth_injectables.py b/backend/tests/core/test_auth_injectables.py
index 7b637dcc5..e8d22fa56 100644
--- a/backend/tests/core/test_auth_injectables.py
+++ b/backend/tests/core/test_auth_injectables.py
@@ -20,12 +20,16 @@ def fixture_verify(request: pytest.FixtureRequest) -> bool:
@pytest.fixture(name="user2")
def fixture_user2(db: orm.Session) -> users_models.DatabaseUser:
- return users_crud.create_user(db, "user2", users_models.Role.USER)
+ return users_crud.create_user(
+ db, "user2", "user2", None, users_models.Role.USER
+ )
@pytest.fixture(name="admin2")
def fixture_admin2(db: orm.Session) -> users_models.DatabaseUser:
- return users_crud.create_user(db, "admin2", users_models.Role.ADMIN)
+ return users_crud.create_user(
+ db, "admin2", "admin2", None, users_models.Role.ADMIN
+ )
def test_role_verification_user_not_found(db: orm.Session, verify: bool):
@@ -106,7 +110,11 @@ def fixture_project_user_lead(
db: orm.Session, project: projects_models.DatabaseProject
) -> projects_users_models.ProjectUserAssociation:
user = users_crud.create_user(
- db, "project_user_lead", users_models.Role.USER
+ db,
+ "project_user_lead",
+ "project_user_lead",
+ None,
+ users_models.Role.USER,
)
return projects_users_crud.add_user_to_project(
db,
@@ -122,7 +130,11 @@ def fixture_project_user_write(
db: orm.Session, project: projects_models.DatabaseProject
) -> projects_users_models.ProjectUserAssociation:
user = users_crud.create_user(
- db, "project_user_write", users_models.Role.USER
+ db,
+ "project_user_write",
+ "project_user_write",
+ None,
+ users_models.Role.USER,
)
return projects_users_crud.add_user_to_project(
db,
@@ -138,7 +150,11 @@ def fixture_project_user_read(
db: orm.Session, project: projects_models.DatabaseProject
) -> projects_users_models.ProjectUserAssociation:
user = users_crud.create_user(
- db, "project_user_read", users_models.Role.USER
+ db,
+ "project_user_read",
+ "project_user_read",
+ None,
+ users_models.Role.USER,
)
return projects_users_crud.add_user_to_project(
db,
diff --git a/backend/tests/projects/test_projects_routes.py b/backend/tests/projects/test_projects_routes.py
index e6e71de87..29b6ff917 100644
--- a/backend/tests/projects/test_projects_routes.py
+++ b/backend/tests/projects/test_projects_routes.py
@@ -21,7 +21,9 @@
def test_get_internal_default_project_as_user(
client: testclient.TestClient, db: orm.Session, executor_name: str
):
- users_crud.create_user(db, executor_name, users_models.Role.USER)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.USER
+ )
response = client.get("/api/v1/projects/default")
@@ -40,7 +42,9 @@ def test_get_internal_default_project_as_user(
def test_get_projects_as_user_only_shows_default_internal_project(
client: testclient.TestClient, db: orm.Session, executor_name: str
):
- users_crud.create_user(db, executor_name, users_models.Role.USER)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.USER
+ )
response = client.get("/api/v1/projects")
@@ -74,7 +78,9 @@ def test_get_projects_as_admin(
project = projects_crud.create_project(
db, "test project", visibility=projects_models.Visibility.PRIVATE
)
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
response = client.get("/api/v1/projects")
@@ -93,7 +99,9 @@ def test_get_internal_projects_as_user(
project = projects_crud.create_project(
db, "test project", visibility=projects_models.Visibility.INTERNAL
)
- users_crud.create_user(db, executor_name, users_models.Role.USER)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.USER
+ )
response = client.get("/api/v1/projects")
@@ -109,7 +117,9 @@ def test_get_internal_projects_as_user(
def test_get_internal_projects_as_user_without_duplicates(
client: testclient.TestClient, db: orm.Session, executor_name: str
):
- user = users_crud.create_user(db, executor_name, users_models.Role.USER)
+ user = users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.USER
+ )
project = projects_crud.create_project(
db, "test project", visibility=projects_models.Visibility.INTERNAL
)
@@ -141,7 +151,9 @@ def test_get_internal_projects_as_user_without_duplicates(
def test_create_private_project_as_admin(
client: testclient.TestClient, db: orm.Session, executor_name: str
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
response = client.post(
"/api/v1/projects/",
@@ -162,7 +174,9 @@ def test_create_private_project_as_admin(
def test_create_internal_project_as_admin(
client: testclient.TestClient, db: orm.Session, executor_name: str
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
response = client.post(
"/api/v1/projects/",
@@ -184,7 +198,9 @@ def test_create_internal_project_as_admin(
def test_update_project_as_admin(
client: testclient.TestClient, db: orm.Session, executor_name: str
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
project = projects_crud.create_project(db, "new project")
assert project.slug == "new-project"
@@ -248,7 +264,9 @@ def test_delete_pipeline_called_when_archiving_project(
mock_model = mock.Mock(name="DatabaseModel")
mock_pipeline = mock.Mock(name="DatabaseBackup")
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
mock_project.models = [mock_model]
with (
@@ -300,7 +318,9 @@ def test_get_project_per_role_manager(client: testclient.TestClient):
def test_get_project_per_role_admin(
client: testclient.TestClient, executor_name: str, db: orm.Session
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
response = client.get("/api/v1/projects/?minimum_role=administrator")
assert response.status_code == 200
diff --git a/backend/tests/projects/test_projects_users_routes.py b/backend/tests/projects/test_projects_users_routes.py
index 63b0b1d95..3b5f59bf9 100644
--- a/backend/tests/projects/test_projects_users_routes.py
+++ b/backend/tests/projects/test_projects_users_routes.py
@@ -20,8 +20,12 @@ def test_assign_read_write_permission_when_adding_manager(
unique_username: str,
project: projects_models.DatabaseProject,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
- user = users_crud.create_user(db, unique_username, users_models.Role.USER)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
+ user = users_crud.create_user(
+ db, unique_username, unique_username, None, users_models.Role.USER
+ )
response = client.post(
f"/api/v1/projects/{project.slug}/users/",
@@ -53,8 +57,12 @@ def test_assign_read_write_permission_when_changing_project_role_to_manager(
unique_username: str,
project: projects_models.DatabaseProject,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
- user = users_crud.create_user(db, unique_username, users_models.Role.USER)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
+ user = users_crud.create_user(
+ db, unique_username, unique_username, None, users_models.Role.USER
+ )
projects_users_crud.add_user_to_project(
db,
@@ -92,8 +100,12 @@ def test_http_exception_when_updating_permission_of_manager(
unique_username: str,
project: projects_models.DatabaseProject,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
- user = users_crud.create_user(db, unique_username, users_models.Role.USER)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
+ user = users_crud.create_user(
+ db, unique_username, unique_username, None, users_models.Role.USER
+ )
projects_users_crud.add_user_to_project(
db,
@@ -131,7 +143,9 @@ def test_current_user_rights_for_internal_project(
visibility=projects_models.Visibility.INTERNAL
),
)
- users_crud.create_user(db, executor_name, users_models.Role.USER)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.USER
+ )
response = client.get(
f"/api/v1/projects/{project.slug}/users/current",
@@ -155,7 +169,9 @@ def test_no_user_rights_on_internal_permissions(
visibility=projects_models.Visibility.PRIVATE
),
)
- users_crud.create_user(db, executor_name, users_models.Role.USER)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.USER
+ )
response = client.get(
f"/api/v1/projects/{project.slug}/users/current",
diff --git a/backend/tests/projects/toolmodels/pipelines/pipeline-runs/test_pipeline_runs.py b/backend/tests/projects/toolmodels/pipelines/pipeline-runs/test_pipeline_runs.py
index ad8f0d244..f285acb1d 100644
--- a/backend/tests/projects/toolmodels/pipelines/pipeline-runs/test_pipeline_runs.py
+++ b/backend/tests/projects/toolmodels/pipelines/pipeline-runs/test_pipeline_runs.py
@@ -196,7 +196,9 @@ def test_mask_logs(
db: orm.Session,
executor_name: str,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
mock_fetch_logs.return_value = [
{
diff --git a/backend/tests/projects/toolmodels/test_toolmodel_routes.py b/backend/tests/projects/toolmodels/test_toolmodel_routes.py
index 293fd807f..9ed96f258 100644
--- a/backend/tests/projects/toolmodels/test_toolmodel_routes.py
+++ b/backend/tests/projects/toolmodels/test_toolmodel_routes.py
@@ -49,7 +49,9 @@ def test_rename_toolmodel_successful(
executor_name: str,
db: orm.Session,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
response = client.patch(
f"/api/v1/projects/{project.slug}/models/{capella_model.slug}",
@@ -70,7 +72,9 @@ def test_rename_toolmodel_where_name_already_exists(
executor_name: str,
db: orm.Session,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
with mock.patch(
"capellacollab.projects.toolmodels.crud.get_model_by_slugs",
@@ -97,7 +101,9 @@ def test_update_toolmodel_order_successful(
executor_name: str,
db: orm.Session,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
response = client.patch(
f"/api/v1/projects/{project.slug}/models/{capella_model.slug}",
diff --git a/backend/tests/sessions/hooks/test_t4c_hook.py b/backend/tests/sessions/hooks/test_t4c_hook.py
index 9945294ee..458c13b6b 100644
--- a/backend/tests/sessions/hooks/test_t4c_hook.py
+++ b/backend/tests/sessions/hooks/test_t4c_hook.py
@@ -235,7 +235,11 @@ def test_t4c_connection_hook_shared_session(
session: sessions_models.DatabaseSession,
):
user2 = users_crud.create_user(
- db, "shared_with_user", users_models.Role.USER
+ db,
+ "shared_with_user",
+ "shared_with_user",
+ None,
+ users_models.Role.USER,
)
session.owner = user2
result = t4c.T4CIntegration().session_connection_hook(
diff --git a/backend/tests/sessions/test_session_routes.py b/backend/tests/sessions/test_session_routes.py
index ca2663e68..1f3b15d0b 100644
--- a/backend/tests/sessions/test_session_routes.py
+++ b/backend/tests/sessions/test_session_routes.py
@@ -267,7 +267,7 @@ def test_own_sessions(
tool_version: tools_models.DatabaseVersion,
):
another_user = users_crud.create_user(
- db, "other-user", users_models.Role.USER
+ db, "other-user", "other-user", None, users_models.Role.USER
)
session_of_other_user = sessions_models.DatabaseSession(
diff --git a/backend/tests/sessions/test_session_sharing.py b/backend/tests/sessions/test_session_sharing.py
index bb690e28b..e71be0c41 100644
--- a/backend/tests/sessions/test_session_sharing.py
+++ b/backend/tests/sessions/test_session_sharing.py
@@ -28,7 +28,11 @@ def fixture_enable_tool_session_sharing(
@pytest.fixture(name="shared_with_user")
def fixture_shared_with_user(db: orm.Session) -> users_models.DatabaseUser:
user2 = users_crud.create_user(
- db, "shared_with_user", users_models.Role.USER
+ db,
+ "shared_with_user",
+ "shared_with_user",
+ None,
+ users_models.Role.USER,
)
return user2
@@ -86,7 +90,9 @@ def test_session_is_already_shared(
client: testclient.TestClient,
db: orm.Session,
):
- user2 = users_crud.create_user(db, "user2", users_models.Role.USER)
+ user2 = users_crud.create_user(
+ db, "user2", "user2", None, users_models.Role.USER
+ )
response = client.post(
f"/api/v1/sessions/{session.id}/shares",
json={
@@ -130,7 +136,9 @@ def test_share_session_not_owned(
shared_session: sessions_models.DatabaseSession,
client: testclient.TestClient,
):
- user3 = users_crud.create_user(db, "user3", users_models.Role.USER)
+ user3 = users_crud.create_user(
+ db, "user3", "user3", None, users_models.Role.USER
+ )
response = client.post(
f"/api/v1/sessions/{shared_session.id}/shares",
@@ -161,7 +169,9 @@ def test_share_session(
client: testclient.TestClient,
db: orm.Session,
):
- user2 = users_crud.create_user(db, "user2", users_models.Role.USER)
+ user2 = users_crud.create_user(
+ db, "user2", "user2", None, users_models.Role.USER
+ )
response = client.post(
f"/api/v1/sessions/{session.id}/shares",
json={
@@ -224,7 +234,9 @@ def test_tool_doesnt_support_sharing(
db: orm.Session,
client: testclient.TestClient,
):
- user2 = users_crud.create_user(db, "user2", users_models.Role.USER)
+ user2 = users_crud.create_user(
+ db, "user2", "user2", None, users_models.Role.USER
+ )
response = client.post(
f"/api/v1/sessions/{session.id}/shares",
json={
diff --git a/backend/tests/settings/teamforcapella/test_t4c_instances.py b/backend/tests/settings/teamforcapella/test_t4c_instances.py
index 99f6911c6..63e1836c4 100644
--- a/backend/tests/settings/teamforcapella/test_t4c_instances.py
+++ b/backend/tests/settings/teamforcapella/test_t4c_instances.py
@@ -89,7 +89,9 @@ def test_create_t4c_instance_already_existing_name(
def test_get_t4c_instances(
client: testclient.TestClient, db: orm.Session, executor_name: str
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
response = client.get(
"/api/v1/settings/modelsources/t4c",
@@ -109,7 +111,9 @@ def test_get_t4c_instance(
executor_name: str,
t4c_instance: t4c_models.DatabaseT4CInstance,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
response = client.get(
f"/api/v1/settings/modelsources/t4c/{t4c_instance.id}",
@@ -127,7 +131,9 @@ def test_patch_t4c_instance(
executor_name: str,
t4c_instance: t4c_models.DatabaseT4CInstance,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
response = client.patch(
f"/api/v1/settings/modelsources/t4c/{t4c_instance.id}",
@@ -156,7 +162,9 @@ def test_patch_archived_t4c_instance_error(
executor_name: str,
t4c_instance: t4c_models.DatabaseT4CInstance,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
t4c_crud.update_t4c_instance(
db, t4c_instance, t4c_models.PatchT4CInstance(is_archived=True)
@@ -178,7 +186,9 @@ def test_unarchive_t4c_instance(
executor_name: str,
t4c_instance: t4c_models.DatabaseT4CInstance,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
t4c_crud.update_t4c_instance(
db, t4c_instance, t4c_models.PatchT4CInstance(is_archived=True)
@@ -253,7 +263,9 @@ def test_injectables_raise_when_archived_instance(
executor_name: str,
t4c_instance: t4c_models.DatabaseT4CInstance,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
t4c_crud.update_t4c_instance(
db, t4c_instance, t4c_models.PatchT4CInstance(is_archived=True)
@@ -271,7 +283,9 @@ def test_update_t4c_instance_password_empty_string(
executor_name: str,
t4c_instance: t4c_models.DatabaseT4CInstance,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
expected_password = t4c_instance.password
@@ -297,7 +311,9 @@ def test_get_t4c_license_usage(
executor_name: str,
t4c_instance: t4c_models.DatabaseT4CInstance,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
response = client.get(
f"/api/v1/settings/modelsources/t4c/{t4c_instance.id}/licenses",
)
@@ -314,7 +330,9 @@ def test_get_t4c_license_usage_no_status(
executor_name: str,
t4c_instance: t4c_models.DatabaseT4CInstance,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
responses.get(
"http://localhost:8086/status/json",
status=status.HTTP_200_OK,
diff --git a/backend/tests/settings/test_alerts.py b/backend/tests/settings/test_alerts.py
index 5420c5afc..48893596b 100644
--- a/backend/tests/settings/test_alerts.py
+++ b/backend/tests/settings/test_alerts.py
@@ -14,7 +14,9 @@
def test_get_alerts(client: TestClient, db: orm.Session, executor_name: str):
- users_crud.create_user(db, executor_name, users_models.Role.USER)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.USER
+ )
notices_crud.create_notice(
db,
notices_models.CreateNoticeRequest(
@@ -38,7 +40,9 @@ def test_get_alerts(client: TestClient, db: orm.Session, executor_name: str):
def test_create_alert2(
client: TestClient, db: orm.Session, executor_name: str
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
response = client.post(
"/api/v1/notices",
@@ -57,7 +61,9 @@ def test_create_alert2(
def test_delete_alert(client: TestClient, db: orm.Session, executor_name: str):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
alert = notices_crud.create_notice(
db,
notices_models.CreateNoticeRequest(
diff --git a/backend/tests/settings/test_global_configuration.py b/backend/tests/settings/test_global_configuration.py
index aa6b5022c..2c8531939 100644
--- a/backend/tests/settings/test_global_configuration.py
+++ b/backend/tests/settings/test_global_configuration.py
@@ -111,7 +111,9 @@ def test_update_general_configuration_additional_properties_fails(
def test_metadata_is_updated(
client: testclient.TestClient, db: orm.Session, executor_name: str
):
- admin = users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ admin = users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
def get_mock_own_user():
return admin
diff --git a/backend/tests/test_event_creation.py b/backend/tests/test_event_creation.py
index 13d379bcf..2589dc684 100644
--- a/backend/tests/test_event_creation.py
+++ b/backend/tests/test_event_creation.py
@@ -37,7 +37,7 @@ def test_create_admin_user_by_system(db):
def test_create_user_created_event(client, db, executor_name, unique_username):
executor = users_crud.create_user(
- db, executor_name, users_models.Role.ADMIN
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
)
response = client.post(
@@ -61,7 +61,7 @@ def test_create_user_created_event(client, db, executor_name, unique_username):
def test_user_deleted_cleanup(client, db, executor_name, unique_username):
executor = users_crud.create_user(
- db, executor_name, users_models.Role.ADMIN
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
)
response = client.post(
@@ -106,9 +106,11 @@ def test_create_assign_user_role_event(
expected_event_type,
):
executor = users_crud.create_user(
- db, executor_name, users_models.Role.ADMIN
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
+ user = users_crud.create_user(
+ db, unique_username, unique_username, None, initial_role
)
- user = users_crud.create_user(db, unique_username, initial_role)
response = client.patch(
f"/api/v1/users/{user.id}",
@@ -152,9 +154,11 @@ def test_create_user_added_to_project_event(
expected_permission_event_type,
):
executor = users_crud.create_user(
- db, executor_name, users_models.Role.ADMIN
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
+ user = users_crud.create_user(
+ db, unique_username, unique_username, None, users_models.Role.USER
)
- user = users_crud.create_user(db, unique_username, users_models.Role.USER)
response = client.post(
f"/api/v1/projects/{project.slug}/users/",
@@ -191,9 +195,11 @@ def test_create_user_removed_from_project_event(
client, db, executor_name, unique_username, project
):
executor = users_crud.create_user(
- db, executor_name, users_models.Role.ADMIN
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
+ user = users_crud.create_user(
+ db, unique_username, unique_username, None, users_models.Role.USER
)
- user = users_crud.create_user(db, unique_username, users_models.Role.USER)
projects_users_crud.add_user_to_project(
db,
@@ -228,9 +234,11 @@ def test_create_manager_added_to_project_event(
client, db, executor_name, unique_username, project
):
executor = users_crud.create_user(
- db, executor_name, users_models.Role.ADMIN
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
+ user = users_crud.create_user(
+ db, unique_username, unique_username, None, users_models.Role.USER
)
- user = users_crud.create_user(db, unique_username, users_models.Role.USER)
response = client.post(
f"/api/v1/projects/{project.slug}/users/",
@@ -287,9 +295,11 @@ def test_create_user_permission_change_event(
expected_permission_event_type,
):
executor = users_crud.create_user(
- db, executor_name, users_models.Role.ADMIN
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
+ user = users_crud.create_user(
+ db, unique_username, unique_username, None, users_models.Role.USER
)
- user = users_crud.create_user(db, unique_username, users_models.Role.USER)
projects_users_crud.add_user_to_project(
db,
@@ -347,9 +357,11 @@ def test_create_user_role_change_event(
expected_role_event_type,
):
executor = users_crud.create_user(
- db, executor_name, users_models.Role.ADMIN
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
+ user = users_crud.create_user(
+ db, unique_username, unique_username, None, users_models.Role.USER
)
- user = users_crud.create_user(db, unique_username, users_models.Role.USER)
projects_users_crud.add_user_to_project(
db,
diff --git a/backend/tests/users/conftest.py b/backend/tests/users/conftest.py
index 60e5a8c2e..38ccb53e4 100644
--- a/backend/tests/users/conftest.py
+++ b/backend/tests/users/conftest.py
@@ -13,7 +13,9 @@
@pytest.fixture(name="unauthenticated_user")
def fixture_unauthenticated_user(db):
- user = users_crud.create_user(db, str(uuid1()), users_models.Role.USER)
+ user = users_crud.create_user(
+ db, str(uuid1()), str(uuid1()), None, users_models.Role.USER
+ )
def get_mock_own_user():
return user
diff --git a/backend/tests/users/fixtures.py b/backend/tests/users/fixtures.py
index d26b37789..4d614dd7e 100644
--- a/backend/tests/users/fixtures.py
+++ b/backend/tests/users/fixtures.py
@@ -39,7 +39,9 @@ def fixture_unique_username() -> str:
def fixture_basic_user(
db: orm.Session, executor_name: str
) -> users_models.DatabaseUser:
- return users_crud.create_user(db, executor_name, users_models.Role.USER)
+ return users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.USER
+ )
@pytest.fixture(name="user")
@@ -60,7 +62,9 @@ def get_mock_own_user():
def fixture_admin(
db: orm.Session, executor_name: str
) -> t.Generator[users_models.DatabaseUser, None, None]:
- admin = users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ admin = users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
def get_mock_own_user():
return admin
@@ -74,7 +78,9 @@ def get_mock_own_user():
@pytest.fixture(name="test_user")
def fixture_test_user(db: orm.Session) -> users_models.DatabaseUser:
- return users_crud.create_user(db, "testuser", users_models.Role.USER)
+ return users_crud.create_user(
+ db, "testuser", "testuser", None, users_models.Role.USER
+ )
@pytest.fixture(name="user_workspace")
diff --git a/backend/tests/users/test_oauth.py b/backend/tests/users/test_oauth.py
index 21f517ff1..ec6eee91e 100644
--- a/backend/tests/users/test_oauth.py
+++ b/backend/tests/users/test_oauth.py
@@ -14,7 +14,9 @@ def test_validate_tokens_routes(
client: testclient.TestClient,
executor_name: str,
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
response = client.get("/api/v1/authentication/tokens")
assert response.status_code == 200
diff --git a/backend/tests/users/test_users.py b/backend/tests/users/test_users.py
index e99ee9c4e..f6acc8da6 100644
--- a/backend/tests/users/test_users.py
+++ b/backend/tests/users/test_users.py
@@ -20,8 +20,10 @@
def test_get_user_by_id_admin(
client: testclient.TestClient, db: orm.Session, executor_name: str
):
- users_crud.create_user(db, executor_name, users_models.Role.ADMIN)
- user = users_crud.create_user(db, "test_user")
+ users_crud.create_user(
+ db, executor_name, executor_name, None, users_models.Role.ADMIN
+ )
+ user = users_crud.create_user(db, "test_user", "test_user")
response = client.get(f"/api/v1/users/{user.id}")
assert response.status_code == 200
@@ -32,7 +34,7 @@ def test_get_user_by_id_admin(
def test_get_user_by_id_non_admin(
client: testclient.TestClient, db: orm.Session
):
- user = users_crud.create_user(db, "test_user")
+ user = users_crud.create_user(db, "test_user", "test_user")
response = client.get(f"/api/v1/users/{user.id}")
assert response.status_code == 403
@@ -44,7 +46,7 @@ def test_get_user_by_id_common_project(
db: orm.Session,
project: projects_models.DatabaseProject,
):
- user2 = users_crud.create_user(db, "user2")
+ user2 = users_crud.create_user(db, "user2", "user2")
projects_users_crud.add_user_to_project(
db,
project,
@@ -62,7 +64,7 @@ def test_get_user_by_id_common_project(
def test_get_no_common_projects(
client: testclient.TestClient, db: orm.Session
):
- user2 = users_crud.create_user(db, "user2")
+ user2 = users_crud.create_user(db, "user2", "user2")
response = client.get(f"/api/v1/users/{user2.id}/common-projects")
assert response.status_code == 200
assert len(response.json()) == 0
@@ -74,7 +76,7 @@ def test_get_common_projects(
db: orm.Session,
project: projects_models.DatabaseProject,
):
- user2 = users_crud.create_user(db, "user2")
+ user2 = users_crud.create_user(db, "user2", "user2")
projects_users_crud.add_user_to_project(
db,
project,
From e773ef11bf5850ac6d0e632ce4a73a76b176ac5e Mon Sep 17 00:00:00 2001
From: MoritzWeber
Date: Tue, 30 Jul 2024 13:29:05 +0200
Subject: [PATCH 8/8] refactor: Clean up authentication code; add tests for
OIDC
---
.gitattributes | 1 +
Makefile | 4 +-
.../f3d2dedd7906_add_jupyter_token_column.py | 2 +-
.../core/authentication/api_key_cookie.py | 20 +-
.../core/authentication/injectables.py | 26 +-
.../core/authentication/models.py | 7 +
.../{oidc_provider.py => oidc.py} | 79 +-
.../core/authentication/routes.py | 87 +-
.../capellacollab/core/logging/__init__.py | 5 +-
backend/capellacollab/projects/routes.py | 1 -
backend/capellacollab/sessions/routes.py | 3 +-
.../settings/configuration/routes.py | 5 +-
.../integrations/purevariants/routes.py | 1 +
backend/capellacollab/users/models.py | 1 +
backend/tests/conftest.py | 28 +-
backend/tests/core/conftest.py | 124 -
backend/tests/core/test_auth.py | 56 -
backend/tests/core/test_auth_routes.py | 236 ++
.../tests/projects/test_projects_routes.py | 51 +-
.../sessions/hooks/test_guacamole_hook.py | 10 +-
.../sessions/test_session_environment.py | 4 +-
backend/tests/sessions/test_session_routes.py | 1 +
.../teamforcapella/test_t4c_instances.py | 4 +-
.../settings/test_global_configuration.py | 13 +-
backend/tests/test_event_creation.py | 104 +-
backend/tests/test_metrics.py | 5 +-
.../tests/tools/test_tools_natures_routes.py | 3 +-
backend/tests/tools/test_tools_routes.py | 6 +-
.../versions/test_tools_version_routes.py | 3 +-
backend/tests/users/fixtures.py | 2 +-
backend/tests/users/test_users.py | 4 +-
frontend/Makefile | 13 +-
.../auth/auth-guard/auth-guard.service.ts | 4 +-
.../auth-redirect/auth-redirect.component.ts | 14 +-
.../app/general/auth/auth/auth.component.ts | 4 +-
.../auth/http-interceptor/auth.interceptor.ts | 8 +-
.../logout-redirect.component.ts | 4 +-
.../app/general/header/header.component.ts | 4 +-
.../nav-bar-menu/nav-bar-menu.component.ts | 4 +-
.../src/app/openapi/.openapi-generator/FILES | 5 +-
frontend/src/app/openapi/api/api.ts | 10 +-
.../app/openapi/api/authentication.service.ts | 424 +++
.../app/openapi/api/configuration.service.ts | 307 ++
.../src/app/openapi/api/default.service.ts | 960 ------
.../api/integrations-pure-variants.service.ts | 421 +++
.../openapi/api/projects-models.service.ts | 2656 +----------------
...e-request.ts => authorization-response.ts} | 12 +-
frontend/src/app/openapi/model/base-user.ts | 1 +
frontend/src/app/openapi/model/models.ts | 1 +
frontend/src/app/openapi/model/user.ts | 1 +
.../service/model-complexity-badge.service.ts | 8 +-
.../src/app/services/auth/auth.service.ts | 55 +-
.../src/app/services/user/user.service.ts | 4 +-
.../active-sessions.stories.ts | 4 +
.../tool-details/tool-details.component.html | 2 +-
.../tool-nature/tool-nature.component.html | 2 +-
.../tool-version/tool-version.component.html | 2 +-
.../user-settings.component.html | 8 +-
.../user-information.component.html | 4 +-
.../user-information.stories.ts | 8 +-
.../user-workspaces.component.ts | 7 +-
frontend/src/storybook/user.ts | 3 +-
helm/config/oauth.json | 27 +-
helm/templates/mock/oauth.deployment.yaml | 2 +-
64 files changed, 1773 insertions(+), 4112 deletions(-)
rename backend/capellacollab/core/authentication/{oidc_provider.py => oidc.py} (74%)
delete mode 100644 backend/tests/core/conftest.py
delete mode 100644 backend/tests/core/test_auth.py
create mode 100644 backend/tests/core/test_auth_routes.py
create mode 100644 frontend/src/app/openapi/api/authentication.service.ts
create mode 100644 frontend/src/app/openapi/api/configuration.service.ts
delete mode 100644 frontend/src/app/openapi/api/default.service.ts
create mode 100644 frontend/src/app/openapi/api/integrations-pure-variants.service.ts
rename frontend/src/app/openapi/model/{patch-user-role-request.ts => authorization-response.ts} (71%)
diff --git a/.gitattributes b/.gitattributes
index 44c7cb240..7925f93cc 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -6,3 +6,4 @@
*.{sh,py} text eol=lf
.git_archival.txt export-subst
*.mp4 filter=lfs diff=lfs merge=lfs -text
+frontend/src/app/openapi/** linguist-generated=true
diff --git a/Makefile b/Makefile
index df958368f..b84bee372 100644
--- a/Makefile
+++ b/Makefile
@@ -96,8 +96,8 @@ helm-deploy:
--set docker.registry.sessions=$(CAPELLACOLLAB_SESSIONS_REGISTRY) \
--set docker.tag=$(DOCKER_TAG) \
--set mocks.oauth=True \
- --set authentication.claimMapping.username=sub \
- --set authentication.endpoints.authorization=https://localhost/default/authorize \
+ --set backend.authentication.claimMapping.username=sub \
+ --set backend.authentication.endpoints.authorization=https://localhost/default/authorize \
--set development=$(DEVELOPMENT_MODE) \
--set cluster.ingressClassName=traefik \
--set cluster.ingressNamespace=kube-system \
diff --git a/backend/capellacollab/alembic/versions/f3d2dedd7906_add_jupyter_token_column.py b/backend/capellacollab/alembic/versions/f3d2dedd7906_add_jupyter_token_column.py
index c9a9184d2..9b043d46a 100644
--- a/backend/capellacollab/alembic/versions/f3d2dedd7906_add_jupyter_token_column.py
+++ b/backend/capellacollab/alembic/versions/f3d2dedd7906_add_jupyter_token_column.py
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
# SPDX-License-Identifier: Apache-2.0
-"""Commit message
+"""Add column for Jupyter token
Revision ID: f3d2dedd7906
Revises: 4df9c82766e2
diff --git a/backend/capellacollab/core/authentication/api_key_cookie.py b/backend/capellacollab/core/authentication/api_key_cookie.py
index 772508e59..9a6c34c3f 100644
--- a/backend/capellacollab/core/authentication/api_key_cookie.py
+++ b/backend/capellacollab/core/authentication/api_key_cookie.py
@@ -11,7 +11,7 @@
from capellacollab.config import config
-from . import exceptions, oidc_provider
+from . import exceptions, oidc
log = logging.getLogger(__name__)
@@ -21,7 +21,7 @@
class JWTConfig:
_jwks_client = None
- def __init__(self, oidc_config: oidc_provider.AbstractOIDCProviderConfig):
+ def __init__(self, oidc_config: oidc.OIDCProviderConfig):
self.oidc_config = oidc_config
if JWTConfig._jwks_client is None:
@@ -32,10 +32,10 @@ def __init__(self, oidc_config: oidc_provider.AbstractOIDCProviderConfig):
class JWTAPIKeyCookie(security.APIKeyCookie):
- def __init__(self, oidc_config: oidc_provider.AbstractOIDCProviderConfig):
+ def __init__(self):
super().__init__(name="id_token", auto_error=True)
- self.oidc_config = oidc_config
- self.jwt_config = JWTConfig(oidc_config)
+ self.oidc_config = oidc.get_cached_oidc_config()
+ self.jwt_config = JWTConfig(self.oidc_config)
async def __call__(self, request: fastapi.Request) -> str:
token: str | None = await super().__call__(request)
@@ -62,6 +62,16 @@ def validate_token(self, token: str) -> dict[str, t.Any]:
)
except jwt_exceptions.ExpiredSignatureError:
raise exceptions.TokenSignatureExpired()
+ except jwt_exceptions.InvalidIssuerError:
+ log.exception(
+ "Expected issuer '%s'. Got '%s'",
+ self.oidc_config.get_issuer(),
+ jwt.decode(
+ jwt=token,
+ options={"verify_signature": False},
+ )["iss"],
+ )
+ raise exceptions.JWTValidationFailed()
except jwt_exceptions.PyJWTError:
log.exception("JWT validation failed", exc_info=True)
raise exceptions.JWTValidationFailed()
diff --git a/backend/capellacollab/core/authentication/injectables.py b/backend/capellacollab/core/authentication/injectables.py
index 844c1a749..e85e95d14 100644
--- a/backend/capellacollab/core/authentication/injectables.py
+++ b/backend/capellacollab/core/authentication/injectables.py
@@ -4,7 +4,6 @@
from __future__ import annotations
import dataclasses
-import functools
import logging
import fastapi
@@ -24,28 +23,11 @@
from capellacollab.users import exceptions as users_exceptions
from capellacollab.users import models as users_models
-from . import exceptions, oidc_provider
+from . import exceptions
logger = logging.getLogger(__name__)
-@functools.lru_cache
-def get_cached_oidc_config() -> oidc_provider.AbstractOIDCProviderConfig:
- return oidc_provider.WellKnownOIDCProviderConfig()
-
-
-async def get_oidc_config() -> oidc_provider.AbstractOIDCProviderConfig:
- return get_cached_oidc_config()
-
-
-async def get_oidc_provider(
- oidc_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
- get_oidc_config
- ),
-) -> oidc_provider.AbstractOIDCProvider:
- return oidc_provider.OIDCProvider(oidc_config)
-
-
class OpenAPIFakeBase(security_base.SecurityBase):
"""Fake class to display the authentication methods in the OpenAPI docs
@@ -79,13 +61,10 @@ class OpenAPIPersonalAccessToken(OpenAPIFakeBase):
async def get_username(
request: fastapi.Request,
- oidc_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
- get_oidc_config
- ),
_unused1=fastapi.Depends(OpenAPIPersonalAccessToken()),
) -> str:
if request.cookies.get("id_token"):
- username = await api_key_cookie.JWTAPIKeyCookie(oidc_config)(request)
+ username = await api_key_cookie.JWTAPIKeyCookie()(request)
return username
authorization = request.headers.get("Authorization")
@@ -99,7 +78,6 @@ async def get_username(
case _:
raise exceptions.UnknownScheme(scheme)
- assert username
return username
diff --git a/backend/capellacollab/core/authentication/models.py b/backend/capellacollab/core/authentication/models.py
index 2a4d936ef..7dadb470b 100644
--- a/backend/capellacollab/core/authentication/models.py
+++ b/backend/capellacollab/core/authentication/models.py
@@ -9,3 +9,10 @@ class TokenRequest(core_pydantic.BaseModel):
code: str
nonce: str
code_verifier: str
+
+
+class AuthorizationResponse(core_pydantic.BaseModel):
+ auth_url: str
+ state: str
+ nonce: str
+ code_verifier: str
diff --git a/backend/capellacollab/core/authentication/oidc_provider.py b/backend/capellacollab/core/authentication/oidc.py
similarity index 74%
rename from backend/capellacollab/core/authentication/oidc_provider.py
rename to backend/capellacollab/core/authentication/oidc.py
index 9970f473f..ea65eaadf 100644
--- a/backend/capellacollab/core/authentication/oidc_provider.py
+++ b/backend/capellacollab/core/authentication/oidc.py
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
# SPDX-License-Identifier: Apache-2.0
-import abc
+import functools
import logging
import typing as t
@@ -10,46 +10,12 @@
from capellacollab.config import config
-from . import exceptions
+from . import exceptions, models
logger = logging.getLogger(__name__)
-class AbstractOIDCProviderConfig(abc.ABC):
- @abc.abstractmethod
- def get_authorization_endpoint(self) -> str:
- pass
-
- @abc.abstractmethod
- def get_token_endpoint(self) -> str:
- pass
-
- @abc.abstractmethod
- def get_jwks_uri(self) -> str:
- pass
-
- @abc.abstractmethod
- def get_supported_signing_algorithms(self) -> list[str]:
- pass
-
- @abc.abstractmethod
- def get_issuer(self) -> str:
- pass
-
- @abc.abstractmethod
- def get_scopes(self) -> list[str]:
- pass
-
- @abc.abstractmethod
- def get_client_id(self) -> str:
- pass
-
- @abc.abstractmethod
- def get_client_secret(self) -> str:
- pass
-
-
-class WellKnownOIDCProviderConfig(AbstractOIDCProviderConfig):
+class OIDCProviderConfig:
def __init__(self):
self.well_known_uri = config.authentication.endpoints.well_known
self.well_known = self._fetch_well_known_configuration()
@@ -92,32 +58,16 @@ def get_client_id(self) -> str:
return config.authentication.client.id
-class AbstractOIDCProvider(abc.ABC):
- def __init__(self, oidc_config: AbstractOIDCProviderConfig):
- self.oidc_config = oidc_config
+@functools.lru_cache
+def get_cached_oidc_config() -> OIDCProviderConfig:
+ return OIDCProviderConfig()
- @abc.abstractmethod
- def get_authorization_url_with_parameters(
- self,
- ) -> t.Tuple[str, str, str, str]:
- pass
-
- @abc.abstractmethod
- def exchange_code_for_tokens(
- self, authorization_code: str, code_verifier: str
- ) -> dict[str, t.Any]:
- pass
-
- @abc.abstractmethod
- def refresh_token(self, _refresh_token: str) -> dict[str, t.Any]:
- pass
-
-class OIDCProvider(AbstractOIDCProvider):
+class OIDCProvider:
CODE_CHALLENGE_METHOD = "S256"
- def __init__(self, oidc_config: AbstractOIDCProviderConfig):
- super().__init__(oidc_config)
+ def __init__(self):
+ self.oidc_config = get_cached_oidc_config()
self.web_client: oauth2.WebApplicationClient = (
oauth2.WebApplicationClient(
client_id=self.oidc_config.get_client_id()
@@ -126,10 +76,10 @@ def __init__(self, oidc_config: AbstractOIDCProviderConfig):
def get_authorization_url_with_parameters(
self,
- ) -> t.Tuple[str, str, str, str]:
+ ) -> models.AuthorizationResponse:
state = common.generate_token()
-
nonce = common.generate_nonce()
+
code_verifier = self.web_client.create_code_verifier(length=43)
code_challenge = self.web_client.create_code_challenge(
code_verifier, OIDCProvider.CODE_CHALLENGE_METHOD
@@ -145,7 +95,12 @@ def get_authorization_url_with_parameters(
code_challenge_method=OIDCProvider.CODE_CHALLENGE_METHOD,
)
- return (auth_url, state, nonce, code_verifier)
+ return models.AuthorizationResponse(
+ auth_url=auth_url,
+ state=state,
+ nonce=nonce,
+ code_verifier=code_verifier,
+ )
def exchange_code_for_tokens(
self, authorization_code: str, code_verifier: str
diff --git a/backend/capellacollab/core/authentication/routes.py b/backend/capellacollab/core/authentication/routes.py
index 1974833d4..5fce7f9db 100644
--- a/backend/capellacollab/core/authentication/routes.py
+++ b/backend/capellacollab/core/authentication/routes.py
@@ -13,50 +13,34 @@
from capellacollab.users import crud as users_crud
from capellacollab.users import models as users_models
-from . import api_key_cookie, exceptions, injectables, models, oidc_provider
+from . import api_key_cookie, exceptions, models, oidc
-router = fastapi.APIRouter()
+router = fastapi.APIRouter(tags=["Authentication"])
-@router.get("", name="Get the authorization URL for the OAuth Server")
-async def get_redirect_url(
+@router.get("")
+async def get_authorization_url(
response: fastapi.Response,
- provider: oidc_provider.AbstractOIDCProvider = fastapi.Depends(
- injectables.get_oidc_provider
- ),
-) -> dict[str, str]:
- auth_url, state, nonce, code_verifier = (
- provider.get_authorization_url_with_parameters()
+) -> models.AuthorizationResponse:
+ authorization_response = (
+ oidc.OIDCProvider().get_authorization_url_with_parameters()
)
delete_token_cookies(response)
- return {
- "auth_url": auth_url,
- "state": state,
- "nonce": nonce,
- "code_verifier": code_verifier,
- }
+ return authorization_response
-@router.post("/tokens", name="Create the identity token")
-async def api_get_token(
+@router.post("/tokens")
+async def get_identity_token(
token_request: models.TokenRequest,
response: fastapi.Response,
db: orm.Session = fastapi.Depends(database.get_db),
- provider: oidc_provider.AbstractOIDCProvider = fastapi.Depends(
- injectables.get_oidc_provider
- ),
- oidc_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
- injectables.get_oidc_config
- ),
):
- tokens = provider.exchange_code_for_tokens(
+ tokens = oidc.OIDCProvider().exchange_code_for_tokens(
token_request.code, token_request.code_verifier
)
- validated_id_token = validate_id_token(
- tokens["id_token"], oidc_config, None
- )
+ validated_id_token = validate_id_token(tokens["id_token"], None)
user = create_or_update_user(db, validated_id_token)
update_token_cookies(
@@ -64,26 +48,18 @@ async def api_get_token(
)
-@router.put("/tokens", name="Refresh the identity token")
-async def api_refresh_token(
+@router.put("/tokens")
+async def refresh_identity_token(
response: fastapi.Response,
refresh_token: t.Annotated[str | None, fastapi.Cookie()] = None,
db: orm.Session = fastapi.Depends(database.get_db),
- provider: oidc_provider.AbstractOIDCProvider = fastapi.Depends(
- injectables.get_oidc_provider
- ),
- oidc_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
- injectables.get_oidc_config
- ),
-):
+) -> None:
if refresh_token is None or refresh_token == "":
raise exceptions.RefreshTokenCookieMissingError()
- tokens = provider.refresh_token(refresh_token)
+ tokens = oidc.OIDCProvider().refresh_token(refresh_token)
- validated_id_token = validate_id_token(
- tokens["id_token"], oidc_config, None
- )
+ validated_id_token = validate_id_token(tokens["id_token"], None)
user = create_or_update_user(db, validated_id_token)
update_token_cookies(
@@ -91,22 +67,19 @@ async def api_refresh_token(
)
-@router.delete("/tokens", name="Remove the token (log out)")
+@router.delete("/tokens")
async def logout(response: fastapi.Response):
delete_token_cookies(response)
return None
-@router.get("/tokens", name="Validate the token")
-async def validate_token(
+@router.get("/tokens")
+async def validate_jwt_token(
request: fastapi.Request,
scope: users_models.Role | None = None,
db: orm.Session = fastapi.Depends(database.get_db),
- oidc_config: oidc_provider.AbstractOIDCProviderConfig = fastapi.Depends(
- injectables.get_oidc_config
- ),
):
- username = await api_key_cookie.JWTAPIKeyCookie(oidc_config)(request)
+ username = await api_key_cookie.JWTAPIKeyCookie()(request)
if scope and scope.ADMIN:
auth_injectables.RoleVerification(
required_role=users_models.Role.ADMIN
@@ -116,12 +89,12 @@ async def validate_token(
def validate_id_token(
id_token: str,
- oidc_config: oidc_provider.AbstractOIDCProviderConfig,
nonce: str | None,
) -> dict[str, str]:
- validated_id_token = api_key_cookie.JWTAPIKeyCookie(
- oidc_config
- ).validate_token(id_token)
+ validated_id_token = api_key_cookie.JWTAPIKeyCookie().validate_token(
+ id_token
+ )
+ oidc_config = oidc.get_cached_oidc_config()
if nonce and not hmac.compare_digest(validated_id_token["nonce"], nonce):
raise exceptions.NonceMismatchError()
@@ -146,6 +119,16 @@ def create_or_update_user(
user = users_crud.create_user(db, username, idp_identifier, email)
events_crud.create_user_creation_event(db, user)
+ if user.email != email:
+ user = users_crud.update_user(
+ db, user, users_models.PatchUser(email=email)
+ )
+
+ if user.name != username:
+ user = users_crud.update_user(
+ db, user, users_models.PatchUser(name=username)
+ )
+
users_crud.update_last_login(db, user)
return user
diff --git a/backend/capellacollab/core/logging/__init__.py b/backend/capellacollab/core/logging/__init__.py
index 58cef5f9f..605bf3b2a 100644
--- a/backend/capellacollab/core/logging/__init__.py
+++ b/backend/capellacollab/core/logging/__init__.py
@@ -80,10 +80,7 @@ async def dispatch(
call_next: base.RequestResponseEndpoint,
):
try:
- oidc_config = await auth_injectables.get_oidc_config()
- username = await auth_injectables.get_username(
- request, oidc_config
- )
+ username = await auth_injectables.get_username(request)
except fastapi.HTTPException:
username = "anonymous"
diff --git a/backend/capellacollab/projects/routes.py b/backend/capellacollab/projects/routes.py
index 5d9481035..a26c4f941 100644
--- a/backend/capellacollab/projects/routes.py
+++ b/backend/capellacollab/projects/routes.py
@@ -199,7 +199,6 @@ def _delete_all_pipelines_for_project(
router.include_router(
toolmodels_routes.router,
prefix="/{project_slug}/models",
- tags=["Projects - Models"],
)
router.include_router(
projects_events_routes.router,
diff --git a/backend/capellacollab/sessions/routes.py b/backend/capellacollab/sessions/routes.py
index 5025d8abc..141825263 100644
--- a/backend/capellacollab/sessions/routes.py
+++ b/backend/capellacollab/sessions/routes.py
@@ -380,7 +380,8 @@ def get_session_connection_information(
key=c_key,
value=c_value,
path=f"/session/{session.id}",
- expires=datetime.datetime.now() + datetime.timedelta(hours=24),
+ expires=datetime.datetime.now(datetime.UTC)
+ + datetime.timedelta(hours=24),
)
return core_models.PayloadResponseModel(
diff --git a/backend/capellacollab/settings/configuration/routes.py b/backend/capellacollab/settings/configuration/routes.py
index 41fb29de6..d7dba4736 100644
--- a/backend/capellacollab/settings/configuration/routes.py
+++ b/backend/capellacollab/settings/configuration/routes.py
@@ -19,10 +19,11 @@
required_role=users_models.Role.ADMIN
)
)
- ]
+ ],
+ tags=["Configuration"],
)
-schema_router = fastapi.APIRouter(dependencies=[])
+schema_router = fastapi.APIRouter(dependencies=[], tags=["Configuration"])
@router.get(
diff --git a/backend/capellacollab/settings/integrations/purevariants/routes.py b/backend/capellacollab/settings/integrations/purevariants/routes.py
index b603d2256..dcc25b643 100644
--- a/backend/capellacollab/settings/integrations/purevariants/routes.py
+++ b/backend/capellacollab/settings/integrations/purevariants/routes.py
@@ -21,6 +21,7 @@
)
)
],
+ tags=["Integrations - PureVariants"],
)
diff --git a/backend/capellacollab/users/models.py b/backend/capellacollab/users/models.py
index 7e8ee71f0..0aa250916 100644
--- a/backend/capellacollab/users/models.py
+++ b/backend/capellacollab/users/models.py
@@ -29,6 +29,7 @@ class BaseUser(core_pydantic.BaseModel):
id: int
name: str
idp_identifier: str
+ email: str | None = None
role: Role
diff --git a/backend/tests/conftest.py b/backend/tests/conftest.py
index da5343f59..ced2d08b2 100644
--- a/backend/tests/conftest.py
+++ b/backend/tests/conftest.py
@@ -12,13 +12,11 @@
import pytest
import sqlalchemy
import sqlalchemy.exc
-from core import conftest as core_conftest
from fastapi import testclient
from sqlalchemy import engine, orm
from testcontainers import postgres
from capellacollab.__main__ import app
-from capellacollab.core.authentication import oidc_provider
from capellacollab.core.database import migration
os.environ["DEVELOPMENT_MODE"] = "1"
@@ -91,28 +89,16 @@ def commit(*args, **kwargs):
yield session
-@pytest.fixture()
-def client(monkeypatch: pytest.MonkeyPatch) -> testclient.TestClient:
- monkeypatch.setattr(
- "capellacollab.core.authentication.api_key_cookie.JWTConfig",
- core_conftest.MockJWTConfig,
- )
-
+@pytest.fixture(name="client")
+def fixture_client() -> testclient.TestClient:
return testclient.TestClient(app, cookies={"id_token": "any"})
+@pytest.fixture(name="client_unauthenticated")
+def fixture_client_unauthenticated() -> testclient.TestClient:
+ return testclient.TestClient(app)
+
+
@pytest.fixture(name="logger")
def fixture_logger() -> logging.LoggerAdapter:
return logging.LoggerAdapter(logging.getLogger())
-
-
-@pytest.fixture(name="mock_oidc_config")
-def fixture_mock_oidc_config():
- return core_conftest.MockOIDCProviderConfig()
-
-
-@pytest.fixture(name="mock_oidc_provider")
-def fixture_mock_oidc_provider(
- mock_oidc_config: oidc_provider.AbstractOIDCProviderConfig,
-):
- return core_conftest.MockOIDCProvider(mock_oidc_config)
diff --git a/backend/tests/core/conftest.py b/backend/tests/core/conftest.py
deleted file mode 100644
index 3be79f875..000000000
--- a/backend/tests/core/conftest.py
+++ /dev/null
@@ -1,124 +0,0 @@
-# SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
-# SPDX-License-Identifier: Apache-2.0
-
-
-import typing as t
-
-import pytest
-from fastapi import testclient
-
-from capellacollab.__main__ import app
-from capellacollab.core.authentication import injectables as auth_injectables
-from capellacollab.core.authentication import oidc_provider
-
-
-class MockPyJWK:
- def __init__(self) -> None:
- self.key = "mock-key"
-
-
-class MockJWKSClient:
- def get_signing_key_from_jwt(self, token: str):
- return MockPyJWK()
-
-
-class MockJWTConfig:
- def __init__(
- self, oidc_config: oidc_provider.AbstractOIDCProviderConfig
- ) -> None:
- self.oidc_config = oidc_config
- self.jwks_client = MockJWKSClient()
-
-
-class MockOIDCProviderConfig(oidc_provider.AbstractOIDCProviderConfig):
- def get_authorization_endpoint(self) -> str:
- return "mock-authorization-endpoint"
-
- def get_token_endpoint(self) -> str:
- return "mock-token-endpoint"
-
- def get_jwks_uri(self) -> str:
- return "mock-jwks-uri"
-
- def get_supported_signing_algorithms(self) -> list[str]:
- return ["RS256"]
-
- def get_issuer(self) -> str:
- return "mock-issuer"
-
- def get_scopes(self) -> list[str]:
- return ["openid", "offline_access", "email"]
-
- def get_client_secret(self) -> str:
- return "mock-secret"
-
- def get_client_id(self) -> str:
- return "mock-client-id"
-
-
-class MockOIDCProvider(oidc_provider.AbstractOIDCProvider):
- def __init__(self, oidc_config: oidc_provider.AbstractOIDCProviderConfig):
- super().__init__(oidc_config)
- self.oidc_config = oidc_config
-
- def get_authorization_url_with_parameters(
- self,
- ) -> t.Tuple[str, str, str, str]:
- return (
- "mock-auth-url",
- "mock-state",
- "mock-nonce",
- "mock-code-verifier",
- )
-
- def exchange_code_for_tokens(
- self, authorization_code: str, code_verifier: str
- ) -> dict[str, t.Any]:
- return {
- "id_token": "mock-id-token",
- "access-token": "mock-access-token",
- "refresh-token": "mock-refresh-token",
- }
-
- def refresh_token(self, _refresh_token: str) -> dict[str, t.Any]:
- return {
- "id_token": "mock-id-token",
- "access-token": "mock-access-token",
- "refresh-token": "mock-refresh-token",
- }
-
-
-@pytest.fixture(name="mock_oidc_provider_and_config")
-def fixture_mock_oidc_provider_and_config(
- mock_oidc_config: oidc_provider.AbstractOIDCProviderConfig,
- mock_oidc_provider: oidc_provider.AbstractOIDCProvider,
-):
- async def get_mock_oidc_config() -> (
- oidc_provider.AbstractOIDCProviderConfig
- ):
- return mock_oidc_config
-
- async def get_mock_oidc_provider() -> oidc_provider.AbstractOIDCProvider:
- return mock_oidc_provider
-
- app.dependency_overrides[auth_injectables.get_oidc_config] = (
- get_mock_oidc_config
- )
- app.dependency_overrides[auth_injectables.get_oidc_provider] = (
- get_mock_oidc_provider
- )
-
- yield
-
- del app.dependency_overrides[auth_injectables.get_oidc_config]
- del app.dependency_overrides[auth_injectables.get_oidc_provider]
-
-
-@pytest.mark.usefixtures("mock_oidc_provider_and_config")
-@pytest.fixture(name="unauthorized_client")
-def fixture_unauthorized_client(monkeypatch: pytest.MonkeyPatch):
- monkeypatch.setattr(
- "capellacollab.core.authentication.api_key_cookie.JWTConfig",
- MockJWTConfig,
- )
- return testclient.TestClient(app)
diff --git a/backend/tests/core/test_auth.py b/backend/tests/core/test_auth.py
deleted file mode 100644
index 6f47388e4..000000000
--- a/backend/tests/core/test_auth.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
-# SPDX-License-Identifier: Apache-2.0
-
-
-from unittest import mock
-
-import pytest
-from fastapi import status, testclient
-
-from capellacollab.core.authentication import (
- api_key_cookie,
- exceptions,
- oidc_provider,
- routes,
-)
-
-
-def test_missing_refresh_token(unauthorized_client: testclient.TestClient):
- response = unauthorized_client.put("api/v1/authentication/tokens")
- json_response = response.json()
-
- assert response.status_code == status.HTTP_400_BAD_REQUEST
- assert json_response["detail"]["err_code"] == "NO_REFRESH_TOKEN_COOKIE"
-
-
-@pytest.mark.usefixtures("mock_auth_endpoints")
-def test_validate_id_token_nonce_mismatch(
- mock_oidc_config: oidc_provider.AbstractOIDCProviderConfig,
- monkeypatch: pytest.MonkeyPatch,
-):
- mock_jwt_api_cookie = mock.MagicMock()
- mock_jwt_api_cookie.return_value.validate_token.return_value = {
- "nonce": "mismatch-nonce"
- }
-
- monkeypatch.setattr(api_key_cookie, "JWTAPIKeyCookie", mock_jwt_api_cookie)
-
- with pytest.raises(exceptions.NonceMismatchError):
- routes.validate_id_token("any", mock_oidc_config, "correct-nonce")
-
-
-@pytest.mark.usefixtures("mock_auth_endpoints")
-def test_validate_id_token_audience_mismatch(
- mock_oidc_config: oidc_provider.AbstractOIDCProviderConfig,
- monkeypatch: pytest.MonkeyPatch,
-):
- mock_jwt_api_cookie = mock.MagicMock()
- mock_jwt_api_cookie.return_value.validate_token.return_value = {
- "nonce": "mock-nonce",
- "aud": "mock-audience",
- }
-
- monkeypatch.setattr(api_key_cookie, "JWTAPIKeyCookie", mock_jwt_api_cookie)
-
- with pytest.raises(exceptions.UnauthenticatedError):
- routes.validate_id_token("any", mock_oidc_config, "mock-nonce")
diff --git a/backend/tests/core/test_auth_routes.py b/backend/tests/core/test_auth_routes.py
new file mode 100644
index 000000000..687362240
--- /dev/null
+++ b/backend/tests/core/test_auth_routes.py
@@ -0,0 +1,236 @@
+# SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
+# SPDX-License-Identifier: Apache-2.0
+
+
+from unittest import mock
+
+import pytest
+import responses
+from fastapi import status, testclient
+from sqlalchemy import orm
+
+from capellacollab.config import config
+from capellacollab.core.authentication import api_key_cookie, exceptions, oidc
+from capellacollab.core.authentication import routes
+from capellacollab.core.authentication import routes as auth_routes
+from capellacollab.users import crud as users_crud
+from capellacollab.users import models as users_models
+
+
+@pytest.fixture(name="mock_auth_endpoints")
+def fixture_mock_oidc_endpoints(monkeypatch: pytest.MonkeyPatch):
+ monkeypatch.setattr(
+ config.authentication.endpoints,
+ "well_known",
+ "https://mock.localhost/default/.well-known/openid-configuration",
+ )
+ responses.get(
+ "https://mock.localhost/default/.well-known/openid-configuration",
+ status=200,
+ json={
+ "authorization_endpoint": "https://mock.localhost/default/authorize",
+ "token_endpoint": "https://mock.localhost/default/token",
+ "jwks_uri": "https:///mock.localhost/default/jwks",
+ },
+ )
+
+
+@pytest.fixture(name="mock_token_creation")
+def fixture_mock_token_creation(monkeypatch: pytest.MonkeyPatch):
+ responses.post(
+ "https://mock.localhost/default/token",
+ status=200,
+ json={
+ "id_token": "id_token",
+ "refresh_token": "refresh_token",
+ "access_token": "access_token",
+ },
+ )
+
+ monkeypatch.setattr(config.authentication.client, "id", "client_id")
+ monkeypatch.setattr(
+ api_key_cookie.JWTAPIKeyCookie,
+ "validate_token",
+ lambda self, token: {
+ "nonce": "nonce",
+ "aud": "client_id",
+ "sub": "sub",
+ },
+ )
+
+
+@responses.activate
+@pytest.mark.usefixtures("mock_auth_endpoints")
+def test_get_prefilled_authorization_url(
+ client_unauthenticated: testclient.TestClient,
+):
+ """Get the authorization URL from the backend"""
+ response = client_unauthenticated.get("/api/v1/authentication")
+ assert response.status_code == status.HTTP_200_OK
+ assert response.json()["auth_url"].startswith(
+ "https://mock.localhost/default/authorize"
+ )
+
+
+@responses.activate
+@pytest.mark.usefixtures("mock_auth_endpoints", "mock_token_creation")
+def test_get_identity_token(
+ client_unauthenticated: testclient.TestClient,
+):
+ """Check that the identity token is set as cookie"""
+ response = client_unauthenticated.post(
+ "/api/v1/authentication/tokens",
+ json={"code": "any", "nonce": "nonce", "code_verifier": "any"},
+ )
+
+ assert response.status_code == status.HTTP_200_OK
+
+ assert "id_token" in response.headers["set-cookie"]
+ assert "refresh_token" in response.headers["set-cookie"]
+
+
+@responses.activate
+@pytest.mark.usefixtures("mock_auth_endpoints")
+def test_user_info_updated_on_login(
+ db: orm.Session,
+ monkeypatch: pytest.MonkeyPatch,
+ client_unauthenticated: testclient.TestClient,
+ user: users_models.DatabaseUser,
+):
+ """Propagate changes of the name or email fields of the JWT"""
+ monkeypatch.setattr(
+ oidc.OIDCProvider,
+ "exchange_code_for_tokens",
+ lambda *args: {"id_token": ""},
+ )
+ monkeypatch.setattr(
+ config.authentication.mapping, "identifier", "idp_identifier"
+ )
+ monkeypatch.setattr(
+ auth_routes,
+ "validate_id_token",
+ lambda *args: {
+ "idp_identifier": user.idp_identifier,
+ "sub": "new_name",
+ "email": "test@example.com",
+ },
+ )
+
+ response = client_unauthenticated.post(
+ "/api/v1/authentication/tokens",
+ json={"code": "any", "nonce": "nonce", "code_verifier": "any"},
+ )
+ assert response.status_code == status.HTTP_200_OK
+
+ updated_user = users_crud.get_user_by_idp_identifier(
+ db, user.idp_identifier
+ )
+ assert updated_user is not None
+ assert updated_user.name == "new_name"
+ assert updated_user.email == "test@example.com"
+
+
+@responses.activate
+@pytest.mark.usefixtures("mock_auth_endpoints")
+def test_user_created_on_first_login(
+ db: orm.Session,
+ monkeypatch: pytest.MonkeyPatch,
+ client_unauthenticated: testclient.TestClient,
+):
+ """When a user logs in the first time, it should be created"""
+ assert users_crud.get_user_by_idp_identifier(db, "test") is None
+
+ monkeypatch.setattr(
+ oidc.OIDCProvider,
+ "exchange_code_for_tokens",
+ lambda *args: {"id_token": ""},
+ )
+ monkeypatch.setattr(
+ auth_routes, "validate_id_token", lambda *args: {"sub": "sub"}
+ )
+ monkeypatch.setattr(
+ auth_routes,
+ "validate_id_token",
+ lambda *args: {
+ "sub": "test",
+ },
+ )
+
+ response = client_unauthenticated.post(
+ "/api/v1/authentication/tokens",
+ json={"code": "any", "nonce": "nonce", "code_verifier": "any"},
+ )
+ assert response.status_code == status.HTTP_200_OK
+
+ assert users_crud.get_user_by_name(db, "test") is not None
+
+
+@responses.activate
+@pytest.mark.usefixtures("mock_auth_endpoints", "mock_token_creation")
+def test_refresh_token(
+ client_unauthenticated: testclient.TestClient,
+):
+ response = client_unauthenticated.put(
+ "/api/v1/authentication/tokens",
+ cookies={
+ "refresh_token": "refresh_token",
+ },
+ json={"code": "any", "nonce": "nonce", "code_verifier": "any"},
+ )
+
+ assert response.status_code == status.HTTP_200_OK
+
+ assert "id_token" in response.headers["set-cookie"]
+ assert "refresh_token" in response.headers["set-cookie"]
+
+
+@responses.activate
+@pytest.mark.usefixtures("mock_auth_endpoints")
+def test_delete_token_cookies(
+ client_unauthenticated: testclient.TestClient,
+):
+ response = client_unauthenticated.delete("/api/v1/authentication/tokens")
+
+ assert response.status_code == status.HTTP_200_OK
+ assert 'id_token=""' in response.headers["set-cookie"]
+
+
+def test_missing_refresh_token(client_unauthenticated: testclient.TestClient):
+ response = client_unauthenticated.put("api/v1/authentication/tokens")
+ json_response = response.json()
+
+ assert response.status_code == status.HTTP_400_BAD_REQUEST
+ assert json_response["detail"]["err_code"] == "NO_REFRESH_TOKEN_COOKIE"
+
+
+@responses.activate
+@pytest.mark.usefixtures("mock_auth_endpoints")
+def test_validate_id_token_nonce_mismatch(
+ monkeypatch: pytest.MonkeyPatch,
+):
+ mock_jwt_api_cookie = mock.MagicMock()
+ mock_jwt_api_cookie.return_value.validate_token.return_value = {
+ "nonce": "mismatch-nonce"
+ }
+
+ monkeypatch.setattr(api_key_cookie, "JWTAPIKeyCookie", mock_jwt_api_cookie)
+
+ with pytest.raises(exceptions.NonceMismatchError):
+ routes.validate_id_token("any", "correct-nonce")
+
+
+@responses.activate
+@pytest.mark.usefixtures("mock_auth_endpoints")
+def test_validate_id_token_audience_mismatch(
+ monkeypatch: pytest.MonkeyPatch,
+):
+ mock_jwt_api_cookie = mock.MagicMock()
+ mock_jwt_api_cookie.return_value.validate_token.return_value = {
+ "nonce": "mock-nonce",
+ "aud": "mock-audience",
+ }
+
+ monkeypatch.setattr(api_key_cookie, "JWTAPIKeyCookie", mock_jwt_api_cookie)
+
+ with pytest.raises(exceptions.UnauthenticatedError):
+ routes.validate_id_token("any", "mock-nonce")
diff --git a/backend/tests/projects/test_projects_routes.py b/backend/tests/projects/test_projects_routes.py
index 29b6ff917..a989b530d 100644
--- a/backend/tests/projects/test_projects_routes.py
+++ b/backend/tests/projects/test_projects_routes.py
@@ -19,7 +19,9 @@
def test_get_internal_default_project_as_user(
- client: testclient.TestClient, db: orm.Session, executor_name: str
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
):
users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.USER
@@ -40,7 +42,9 @@ def test_get_internal_default_project_as_user(
def test_get_projects_as_user_only_shows_default_internal_project(
- client: testclient.TestClient, db: orm.Session, executor_name: str
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
):
users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.USER
@@ -59,7 +63,8 @@ def test_get_projects_as_user_only_shows_default_internal_project(
@pytest.mark.usefixtures("project_manager")
def test_get_projects_as_user_with_project(
- client: testclient.TestClient, project: projects_models.DatabaseProject
+ client: testclient.TestClient,
+ project: projects_models.DatabaseProject,
):
response = client.get("/api/v1/projects")
@@ -73,7 +78,9 @@ def test_get_projects_as_user_with_project(
def test_get_projects_as_admin(
- client: testclient.TestClient, db: orm.Session, executor_name: str
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
):
project = projects_crud.create_project(
db, "test project", visibility=projects_models.Visibility.PRIVATE
@@ -94,7 +101,9 @@ def test_get_projects_as_admin(
def test_get_internal_projects_as_user(
- client: testclient.TestClient, db: orm.Session, executor_name: str
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
):
project = projects_crud.create_project(
db, "test project", visibility=projects_models.Visibility.INTERNAL
@@ -115,7 +124,9 @@ def test_get_internal_projects_as_user(
def test_get_internal_projects_as_user_without_duplicates(
- client: testclient.TestClient, db: orm.Session, executor_name: str
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
):
user = users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.USER
@@ -149,7 +160,9 @@ def test_get_internal_projects_as_user_without_duplicates(
def test_create_private_project_as_admin(
- client: testclient.TestClient, db: orm.Session, executor_name: str
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
):
users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.ADMIN
@@ -172,7 +185,9 @@ def test_create_private_project_as_admin(
def test_create_internal_project_as_admin(
- client: testclient.TestClient, db: orm.Session, executor_name: str
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
):
users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.ADMIN
@@ -196,7 +211,9 @@ def test_create_internal_project_as_admin(
def test_update_project_as_admin(
- client: testclient.TestClient, db: orm.Session, executor_name: str
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
):
users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.ADMIN
@@ -295,28 +312,36 @@ def test_delete_pipeline_called_when_archiving_project(
@pytest.mark.usefixtures("project_user")
-def test_get_project_per_role_user(client: testclient.TestClient):
+def test_get_project_per_role_user(
+ client: testclient.TestClient,
+):
response = client.get("/api/v1/projects/?minimum_role=user")
assert response.status_code == 200
assert len(response.json()) > 0
@pytest.mark.usefixtures("project_user")
-def test_get_project_per_role_manager_as_user(client: testclient.TestClient):
+def test_get_project_per_role_manager_as_user(
+ client: testclient.TestClient,
+):
response = client.get("/api/v1/projects/?minimum_role=manager")
assert response.status_code == 200
assert len(response.json()) == 0
@pytest.mark.usefixtures("project_manager")
-def test_get_project_per_role_manager(client: testclient.TestClient):
+def test_get_project_per_role_manager(
+ client: testclient.TestClient,
+):
response = client.get("/api/v1/projects/?minimum_role=manager")
assert response.status_code == 200
assert len(response.json()) > 0
def test_get_project_per_role_admin(
- client: testclient.TestClient, executor_name: str, db: orm.Session
+ client: testclient.TestClient,
+ executor_name: str,
+ db: orm.Session,
):
users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.ADMIN
diff --git a/backend/tests/sessions/hooks/test_guacamole_hook.py b/backend/tests/sessions/hooks/test_guacamole_hook.py
index 8c583607a..851139e83 100644
--- a/backend/tests/sessions/hooks/test_guacamole_hook.py
+++ b/backend/tests/sessions/hooks/test_guacamole_hook.py
@@ -27,7 +27,7 @@ def fixture_session() -> sessions_models.DatabaseSession:
created_at=datetime.datetime.now(),
type=sessions_models.SessionType.READONLY,
owner=users_models.DatabaseUser(
- name="test", role=users_models.Role.USER
+ name="test", idp_identifier="test", role=users_models.Role.USER
),
tool=tool_version.tool,
version=tool_version,
@@ -141,7 +141,7 @@ def test_guacamole_configuration_hook(
"host": "test",
},
user=users_models.DatabaseUser(
- name="test", role=users_models.Role.USER
+ name="test", idp_identifier="test", role=users_models.Role.USER
),
connection_method=tools_models.GuacamoleConnectionMethod(),
)
@@ -180,7 +180,7 @@ def test_fail_if_guacamole_unreachable(
"host": "test",
},
user=users_models.DatabaseUser(
- name="test", role=users_models.Role.USER
+ name="test", idp_identifier="test", role=users_models.Role.USER
),
connection_method=tools_models.GuacamoleConnectionMethod(),
)
@@ -208,7 +208,7 @@ def test_guacamole_hook_not_executed_for_http_method(
},
db_session=session,
user=users_models.DatabaseUser(
- name="test", role=users_models.Role.USER
+ name="test", idp_identifier="test", role=users_models.Role.USER
),
connection_method=tools_models.HTTPConnectionMethod(),
)
@@ -236,7 +236,7 @@ def test_skip_guacamole_user_deletion_on_404(
"host": "test",
},
user=users_models.DatabaseUser(
- name="test", role=users_models.Role.USER
+ name="test", idp_identifier="test", role=users_models.Role.USER
),
connection_method=tools_models.GuacamoleConnectionMethod(),
)
diff --git a/backend/tests/sessions/test_session_environment.py b/backend/tests/sessions/test_session_environment.py
index 8df44b934..3009f2ad1 100644
--- a/backend/tests/sessions/test_session_environment.py
+++ b/backend/tests/sessions/test_session_environment.py
@@ -145,7 +145,9 @@ class GetSessionsReponseMock:
connection_method_id="test",
provisioning=[],
),
- users_models.DatabaseUser(name="test", role=users_models.Role.USER),
+ users_models.DatabaseUser(
+ name="test", idp_identifier="test", role=users_models.Role.USER
+ ),
None,
operator,
logger,
diff --git a/backend/tests/sessions/test_session_routes.py b/backend/tests/sessions/test_session_routes.py
index 1f3b15d0b..8472083b7 100644
--- a/backend/tests/sessions/test_session_routes.py
+++ b/backend/tests/sessions/test_session_routes.py
@@ -177,6 +177,7 @@ def test_create_session_without_provisioning(
assert kubernetes.sessions
+@pytest.mark.usefixtures("executor_name")
def test_validate_session_token_with_invalid_session(
client: testclient.TestClient,
):
diff --git a/backend/tests/settings/teamforcapella/test_t4c_instances.py b/backend/tests/settings/teamforcapella/test_t4c_instances.py
index 63e1836c4..89fd9cde3 100644
--- a/backend/tests/settings/teamforcapella/test_t4c_instances.py
+++ b/backend/tests/settings/teamforcapella/test_t4c_instances.py
@@ -87,7 +87,9 @@ def test_create_t4c_instance_already_existing_name(
@pytest.mark.usefixtures("t4c_instance")
def test_get_t4c_instances(
- client: testclient.TestClient, db: orm.Session, executor_name: str
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
):
users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.ADMIN
diff --git a/backend/tests/settings/test_global_configuration.py b/backend/tests/settings/test_global_configuration.py
index 2c8531939..9a0655dd0 100644
--- a/backend/tests/settings/test_global_configuration.py
+++ b/backend/tests/settings/test_global_configuration.py
@@ -14,7 +14,9 @@
@pytest.mark.usefixtures("admin")
-def test_get_default_configuration(client: testclient.TestClient):
+def test_get_default_configuration(
+ client: testclient.TestClient,
+):
"""Test that the default configuration is returned if no configuration is set."""
response = client.get("/api/v1/settings/configurations/global")
@@ -47,6 +49,7 @@ def test_get_general_configuration(
)
+@pytest.mark.usefixtures("executor_name")
def test_get_configuration_schema(client: testclient.TestClient):
response = client.get("/api/v1/settings/configurations/global/schema")
@@ -55,7 +58,9 @@ def test_get_configuration_schema(client: testclient.TestClient):
@pytest.mark.usefixtures("admin")
-def test_update_general_configuration(client: testclient.TestClient):
+def test_update_general_configuration(
+ client: testclient.TestClient,
+):
common_metadata = {
"privacy_policy_url": "https://example.com/privacy-policy",
"imprint_url": "https://example.com/imprint",
@@ -109,7 +114,9 @@ def test_update_general_configuration_additional_properties_fails(
def test_metadata_is_updated(
- client: testclient.TestClient, db: orm.Session, executor_name: str
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
):
admin = users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.ADMIN
diff --git a/backend/tests/test_event_creation.py b/backend/tests/test_event_creation.py
index 2589dc684..c24e4ff23 100644
--- a/backend/tests/test_event_creation.py
+++ b/backend/tests/test_event_creation.py
@@ -3,10 +3,12 @@
import pytest
import sqlalchemy as sa
+from fastapi import testclient
from sqlalchemy import orm
from capellacollab import config
from capellacollab.events import models as events_models
+from capellacollab.projects import models as projects_models
from capellacollab.projects.users import crud as projects_users_crud
from capellacollab.projects.users import models as projects_users_models
from capellacollab.users import crud as users_crud
@@ -16,9 +18,8 @@
def test_create_admin_user_by_system(db):
- user: users_models.DatabaseUser = users_crud.get_user_by_name(
- db, config.config.initial.admin
- )
+ user = users_crud.get_user_by_name(db, config.config.initial.admin)
+ assert user is not None
events: list[events_models.DatabaseUserHistoryEvent] = (
get_events_by_user_id(db, user.id)
@@ -41,8 +42,13 @@ def test_create_user_created_event(client, db, executor_name, unique_username):
)
response = client.post(
- "/api/v1/users/",
- json={"name": unique_username, "role": "user", "reason": reason},
+ "/api/v1/users",
+ json={
+ "name": unique_username,
+ "role": "user",
+ "reason": reason,
+ "idp_identifier": "test",
+ },
)
events = get_events_by_username(db, unique_username)
@@ -59,14 +65,24 @@ def test_create_user_created_event(client, db, executor_name, unique_username):
assert event.user_id == int(response.json()["id"])
-def test_user_deleted_cleanup(client, db, executor_name, unique_username):
+def test_user_deleted_cleanup(
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
+ unique_username: str,
+):
executor = users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.ADMIN
)
response = client.post(
- "/api/v1/users/",
- json={"name": unique_username, "role": "user", "reason": reason},
+ "/api/v1/users",
+ json={
+ "name": unique_username,
+ "idp_identifier": "test",
+ "role": "user",
+ "reason": reason,
+ },
)
assert response.status_code == 200
@@ -97,13 +113,13 @@ def test_user_deleted_cleanup(client, db, executor_name, unique_username):
],
)
def test_create_assign_user_role_event(
- client,
- db,
- executor_name,
- unique_username,
- initial_role,
- target_role,
- expected_event_type,
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
+ unique_username: str,
+ initial_role: users_models.Role,
+ target_role: users_models.Role,
+ expected_event_type: events_models.EventType,
):
executor = users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.ADMIN
@@ -145,13 +161,13 @@ def test_create_assign_user_role_event(
],
)
def test_create_user_added_to_project_event(
- client,
- db,
- executor_name,
- unique_username,
- project,
- permission,
- expected_permission_event_type,
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
+ unique_username: str,
+ project: projects_models.DatabaseProject,
+ permission: projects_users_models.ProjectUserPermission,
+ expected_permission_event_type: events_models.EventType,
):
executor = users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.ADMIN
@@ -192,7 +208,11 @@ def test_create_user_added_to_project_event(
def test_create_user_removed_from_project_event(
- client, db, executor_name, unique_username, project
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
+ unique_username: str,
+ project: projects_models.DatabaseProject,
):
executor = users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.ADMIN
@@ -231,7 +251,11 @@ def test_create_user_removed_from_project_event(
def test_create_manager_added_to_project_event(
- client, db, executor_name, unique_username, project
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
+ unique_username: str,
+ project: projects_models.DatabaseProject,
):
executor = users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.ADMIN
@@ -285,14 +309,14 @@ def test_create_manager_added_to_project_event(
],
)
def test_create_user_permission_change_event(
- client,
- db,
- executor_name,
- unique_username,
- project,
- initial_permission,
- target_permission,
- expected_permission_event_type,
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
+ unique_username: str,
+ project: projects_models.DatabaseProject,
+ initial_permission: projects_users_models.ProjectUserPermission,
+ target_permission: projects_users_models.ProjectUserPermission,
+ expected_permission_event_type: events_models.EventType,
):
executor = users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.ADMIN
@@ -347,14 +371,14 @@ def test_create_user_permission_change_event(
],
)
def test_create_user_role_change_event(
- client,
- db,
- executor_name,
- unique_username,
- project,
- initial_role,
- target_role,
- expected_role_event_type,
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
+ unique_username: str,
+ project: projects_models.DatabaseProject,
+ initial_role: projects_users_models.ProjectUserRole,
+ target_role: projects_users_models.ProjectUserRole,
+ expected_role_event_type: events_models.EventType,
):
executor = users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.ADMIN
diff --git a/backend/tests/test_metrics.py b/backend/tests/test_metrics.py
index 49aeab99f..8591703b8 100644
--- a/backend/tests/test_metrics.py
+++ b/backend/tests/test_metrics.py
@@ -5,11 +5,12 @@
from fastapi import testclient
from kubernetes import client as k8s_client
+from capellacollab import __main__
from capellacollab.sessions import metrics
-def test_metrics_endpoint(client: testclient.TestClient):
- response = client.get("/metrics")
+def test_metrics_endpoint(client_unauthenticated: testclient.TestClient):
+ response = client_unauthenticated.get("/metrics")
assert response.status_code == 200
assert "# HELP " in response.text
diff --git a/backend/tests/tools/test_tools_natures_routes.py b/backend/tests/tools/test_tools_natures_routes.py
index 2b003b971..53ea7ada0 100644
--- a/backend/tests/tools/test_tools_natures_routes.py
+++ b/backend/tests/tools/test_tools_natures_routes.py
@@ -9,7 +9,8 @@
@pytest.mark.usefixtures("admin")
def test_create_tool_nature(
- client: testclient.TestClient, tool: tools_models.DatabaseTool
+ client: testclient.TestClient,
+ tool: tools_models.DatabaseTool,
):
"""Test creating a tool nature"""
diff --git a/backend/tests/tools/test_tools_routes.py b/backend/tests/tools/test_tools_routes.py
index dae6c23c0..4d1fe4cf5 100644
--- a/backend/tests/tools/test_tools_routes.py
+++ b/backend/tests/tools/test_tools_routes.py
@@ -46,7 +46,8 @@ def test_create_tool(client: testclient.TestClient):
@pytest.mark.usefixtures("admin")
def test_update_tool(
- client: testclient.TestClient, tool: tools_models.DatabaseTool
+ client: testclient.TestClient,
+ tool: tools_models.DatabaseTool,
):
"""Test updating a tool"""
response = client.put(
@@ -85,7 +86,8 @@ def test_update_tool(
@pytest.mark.usefixtures("admin")
def test_delete_tool(
- client: testclient.TestClient, tool: tools_models.DatabaseTool
+ client: testclient.TestClient,
+ tool: tools_models.DatabaseTool,
):
"""Test deleting a tool"""
response = client.delete(
diff --git a/backend/tests/tools/versions/test_tools_version_routes.py b/backend/tests/tools/versions/test_tools_version_routes.py
index 953e890a1..0c7658e88 100644
--- a/backend/tests/tools/versions/test_tools_version_routes.py
+++ b/backend/tests/tools/versions/test_tools_version_routes.py
@@ -9,7 +9,8 @@
@pytest.mark.usefixtures("admin")
def test_create_tool_version(
- client: testclient.TestClient, tool: tools_models.DatabaseTool
+ client: testclient.TestClient,
+ tool: tools_models.DatabaseTool,
):
"""Test creating a tool version"""
response = client.post(
diff --git a/backend/tests/users/fixtures.py b/backend/tests/users/fixtures.py
index 4d614dd7e..62cbe9c3c 100644
--- a/backend/tests/users/fixtures.py
+++ b/backend/tests/users/fixtures.py
@@ -21,10 +21,10 @@
def fixture_executor_name(monkeypatch: pytest.MonkeyPatch) -> str:
name = str(uuid.uuid1())
- # pylint: disable=unused-argument
async def cookie_passthrough(self, request: fastapi.Request):
return name
+ monkeypatch.setattr(JWTAPIKeyCookie, "__init__", lambda self: None)
monkeypatch.setattr(JWTAPIKeyCookie, "__call__", cookie_passthrough)
return name
diff --git a/backend/tests/users/test_users.py b/backend/tests/users/test_users.py
index f6acc8da6..b7c58d7ad 100644
--- a/backend/tests/users/test_users.py
+++ b/backend/tests/users/test_users.py
@@ -18,7 +18,9 @@
def test_get_user_by_id_admin(
- client: testclient.TestClient, db: orm.Session, executor_name: str
+ client: testclient.TestClient,
+ db: orm.Session,
+ executor_name: str,
):
users_crud.create_user(
db, executor_name, executor_name, None, users_models.Role.ADMIN
diff --git a/frontend/Makefile b/frontend/Makefile
index a9e40925f..42daf9a0f 100644
--- a/frontend/Makefile
+++ b/frontend/Makefile
@@ -3,6 +3,8 @@
export NG_FORCE_TTY=false
+.ONESHELL:
+
dev:
ng serve --host 0.0.0.0 --open
@@ -20,11 +22,11 @@ storybook:
openapi:
python postprocess_openapi_schema.py
- mkdir -p /tmp/openapi
+ OPENAPI_DIR=$$(mktemp -d)
docker run --rm \
-v /tmp/openapi.json:/tmp/openapi.json \
-v $$(pwd)/openapi_templates:/tmp/openapi_templates \
- -v /tmp/openapi:/tmp/output \
+ -v $$OPENAPI_DIR:/tmp/output \
-u $$(id -u $${USER}):$$(id -g $${USER}) \
openapitools/openapi-generator-cli:v7.7.0 generate \
-i /tmp/openapi.json \
@@ -33,6 +35,7 @@ openapi:
--additional-properties=fileNaming=kebab-case,legacyDiscriminatorBehavior=false \
-g typescript-angular \
-o /tmp/output
- cp ../LICENSES/.license_header_cc0.txt /tmp/openapi/.openapi-generator/FILES.license
- cp ../LICENSES/.license_header_cc0.txt /tmp/openapi/.openapi-generator/VERSION.license
- rsync -avh --delete /tmp/openapi/ $$(pwd)/src/app/openapi
+ cp ../LICENSES/.license_header_cc0.txt $$OPENAPI_DIR/.openapi-generator/FILES.license
+ cp ../LICENSES/.license_header_cc0.txt $$OPENAPI_DIR/.openapi-generator/VERSION.license
+ rsync -avh --delete $$OPENAPI_DIR/ $$(pwd)/src/app/openapi
+ rm -rf $$OPENAPI_DIR
diff --git a/frontend/src/app/general/auth/auth-guard/auth-guard.service.ts b/frontend/src/app/general/auth/auth-guard/auth-guard.service.ts
index 4b173132b..e5fc8df23 100644
--- a/frontend/src/app/general/auth/auth-guard/auth-guard.service.ts
+++ b/frontend/src/app/general/auth/auth-guard/auth-guard.service.ts
@@ -9,13 +9,13 @@ import {
CanActivateFn,
RouterStateSnapshot,
} from '@angular/router';
-import { AuthService } from 'src/app/services/auth/auth.service';
+import { AuthenticationWrapperService } from 'src/app/services/auth/auth.service';
export const authGuard: CanActivateFn = (
_route: ActivatedRouteSnapshot,
_state: RouterStateSnapshot,
) => {
- const authService = inject(AuthService);
+ const authService = inject(AuthenticationWrapperService);
if (authService.isLoggedIn()) {
return true;
diff --git a/frontend/src/app/general/auth/auth-redirect/auth-redirect.component.ts b/frontend/src/app/general/auth/auth-redirect/auth-redirect.component.ts
index d5fb87511..86413a64f 100644
--- a/frontend/src/app/general/auth/auth-redirect/auth-redirect.component.ts
+++ b/frontend/src/app/general/auth/auth-redirect/auth-redirect.component.ts
@@ -6,7 +6,8 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ToastService } from 'src/app/helpers/toast/toast.service';
-import { AuthService } from 'src/app/services/auth/auth.service';
+import { AuthenticationService } from 'src/app/openapi';
+import { AuthenticationWrapperService } from 'src/app/services/auth/auth.service';
import { UserWrapperService } from 'src/app/services/user/user.service';
@Component({
@@ -18,7 +19,8 @@ export class AuthRedirectComponent implements OnInit {
constructor(
private route: ActivatedRoute,
private toastService: ToastService,
- private authService: AuthService,
+ private authService: AuthenticationWrapperService,
+ private authenticationService: AuthenticationService,
private userService: UserWrapperService,
private router: Router,
) {}
@@ -66,8 +68,12 @@ export class AuthRedirectComponent implements OnInit {
this.authService.SESSION_STORAGE_CODE_VERIFIER_KEY,
);
- this.authService
- .getIdentityToken(params.code, nonce, codeVerifier)
+ this.authenticationService
+ .getIdentityToken({
+ code: params.code,
+ nonce,
+ code_verifier: codeVerifier,
+ })
.subscribe({
next: () => {
localStorage.setItem(this.authService.LOGGED_IN_KEY, 'true');
diff --git a/frontend/src/app/general/auth/auth/auth.component.ts b/frontend/src/app/general/auth/auth/auth.component.ts
index 7826f04ca..d17dd453e 100644
--- a/frontend/src/app/general/auth/auth/auth.component.ts
+++ b/frontend/src/app/general/auth/auth/auth.component.ts
@@ -9,7 +9,7 @@ import { MatButton } from '@angular/material/button';
import { ActivatedRoute, ParamMap } from '@angular/router';
import { MetadataService } from 'src/app/general/metadata/metadata.service';
import { PageLayoutService } from 'src/app/page-layout/page-layout.service';
-import { AuthService } from 'src/app/services/auth/auth.service';
+import { AuthenticationWrapperService } from 'src/app/services/auth/auth.service';
@Component({
selector: 'app-auth',
@@ -30,7 +30,7 @@ export class AuthComponent implements OnInit {
constructor(
public metadataService: MetadataService,
- public authService: AuthService,
+ public authService: AuthenticationWrapperService,
private pageLayoutService: PageLayoutService,
private route: ActivatedRoute,
) {
diff --git a/frontend/src/app/general/auth/http-interceptor/auth.interceptor.ts b/frontend/src/app/general/auth/http-interceptor/auth.interceptor.ts
index 93bb384a6..f85a5c179 100644
--- a/frontend/src/app/general/auth/http-interceptor/auth.interceptor.ts
+++ b/frontend/src/app/general/auth/http-interceptor/auth.interceptor.ts
@@ -14,13 +14,15 @@ import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { Observable } from 'rxjs';
import { catchError, switchMap } from 'rxjs/operators';
-import { AuthService } from 'src/app/services/auth/auth.service';
+import { AuthenticationService } from 'src/app/openapi';
+import { AuthenticationWrapperService } from 'src/app/services/auth/auth.service';
@Injectable()
export class AuthInterceptor implements HttpInterceptor {
constructor(
private router: Router,
- private authService: AuthService,
+ private authService: AuthenticationWrapperService,
+ private authenticationService: AuthenticationService,
) {}
intercept(
@@ -43,7 +45,7 @@ export class AuthInterceptor implements HttpInterceptor {
if (err.status === 401) {
localStorage.setItem(this.authService.LOGGED_IN_KEY, 'false');
if (err.error.detail.err_code == 'TOKEN_SIGNATURE_EXPIRED') {
- return this.authService.performTokenRefresh().pipe(
+ return this.authenticationService.refreshIdentityToken().pipe(
switchMap(() => {
return next.handle(request);
}),
diff --git a/frontend/src/app/general/auth/logout/logout-redirect/logout-redirect.component.ts b/frontend/src/app/general/auth/logout/logout-redirect/logout-redirect.component.ts
index c4e707d1d..775a8641d 100644
--- a/frontend/src/app/general/auth/logout/logout-redirect/logout-redirect.component.ts
+++ b/frontend/src/app/general/auth/logout/logout-redirect/logout-redirect.component.ts
@@ -5,7 +5,7 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
-import { AuthService } from 'src/app/services/auth/auth.service';
+import { AuthenticationWrapperService } from 'src/app/services/auth/auth.service';
@Component({
selector: 'app-logout-redirect',
@@ -15,7 +15,7 @@ import { AuthService } from 'src/app/services/auth/auth.service';
})
export class LogoutRedirectComponent implements OnInit {
constructor(
- private authService: AuthService,
+ private authService: AuthenticationWrapperService,
private router: Router,
) {}
diff --git a/frontend/src/app/general/header/header.component.ts b/frontend/src/app/general/header/header.component.ts
index 5f31abaed..d6cbea9a4 100644
--- a/frontend/src/app/general/header/header.component.ts
+++ b/frontend/src/app/general/header/header.component.ts
@@ -9,7 +9,7 @@ import { MatIcon } from '@angular/material/icon';
import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
import { RouterLink } from '@angular/router';
import { NavBarService } from 'src/app/general/nav-bar/nav-bar.service';
-import { AuthService } from '../../services/auth/auth.service';
+import { AuthenticationWrapperService } from '../../services/auth/auth.service';
import { UserWrapperService } from '../../services/user/user.service';
import { BreadcrumbsComponent } from '../breadcrumbs/breadcrumbs.component';
@@ -31,7 +31,7 @@ import { BreadcrumbsComponent } from '../breadcrumbs/breadcrumbs.component';
})
export class HeaderComponent {
constructor(
- public authService: AuthService,
+ public authService: AuthenticationWrapperService,
public userService: UserWrapperService,
public navBarService: NavBarService,
) {}
diff --git a/frontend/src/app/general/nav-bar-menu/nav-bar-menu.component.ts b/frontend/src/app/general/nav-bar-menu/nav-bar-menu.component.ts
index 6c1af1eb8..45b0f695f 100644
--- a/frontend/src/app/general/nav-bar-menu/nav-bar-menu.component.ts
+++ b/frontend/src/app/general/nav-bar-menu/nav-bar-menu.component.ts
@@ -9,7 +9,7 @@ import { MatIcon } from '@angular/material/icon';
import { MatList, MatListItem } from '@angular/material/list';
import { RouterLink } from '@angular/router';
import { NavBarService } from 'src/app/general/nav-bar/nav-bar.service';
-import { AuthService } from 'src/app/services/auth/auth.service';
+import { AuthenticationWrapperService } from 'src/app/services/auth/auth.service';
import { UserWrapperService } from 'src/app/services/user/user.service';
@Component({
@@ -21,7 +21,7 @@ import { UserWrapperService } from 'src/app/services/user/user.service';
})
export class NavBarMenuComponent {
constructor(
- public authService: AuthService,
+ public authService: AuthenticationWrapperService,
public navBarService: NavBarService,
public userService: UserWrapperService,
) {}
diff --git a/frontend/src/app/openapi/.openapi-generator/FILES b/frontend/src/app/openapi/.openapi-generator/FILES
index ef2e6ad6e..0a149ccfc 100644
--- a/frontend/src/app/openapi/.openapi-generator/FILES
+++ b/frontend/src/app/openapi/.openapi-generator/FILES
@@ -1,8 +1,10 @@
api.module.ts
api/api.ts
-api/default.service.ts
+api/authentication.service.ts
+api/configuration.service.ts
api/events.service.ts
api/health.service.ts
+api/integrations-pure-variants.service.ts
api/metadata.service.ts
api/notices.service.ts
api/projects-events.service.ts
@@ -25,6 +27,7 @@ api/users.service.ts
configuration.ts
encoder.ts
index.ts
+model/authorization-response.ts
model/backup-pipeline-run.ts
model/backup.ts
model/base-user.ts
diff --git a/frontend/src/app/openapi/api/api.ts b/frontend/src/app/openapi/api/api.ts
index 7de12560a..64dcdb524 100644
--- a/frontend/src/app/openapi/api/api.ts
+++ b/frontend/src/app/openapi/api/api.ts
@@ -9,12 +9,16 @@
+ To generate a new version, run `make openapi` in the root directory of this repository.
*/
-export * from './default.service';
-import { DefaultService } from './default.service';
+export * from './authentication.service';
+import { AuthenticationService } from './authentication.service';
+export * from './configuration.service';
+import { ConfigurationService } from './configuration.service';
export * from './events.service';
import { EventsService } from './events.service';
export * from './health.service';
import { HealthService } from './health.service';
+export * from './integrations-pure-variants.service';
+import { IntegrationsPureVariantsService } from './integrations-pure-variants.service';
export * from './metadata.service';
import { MetadataService } from './metadata.service';
export * from './notices.service';
@@ -53,4 +57,4 @@ export * from './users-token.service';
import { UsersTokenService } from './users-token.service';
export * from './users-workspaces.service';
import { UsersWorkspacesService } from './users-workspaces.service';
-export const APIS = [DefaultService, EventsService, HealthService, MetadataService, NoticesService, ProjectsService, ProjectsEventsService, ProjectsModelsService, ProjectsModelsBackupsService, ProjectsModelsDiagramsService, ProjectsModelsGitService, ProjectsModelsModelComplexityBadgeService, ProjectsModelsRestrictionsService, ProjectsModelsT4CService, SessionsService, SettingsModelsourcesGitService, SettingsModelsourcesT4CService, ToolsService, UsersService, UsersSessionsService, UsersTokenService, UsersWorkspacesService];
+export const APIS = [AuthenticationService, ConfigurationService, EventsService, HealthService, IntegrationsPureVariantsService, MetadataService, NoticesService, ProjectsService, ProjectsEventsService, ProjectsModelsService, ProjectsModelsBackupsService, ProjectsModelsDiagramsService, ProjectsModelsGitService, ProjectsModelsModelComplexityBadgeService, ProjectsModelsRestrictionsService, ProjectsModelsT4CService, SessionsService, SettingsModelsourcesGitService, SettingsModelsourcesT4CService, ToolsService, UsersService, UsersSessionsService, UsersTokenService, UsersWorkspacesService];
diff --git a/frontend/src/app/openapi/api/authentication.service.ts b/frontend/src/app/openapi/api/authentication.service.ts
new file mode 100644
index 000000000..c254aeb79
--- /dev/null
+++ b/frontend/src/app/openapi/api/authentication.service.ts
@@ -0,0 +1,424 @@
+/*
+ * SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Capella Collaboration
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * Do not edit the class manually.
+ + To generate a new version, run `make openapi` in the root directory of this repository.
+ */
+
+/* tslint:disable:no-unused-variable member-ordering */
+
+import { Inject, Injectable, Optional } from '@angular/core';
+import { HttpClient, HttpHeaders, HttpParams,
+ HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
+ } from '@angular/common/http';
+import { CustomHttpParameterCodec } from '../encoder';
+import { Observable } from 'rxjs';
+
+// @ts-ignore
+import { AuthorizationResponse } from '../model/authorization-response';
+// @ts-ignore
+import { HTTPValidationError } from '../model/http-validation-error';
+// @ts-ignore
+import { Role } from '../model/role';
+// @ts-ignore
+import { TokenRequest } from '../model/token-request';
+
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
+import { Configuration } from '../configuration';
+
+
+
+@Injectable({
+ providedIn: 'root'
+})
+export class AuthenticationService {
+
+ protected basePath = 'http://localhost';
+ public defaultHeaders = new HttpHeaders();
+ public configuration = new Configuration();
+ public encoder: HttpParameterCodec;
+
+ constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
+ if (configuration) {
+ this.configuration = configuration;
+ }
+ if (typeof this.configuration.basePath !== 'string') {
+ const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
+ if (firstBasePath != undefined) {
+ basePath = firstBasePath;
+ }
+
+ if (typeof basePath !== 'string') {
+ basePath = this.basePath;
+ }
+ this.configuration.basePath = basePath;
+ }
+ this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
+ }
+
+
+ // @ts-ignore
+ private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
+ if (typeof value === "object" && value instanceof Date === false) {
+ httpParams = this.addToHttpParamsRecursive(httpParams, value);
+ } else {
+ httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
+ }
+ return httpParams;
+ }
+
+ private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
+ if (value == null) {
+ return httpParams;
+ }
+
+ if (typeof value === "object") {
+ if (Array.isArray(value)) {
+ (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
+ } else if (value instanceof Date) {
+ if (key != null) {
+ httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
+ } else {
+ throw Error("key may not be null if value is Date");
+ }
+ } else {
+ Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
+ httpParams, value[k], key != null ? `${key}.${k}` : k));
+ }
+ } else if (key != null) {
+ httpParams = httpParams.append(key, value);
+ } else {
+ throw Error("key may not be null if value is not object or array");
+ }
+ return httpParams;
+ }
+
+ /**
+ * Get Authorization Url
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public getAuthorizationUrl(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public getAuthorizationUrl(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getAuthorizationUrl(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getAuthorizationUrl(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/authentication`;
+ return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
+ /**
+ * Get Identity Token
+ * @param tokenRequest
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public getIdentityToken(tokenRequest: TokenRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public getIdentityToken(tokenRequest: TokenRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getIdentityToken(tokenRequest: TokenRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getIdentityToken(tokenRequest: TokenRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+ if (tokenRequest === null || tokenRequest === undefined) {
+ throw new Error('Required parameter tokenRequest was null or undefined when calling getIdentityToken.');
+ }
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ // to determine the Content-Type header
+ const consumes: string[] = [
+ 'application/json'
+ ];
+ const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
+ if (httpContentTypeSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
+ }
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/authentication/tokens`;
+ return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ body: tokenRequest,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
+ /**
+ * Logout
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public logout(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public logout(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public logout(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public logout(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/authentication/tokens`;
+ return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
+ /**
+ * Refresh Identity Token
+ * @param refreshToken
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public refreshIdentityToken(refreshToken?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public refreshIdentityToken(refreshToken?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public refreshIdentityToken(refreshToken?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public refreshIdentityToken(refreshToken?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/authentication/tokens`;
+ return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
+ /**
+ * Validate Jwt Token
+ * @param scope
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public validateJwtToken(scope?: Role, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public validateJwtToken(scope?: Role, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public validateJwtToken(scope?: Role, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public validateJwtToken(scope?: Role, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+
+ let localVarQueryParameters = new HttpParams({encoder: this.encoder});
+ if (scope !== undefined && scope !== null) {
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
+ scope, 'scope');
+ }
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/authentication/tokens`;
+ return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ params: localVarQueryParameters,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
+}
diff --git a/frontend/src/app/openapi/api/configuration.service.ts b/frontend/src/app/openapi/api/configuration.service.ts
new file mode 100644
index 000000000..bb2d495d5
--- /dev/null
+++ b/frontend/src/app/openapi/api/configuration.service.ts
@@ -0,0 +1,307 @@
+/*
+ * SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Capella Collaboration
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * Do not edit the class manually.
+ + To generate a new version, run `make openapi` in the root directory of this repository.
+ */
+
+/* tslint:disable:no-unused-variable member-ordering */
+
+import { Inject, Injectable, Optional } from '@angular/core';
+import { HttpClient, HttpHeaders, HttpParams,
+ HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
+ } from '@angular/common/http';
+import { CustomHttpParameterCodec } from '../encoder';
+import { Observable } from 'rxjs';
+
+// @ts-ignore
+import { GlobalConfigurationInput } from '../model/global-configuration-input';
+// @ts-ignore
+import { GlobalConfigurationOutput } from '../model/global-configuration-output';
+// @ts-ignore
+import { HTTPValidationError } from '../model/http-validation-error';
+
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
+import { Configuration } from '../configuration';
+
+
+
+@Injectable({
+ providedIn: 'root'
+})
+export class ConfigurationService {
+
+ protected basePath = 'http://localhost';
+ public defaultHeaders = new HttpHeaders();
+ public configuration = new Configuration();
+ public encoder: HttpParameterCodec;
+
+ constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
+ if (configuration) {
+ this.configuration = configuration;
+ }
+ if (typeof this.configuration.basePath !== 'string') {
+ const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
+ if (firstBasePath != undefined) {
+ basePath = firstBasePath;
+ }
+
+ if (typeof basePath !== 'string') {
+ basePath = this.basePath;
+ }
+ this.configuration.basePath = basePath;
+ }
+ this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
+ }
+
+
+ // @ts-ignore
+ private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
+ if (typeof value === "object" && value instanceof Date === false) {
+ httpParams = this.addToHttpParamsRecursive(httpParams, value);
+ } else {
+ httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
+ }
+ return httpParams;
+ }
+
+ private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
+ if (value == null) {
+ return httpParams;
+ }
+
+ if (typeof value === "object") {
+ if (Array.isArray(value)) {
+ (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
+ } else if (value instanceof Date) {
+ if (key != null) {
+ httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
+ } else {
+ throw Error("key may not be null if value is Date");
+ }
+ } else {
+ Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
+ httpParams, value[k], key != null ? `${key}.${k}` : k));
+ }
+ } else if (key != null) {
+ httpParams = httpParams.append(key, value);
+ } else {
+ throw Error("key may not be null if value is not object or array");
+ }
+ return httpParams;
+ }
+
+ /**
+ * Get Configuration
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public getConfiguration(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public getConfiguration(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getConfiguration(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getConfiguration(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarCredential: string | undefined;
+ // authentication (PersonalAccessToken) required
+ localVarCredential = this.configuration.lookupCredential('PersonalAccessToken');
+ if (localVarCredential) {
+ localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
+ }
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/settings/configurations/global`;
+ return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
+ /**
+ * Get Json Schema
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public getJsonSchema(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public getJsonSchema(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getJsonSchema(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getJsonSchema(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/settings/configurations/global/schema`;
+ return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
+ /**
+ * Update Configuration
+ * @param globalConfigurationInput
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public updateConfiguration(globalConfigurationInput: GlobalConfigurationInput, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public updateConfiguration(globalConfigurationInput: GlobalConfigurationInput, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public updateConfiguration(globalConfigurationInput: GlobalConfigurationInput, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public updateConfiguration(globalConfigurationInput: GlobalConfigurationInput, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+ if (globalConfigurationInput === null || globalConfigurationInput === undefined) {
+ throw new Error('Required parameter globalConfigurationInput was null or undefined when calling updateConfiguration.');
+ }
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarCredential: string | undefined;
+ // authentication (PersonalAccessToken) required
+ localVarCredential = this.configuration.lookupCredential('PersonalAccessToken');
+ if (localVarCredential) {
+ localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
+ }
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ // to determine the Content-Type header
+ const consumes: string[] = [
+ 'application/json'
+ ];
+ const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
+ if (httpContentTypeSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
+ }
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/settings/configurations/global`;
+ return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ body: globalConfigurationInput,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
+}
diff --git a/frontend/src/app/openapi/api/default.service.ts b/frontend/src/app/openapi/api/default.service.ts
deleted file mode 100644
index b6094b8cb..000000000
--- a/frontend/src/app/openapi/api/default.service.ts
+++ /dev/null
@@ -1,960 +0,0 @@
-/*
- * SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
- * SPDX-License-Identifier: Apache-2.0
- *
- * Capella Collaboration
- *
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
- * Do not edit the class manually.
- + To generate a new version, run `make openapi` in the root directory of this repository.
- */
-
-/* tslint:disable:no-unused-variable member-ordering */
-
-import { Inject, Injectable, Optional } from '@angular/core';
-import { HttpClient, HttpHeaders, HttpParams,
- HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
- } from '@angular/common/http';
-import { CustomHttpParameterCodec } from '../encoder';
-import { Observable } from 'rxjs';
-
-// @ts-ignore
-import { GlobalConfigurationInput } from '../model/global-configuration-input';
-// @ts-ignore
-import { GlobalConfigurationOutput } from '../model/global-configuration-output';
-// @ts-ignore
-import { HTTPValidationError } from '../model/http-validation-error';
-// @ts-ignore
-import { PureVariantsLicensesInput } from '../model/pure-variants-licenses-input';
-// @ts-ignore
-import { PureVariantsLicensesOutput } from '../model/pure-variants-licenses-output';
-// @ts-ignore
-import { Role } from '../model/role';
-// @ts-ignore
-import { TokenRequest } from '../model/token-request';
-
-// @ts-ignore
-import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
-import { Configuration } from '../configuration';
-
-
-
-@Injectable({
- providedIn: 'root'
-})
-export class DefaultService {
-
- protected basePath = 'http://localhost';
- public defaultHeaders = new HttpHeaders();
- public configuration = new Configuration();
- public encoder: HttpParameterCodec;
-
- constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
- if (configuration) {
- this.configuration = configuration;
- }
- if (typeof this.configuration.basePath !== 'string') {
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
- if (firstBasePath != undefined) {
- basePath = firstBasePath;
- }
-
- if (typeof basePath !== 'string') {
- basePath = this.basePath;
- }
- this.configuration.basePath = basePath;
- }
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
- }
-
- /**
- * @param consumes string[] mime-types
- * @return true: consumes contains 'multipart/form-data', false: otherwise
- */
- private canConsumeForm(consumes: string[]): boolean {
- const form = 'multipart/form-data';
- for (const consume of consumes) {
- if (form === consume) {
- return true;
- }
- }
- return false;
- }
-
- // @ts-ignore
- private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
- if (typeof value === "object" && value instanceof Date === false) {
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
- } else {
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
- }
- return httpParams;
- }
-
- private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
- if (value == null) {
- return httpParams;
- }
-
- if (typeof value === "object") {
- if (Array.isArray(value)) {
- (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
- } else if (value instanceof Date) {
- if (key != null) {
- httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
- } else {
- throw Error("key may not be null if value is Date");
- }
- } else {
- Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
- httpParams, value[k], key != null ? `${key}.${k}` : k));
- }
- } else if (key != null) {
- httpParams = httpParams.append(key, value);
- } else {
- throw Error("key may not be null if value is not object or array");
- }
- return httpParams;
- }
-
- /**
- * Create The Identity Token
- * @param tokenRequest
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public createTheIdentityToken(tokenRequest: TokenRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public createTheIdentityToken(tokenRequest: TokenRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public createTheIdentityToken(tokenRequest: TokenRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public createTheIdentityToken(tokenRequest: TokenRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
- if (tokenRequest === null || tokenRequest === undefined) {
- throw new Error('Required parameter tokenRequest was null or undefined when calling createTheIdentityToken.');
- }
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- // to determine the Content-Type header
- const consumes: string[] = [
- 'application/json'
- ];
- const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
- if (httpContentTypeSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
- }
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/authentication/tokens`;
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: tokenRequest,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Delete License Key File
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public deleteLicenseKeyFile(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public deleteLicenseKeyFile(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public deleteLicenseKeyFile(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public deleteLicenseKeyFile(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarCredential: string | undefined;
- // authentication (PersonalAccessToken) required
- localVarCredential = this.configuration.lookupCredential('PersonalAccessToken');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
- }
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/settings/integrations/pure-variants/license-keys/0`;
- return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Get Configuration
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public getConfiguration(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public getConfiguration(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public getConfiguration(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public getConfiguration(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarCredential: string | undefined;
- // authentication (PersonalAccessToken) required
- localVarCredential = this.configuration.lookupCredential('PersonalAccessToken');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
- }
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/settings/configurations/global`;
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Get Json Schema
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public getJsonSchema(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public getJsonSchema(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public getJsonSchema(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public getJsonSchema(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/settings/configurations/global/schema`;
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Get License
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public getLicense(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public getLicense(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public getLicense(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public getLicense(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarCredential: string | undefined;
- // authentication (PersonalAccessToken) required
- localVarCredential = this.configuration.lookupCredential('PersonalAccessToken');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
- }
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/settings/integrations/pure-variants`;
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Get The Authorization Url For The Oauth Server
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public getTheAuthorizationURLForTheOAuthServer(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<{ [key: string]: string | null; }>;
- public getTheAuthorizationURLForTheOAuthServer(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public getTheAuthorizationURLForTheOAuthServer(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public getTheAuthorizationURLForTheOAuthServer(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/authentication`;
- return this.httpClient.request<{ [key: string]: string | null; }>('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Refresh The Identity Token
- * @param refreshToken
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public refreshTheIdentityToken(refreshToken?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public refreshTheIdentityToken(refreshToken?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public refreshTheIdentityToken(refreshToken?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public refreshTheIdentityToken(refreshToken?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/authentication/tokens`;
- return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Remove The Token (Log Out)
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public removeTheTokenLogOut(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public removeTheTokenLogOut(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public removeTheTokenLogOut(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public removeTheTokenLogOut(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/authentication/tokens`;
- return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Set License
- * @param pureVariantsLicensesInput
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public setLicense(pureVariantsLicensesInput: PureVariantsLicensesInput, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public setLicense(pureVariantsLicensesInput: PureVariantsLicensesInput, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public setLicense(pureVariantsLicensesInput: PureVariantsLicensesInput, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public setLicense(pureVariantsLicensesInput: PureVariantsLicensesInput, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
- if (pureVariantsLicensesInput === null || pureVariantsLicensesInput === undefined) {
- throw new Error('Required parameter pureVariantsLicensesInput was null or undefined when calling setLicense.');
- }
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarCredential: string | undefined;
- // authentication (PersonalAccessToken) required
- localVarCredential = this.configuration.lookupCredential('PersonalAccessToken');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
- }
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- // to determine the Content-Type header
- const consumes: string[] = [
- 'application/json'
- ];
- const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
- if (httpContentTypeSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
- }
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/settings/integrations/pure-variants`;
- return this.httpClient.request('patch', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: pureVariantsLicensesInput,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Update Configuration
- * @param globalConfigurationInput
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public updateConfiguration(globalConfigurationInput: GlobalConfigurationInput, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public updateConfiguration(globalConfigurationInput: GlobalConfigurationInput, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public updateConfiguration(globalConfigurationInput: GlobalConfigurationInput, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public updateConfiguration(globalConfigurationInput: GlobalConfigurationInput, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
- if (globalConfigurationInput === null || globalConfigurationInput === undefined) {
- throw new Error('Required parameter globalConfigurationInput was null or undefined when calling updateConfiguration.');
- }
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarCredential: string | undefined;
- // authentication (PersonalAccessToken) required
- localVarCredential = this.configuration.lookupCredential('PersonalAccessToken');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
- }
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- // to determine the Content-Type header
- const consumes: string[] = [
- 'application/json'
- ];
- const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
- if (httpContentTypeSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
- }
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/settings/configurations/global`;
- return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: globalConfigurationInput,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Upload License Key File
- * @param file
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public uploadLicenseKeyFile(file: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public uploadLicenseKeyFile(file: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public uploadLicenseKeyFile(file: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public uploadLicenseKeyFile(file: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
- if (file === null || file === undefined) {
- throw new Error('Required parameter file was null or undefined when calling uploadLicenseKeyFile.');
- }
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarCredential: string | undefined;
- // authentication (PersonalAccessToken) required
- localVarCredential = this.configuration.lookupCredential('PersonalAccessToken');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
- }
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
- // to determine the Content-Type header
- const consumes: string[] = [
- 'multipart/form-data'
- ];
-
- const canConsumeForm = this.canConsumeForm(consumes);
-
- let localVarFormParams: { append(param: string, value: any): any; };
- let localVarUseForm = false;
- let localVarConvertFormParamsToString = false;
- // use FormData to transmit files using content-type "multipart/form-data"
- // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
- localVarUseForm = canConsumeForm;
- if (localVarUseForm) {
- localVarFormParams = new FormData();
- } else {
- localVarFormParams = new HttpParams({encoder: this.encoder});
- }
-
- if (file !== undefined) {
- localVarFormParams = localVarFormParams.append('file', file) as any || localVarFormParams;
- }
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/settings/integrations/pure-variants/license-keys`;
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Validate The Token
- * @param scope
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public validateTheToken(scope?: Role, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public validateTheToken(scope?: Role, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public validateTheToken(scope?: Role, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public validateTheToken(scope?: Role, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
-
- let localVarQueryParameters = new HttpParams({encoder: this.encoder});
- if (scope !== undefined && scope !== null) {
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
- scope, 'scope');
- }
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/authentication/tokens`;
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- params: localVarQueryParameters,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
-}
diff --git a/frontend/src/app/openapi/api/integrations-pure-variants.service.ts b/frontend/src/app/openapi/api/integrations-pure-variants.service.ts
new file mode 100644
index 000000000..bd5f818ad
--- /dev/null
+++ b/frontend/src/app/openapi/api/integrations-pure-variants.service.ts
@@ -0,0 +1,421 @@
+/*
+ * SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Capella Collaboration
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * Do not edit the class manually.
+ + To generate a new version, run `make openapi` in the root directory of this repository.
+ */
+
+/* tslint:disable:no-unused-variable member-ordering */
+
+import { Inject, Injectable, Optional } from '@angular/core';
+import { HttpClient, HttpHeaders, HttpParams,
+ HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
+ } from '@angular/common/http';
+import { CustomHttpParameterCodec } from '../encoder';
+import { Observable } from 'rxjs';
+
+// @ts-ignore
+import { HTTPValidationError } from '../model/http-validation-error';
+// @ts-ignore
+import { PureVariantsLicensesInput } from '../model/pure-variants-licenses-input';
+// @ts-ignore
+import { PureVariantsLicensesOutput } from '../model/pure-variants-licenses-output';
+
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
+import { Configuration } from '../configuration';
+
+
+
+@Injectable({
+ providedIn: 'root'
+})
+export class IntegrationsPureVariantsService {
+
+ protected basePath = 'http://localhost';
+ public defaultHeaders = new HttpHeaders();
+ public configuration = new Configuration();
+ public encoder: HttpParameterCodec;
+
+ constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
+ if (configuration) {
+ this.configuration = configuration;
+ }
+ if (typeof this.configuration.basePath !== 'string') {
+ const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
+ if (firstBasePath != undefined) {
+ basePath = firstBasePath;
+ }
+
+ if (typeof basePath !== 'string') {
+ basePath = this.basePath;
+ }
+ this.configuration.basePath = basePath;
+ }
+ this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
+ }
+
+ /**
+ * @param consumes string[] mime-types
+ * @return true: consumes contains 'multipart/form-data', false: otherwise
+ */
+ private canConsumeForm(consumes: string[]): boolean {
+ const form = 'multipart/form-data';
+ for (const consume of consumes) {
+ if (form === consume) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ // @ts-ignore
+ private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
+ if (typeof value === "object" && value instanceof Date === false) {
+ httpParams = this.addToHttpParamsRecursive(httpParams, value);
+ } else {
+ httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
+ }
+ return httpParams;
+ }
+
+ private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
+ if (value == null) {
+ return httpParams;
+ }
+
+ if (typeof value === "object") {
+ if (Array.isArray(value)) {
+ (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
+ } else if (value instanceof Date) {
+ if (key != null) {
+ httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
+ } else {
+ throw Error("key may not be null if value is Date");
+ }
+ } else {
+ Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
+ httpParams, value[k], key != null ? `${key}.${k}` : k));
+ }
+ } else if (key != null) {
+ httpParams = httpParams.append(key, value);
+ } else {
+ throw Error("key may not be null if value is not object or array");
+ }
+ return httpParams;
+ }
+
+ /**
+ * Delete License Key File
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public deleteLicenseKeyFile(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public deleteLicenseKeyFile(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public deleteLicenseKeyFile(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public deleteLicenseKeyFile(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarCredential: string | undefined;
+ // authentication (PersonalAccessToken) required
+ localVarCredential = this.configuration.lookupCredential('PersonalAccessToken');
+ if (localVarCredential) {
+ localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
+ }
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/settings/integrations/pure-variants/license-keys/0`;
+ return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
+ /**
+ * Get License
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public getLicense(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public getLicense(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getLicense(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public getLicense(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarCredential: string | undefined;
+ // authentication (PersonalAccessToken) required
+ localVarCredential = this.configuration.lookupCredential('PersonalAccessToken');
+ if (localVarCredential) {
+ localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
+ }
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/settings/integrations/pure-variants`;
+ return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
+ /**
+ * Set License
+ * @param pureVariantsLicensesInput
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public setLicense(pureVariantsLicensesInput: PureVariantsLicensesInput, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public setLicense(pureVariantsLicensesInput: PureVariantsLicensesInput, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public setLicense(pureVariantsLicensesInput: PureVariantsLicensesInput, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public setLicense(pureVariantsLicensesInput: PureVariantsLicensesInput, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+ if (pureVariantsLicensesInput === null || pureVariantsLicensesInput === undefined) {
+ throw new Error('Required parameter pureVariantsLicensesInput was null or undefined when calling setLicense.');
+ }
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarCredential: string | undefined;
+ // authentication (PersonalAccessToken) required
+ localVarCredential = this.configuration.lookupCredential('PersonalAccessToken');
+ if (localVarCredential) {
+ localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
+ }
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+
+ // to determine the Content-Type header
+ const consumes: string[] = [
+ 'application/json'
+ ];
+ const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
+ if (httpContentTypeSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
+ }
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/settings/integrations/pure-variants`;
+ return this.httpClient.request('patch', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ body: pureVariantsLicensesInput,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
+ /**
+ * Upload License Key File
+ * @param file
+ * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
+ * @param reportProgress flag to report request and response progress.
+ */
+ public uploadLicenseKeyFile(file: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public uploadLicenseKeyFile(file: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public uploadLicenseKeyFile(file: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public uploadLicenseKeyFile(file: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+ if (file === null || file === undefined) {
+ throw new Error('Required parameter file was null or undefined when calling uploadLicenseKeyFile.');
+ }
+
+ let localVarHeaders = this.defaultHeaders;
+
+ let localVarCredential: string | undefined;
+ // authentication (PersonalAccessToken) required
+ localVarCredential = this.configuration.lookupCredential('PersonalAccessToken');
+ if (localVarCredential) {
+ localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
+ }
+
+ let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
+ if (localVarHttpHeaderAcceptSelected === undefined) {
+ // to determine the Accept header
+ const httpHeaderAccepts: string[] = [
+ 'application/json'
+ ];
+ localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
+ }
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
+ }
+
+ let localVarHttpContext: HttpContext | undefined = options && options.context;
+ if (localVarHttpContext === undefined) {
+ localVarHttpContext = new HttpContext();
+ }
+
+ let localVarTransferCache: boolean | undefined = options && options.transferCache;
+ if (localVarTransferCache === undefined) {
+ localVarTransferCache = true;
+ }
+
+ // to determine the Content-Type header
+ const consumes: string[] = [
+ 'multipart/form-data'
+ ];
+
+ const canConsumeForm = this.canConsumeForm(consumes);
+
+ let localVarFormParams: { append(param: string, value: any): any; };
+ let localVarUseForm = false;
+ let localVarConvertFormParamsToString = false;
+ // use FormData to transmit files using content-type "multipart/form-data"
+ // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
+ localVarUseForm = canConsumeForm;
+ if (localVarUseForm) {
+ localVarFormParams = new FormData();
+ } else {
+ localVarFormParams = new HttpParams({encoder: this.encoder});
+ }
+
+ if (file !== undefined) {
+ localVarFormParams = localVarFormParams.append('file', file) as any || localVarFormParams;
+ }
+
+ let responseType_: 'text' | 'json' | 'blob' = 'json';
+ if (localVarHttpHeaderAcceptSelected) {
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
+ responseType_ = 'text';
+ } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
+ responseType_ = 'json';
+ } else {
+ responseType_ = 'blob';
+ }
+ }
+
+ let localVarPath = `/api/v1/settings/integrations/pure-variants/license-keys`;
+ return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
+ {
+ context: localVarHttpContext,
+ body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
+ responseType: responseType_,
+ withCredentials: this.configuration.withCredentials,
+ headers: localVarHeaders,
+ observe: observe,
+ transferCache: localVarTransferCache,
+ reportProgress: reportProgress
+ }
+ );
+ }
+
+}
diff --git a/frontend/src/app/openapi/api/projects-models.service.ts b/frontend/src/app/openapi/api/projects-models.service.ts
index 8da3503a2..6d39e9823 100644
--- a/frontend/src/app/openapi/api/projects-models.service.ts
+++ b/frontend/src/app/openapi/api/projects-models.service.ts
@@ -18,40 +18,14 @@ import { HttpClient, HttpHeaders, HttpParams,
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
-// @ts-ignore
-import { Backup } from '../model/backup';
-// @ts-ignore
-import { BackupPipelineRun } from '../model/backup-pipeline-run';
-// @ts-ignore
-import { CreateBackup } from '../model/create-backup';
-// @ts-ignore
-import { DiagramCacheMetadata } from '../model/diagram-cache-metadata';
-// @ts-ignore
-import { GetRevisionsResponseModel } from '../model/get-revisions-response-model';
-// @ts-ignore
-import { GitModel } from '../model/git-model';
// @ts-ignore
import { HTTPValidationError } from '../model/http-validation-error';
// @ts-ignore
-import { PagePipelineRun } from '../model/page-pipeline-run';
-// @ts-ignore
-import { PatchGitModel } from '../model/patch-git-model';
-// @ts-ignore
import { PatchToolModel } from '../model/patch-tool-model';
// @ts-ignore
-import { PipelineRun } from '../model/pipeline-run';
-// @ts-ignore
-import { PostGitModel } from '../model/post-git-model';
-// @ts-ignore
import { PostToolModel } from '../model/post-tool-model';
// @ts-ignore
-import { SubmitT4CModel } from '../model/submit-t4-c-model';
-// @ts-ignore
-import { T4CModel } from '../model/t4-c-model';
-// @ts-ignore
import { ToolModel } from '../model/tool-model';
-// @ts-ignore
-import { ToolModelRestrictions } from '../model/tool-model-restrictions';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
@@ -124,184 +98,6 @@ export class ProjectsModelsService {
return httpParams;
}
- /**
- * Create Backup
- * @param projectSlug
- * @param modelSlug
- * @param createBackup
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public createBackup(projectSlug: string, modelSlug: string, createBackup: CreateBackup, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public createBackup(projectSlug: string, modelSlug: string, createBackup: CreateBackup, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public createBackup(projectSlug: string, modelSlug: string, createBackup: CreateBackup, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public createBackup(projectSlug: string, modelSlug: string, createBackup: CreateBackup, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
- if (projectSlug === null || projectSlug === undefined) {
- throw new Error('Required parameter projectSlug was null or undefined when calling createBackup.');
- }
- if (modelSlug === null || modelSlug === undefined) {
- throw new Error('Required parameter modelSlug was null or undefined when calling createBackup.');
- }
- if (createBackup === null || createBackup === undefined) {
- throw new Error('Required parameter createBackup was null or undefined when calling createBackup.');
- }
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarCredential: string | undefined;
- // authentication (PersonalAccessToken) required
- localVarCredential = this.configuration.lookupCredential('PersonalAccessToken');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
- }
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- // to determine the Content-Type header
- const consumes: string[] = [
- 'application/json'
- ];
- const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
- if (httpContentTypeSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
- }
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/projects/${this.configuration.encodeParam({name: "projectSlug", value: projectSlug, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/models/${this.configuration.encodeParam({name: "modelSlug", value: modelSlug, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/backups/pipelines`;
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: createBackup,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Create Git Model
- * @param projectSlug
- * @param modelSlug
- * @param postGitModel
- * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
- * @param reportProgress flag to report request and response progress.
- */
- public createGitModel(projectSlug: string, modelSlug: string, postGitModel: PostGitModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public createGitModel(projectSlug: string, modelSlug: string, postGitModel: PostGitModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public createGitModel(projectSlug: string, modelSlug: string, postGitModel: PostGitModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public createGitModel(projectSlug: string, modelSlug: string, postGitModel: PostGitModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
- if (projectSlug === null || projectSlug === undefined) {
- throw new Error('Required parameter projectSlug was null or undefined when calling createGitModel.');
- }
- if (modelSlug === null || modelSlug === undefined) {
- throw new Error('Required parameter modelSlug was null or undefined when calling createGitModel.');
- }
- if (postGitModel === null || postGitModel === undefined) {
- throw new Error('Required parameter postGitModel was null or undefined when calling createGitModel.');
- }
-
- let localVarHeaders = this.defaultHeaders;
-
- let localVarCredential: string | undefined;
- // authentication (PersonalAccessToken) required
- localVarCredential = this.configuration.lookupCredential('PersonalAccessToken');
- if (localVarCredential) {
- localVarHeaders = localVarHeaders.set('Authorization', 'Basic ' + localVarCredential);
- }
-
- let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
- if (localVarHttpHeaderAcceptSelected === undefined) {
- // to determine the Accept header
- const httpHeaderAccepts: string[] = [
- 'application/json'
- ];
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
- }
- if (localVarHttpHeaderAcceptSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
- }
-
- let localVarHttpContext: HttpContext | undefined = options && options.context;
- if (localVarHttpContext === undefined) {
- localVarHttpContext = new HttpContext();
- }
-
- let localVarTransferCache: boolean | undefined = options && options.transferCache;
- if (localVarTransferCache === undefined) {
- localVarTransferCache = true;
- }
-
-
- // to determine the Content-Type header
- const consumes: string[] = [
- 'application/json'
- ];
- const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
- if (httpContentTypeSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
- }
-
- let responseType_: 'text' | 'json' | 'blob' = 'json';
- if (localVarHttpHeaderAcceptSelected) {
- if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
- responseType_ = 'text';
- } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
- responseType_ = 'json';
- } else {
- responseType_ = 'blob';
- }
- }
-
- let localVarPath = `/api/v1/projects/${this.configuration.encodeParam({name: "projectSlug", value: projectSlug, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/models/${this.configuration.encodeParam({name: "modelSlug", value: modelSlug, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/modelsources/git`;
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: postGitModel,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- transferCache: localVarTransferCache,
- reportProgress: reportProgress
- }
- );
- }
-
/**
* Create New Tool Model
* @param projectSlug
@@ -388,21 +184,21 @@ export class ProjectsModelsService {
}
/**
- * Create New Tool Model
+ * Delete Tool Model
* @param projectSlug
- * @param postToolModel
+ * @param modelSlug
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
- public createNewToolModel_1(projectSlug: string, postToolModel: PostToolModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public createNewToolModel_1(projectSlug: string, postToolModel: PostToolModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public createNewToolModel_1(projectSlug: string, postToolModel: PostToolModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public createNewToolModel_1(projectSlug: string, postToolModel: PostToolModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+ public deleteToolModel(projectSlug: string, modelSlug: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
+ public deleteToolModel(projectSlug: string, modelSlug: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public deleteToolModel(projectSlug: string, modelSlug: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
+ public deleteToolModel(projectSlug: string, modelSlug: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
if (projectSlug === null || projectSlug === undefined) {
- throw new Error('Required parameter projectSlug was null or undefined when calling createNewToolModel_1.');
+ throw new Error('Required parameter projectSlug was null or undefined when calling deleteToolModel.');
}
- if (postToolModel === null || postToolModel === undefined) {
- throw new Error('Required parameter postToolModel was null or undefined when calling createNewToolModel_1.');
+ if (modelSlug === null || modelSlug === undefined) {
+ throw new Error('Required parameter modelSlug was null or undefined when calling deleteToolModel.');
}
let localVarHeaders = this.defaultHeaders;
@@ -437,15 +233,6 @@ export class ProjectsModelsService {
}
- // to determine the Content-Type header
- const consumes: string[] = [
- 'application/json'
- ];
- const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
- if (httpContentTypeSelected !== undefined) {
- localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
- }
-
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -457,11 +244,10 @@ export class ProjectsModelsService {
}
}
- let localVarPath = `/api/v1/projects/${this.configuration.encodeParam({name: "projectSlug", value: projectSlug, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/models`;
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
+ let localVarPath = `/api/v1/projects/${this.configuration.encodeParam({name: "projectSlug", value: projectSlug, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/models/${this.configuration.encodeParam({name: "modelSlug", value: modelSlug, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
+ return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
- body: postToolModel,
responseType: responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
@@ -473,29 +259,21 @@ export class ProjectsModelsService {
}
/**
- * Create Pipeline Run
+ * Get Model By Slug
* @param projectSlug
- * @param pipelineId
* @param modelSlug
- * @param backupPipelineRun
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
- public createPipelineRun(projectSlug: string, pipelineId: number, modelSlug: string, backupPipelineRun: BackupPipelineRun, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable;
- public createPipelineRun(projectSlug: string, pipelineId: number, modelSlug: string, backupPipelineRun: BackupPipelineRun, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public createPipelineRun(projectSlug: string, pipelineId: number, modelSlug: string, backupPipelineRun: BackupPipelineRun, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>;
- public createPipelineRun(projectSlug: string, pipelineId: number, modelSlug: string, backupPipelineRun: BackupPipelineRun, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable {
+ public getModelBySlug(projectSlug: string, modelSlug: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable |