Merge pull request #31166 from schultzp2020/constructor-parameters

refactor: convert constructor parameter properties for erasableSyntaxOnly compatibility
This commit is contained in:
Patrik Oldsberg
2025-10-15 18:56:42 +02:00
committed by GitHub
187 changed files with 1893 additions and 728 deletions
@@ -49,11 +49,15 @@ export class FirestoreKeyStore implements KeyStore {
);
}
private constructor(
private readonly database: Firestore,
private readonly path: string,
private readonly timeout: number,
) {}
private readonly database: Firestore;
private readonly path: string;
private readonly timeout: number;
private constructor(database: Firestore, path: string, timeout: number) {
this.database = database;
this.path = path;
this.timeout = timeout;
}
static async verifyConnection(
keyStore: FirestoreKeyStore,
@@ -70,15 +70,31 @@ export class CatalogAuthResolverContext implements AuthResolverContext {
);
}
public readonly logger: LoggerService;
public readonly tokenIssuer: TokenIssuer;
public readonly catalogIdentityClient: CatalogIdentityClient;
private readonly catalog: CatalogService;
private readonly auth: AuthService;
private readonly userInfo: UserInfoDatabase;
private readonly ownershipResolver?: AuthOwnershipResolver;
private constructor(
public readonly logger: LoggerService,
public readonly tokenIssuer: TokenIssuer,
public readonly catalogIdentityClient: CatalogIdentityClient,
private readonly catalog: CatalogService,
private readonly auth: AuthService,
private readonly userInfo: UserInfoDatabase,
private readonly ownershipResolver?: AuthOwnershipResolver,
) {}
logger: LoggerService,
tokenIssuer: TokenIssuer,
catalogIdentityClient: CatalogIdentityClient,
catalog: CatalogService,
auth: AuthService,
userInfo: UserInfoDatabase,
ownershipResolver?: AuthOwnershipResolver,
) {
this.logger = logger;
this.tokenIssuer = tokenIssuer;
this.catalogIdentityClient = catalogIdentityClient;
this.catalog = catalog;
this.auth = auth;
this.userInfo = userInfo;
this.ownershipResolver = ownershipResolver;
}
async issueToken(params: TokenParams) {
const { sub, ent = [sub], ...additionalClaims } = params.claims;
+21 -7
View File
@@ -28,14 +28,28 @@ import { OidcDatabase } from '../database/OidcDatabase';
import { json } from 'express';
export class OidcRouter {
private readonly oidc: OidcService;
private readonly logger: LoggerService;
private readonly auth: AuthService;
private readonly appUrl: string;
private readonly httpAuth: HttpAuthService;
private readonly config: RootConfigService;
private constructor(
private readonly oidc: OidcService,
private readonly logger: LoggerService,
private readonly auth: AuthService,
private readonly appUrl: string,
private readonly httpAuth: HttpAuthService,
private readonly config: RootConfigService,
) {}
oidc: OidcService,
logger: LoggerService,
auth: AuthService,
appUrl: string,
httpAuth: HttpAuthService,
config: RootConfigService,
) {
this.oidc = oidc;
this.logger = logger;
this.auth = auth;
this.appUrl = appUrl;
this.httpAuth = httpAuth;
this.config = config;
}
static create(options: {
auth: AuthService;
@@ -28,14 +28,28 @@ import { DateTime } from 'luxon';
import matcher from 'matcher';
export class OidcService {
private readonly auth: AuthService;
private readonly tokenIssuer: TokenIssuer;
private readonly baseUrl: string;
private readonly userInfo: UserInfoDatabase;
private readonly oidc: OidcDatabase;
private readonly config: RootConfigService;
private constructor(
private readonly auth: AuthService,
private readonly tokenIssuer: TokenIssuer,
private readonly baseUrl: string,
private readonly userInfo: UserInfoDatabase,
private readonly oidc: OidcDatabase,
private readonly config: RootConfigService,
) {}
auth: AuthService,
tokenIssuer: TokenIssuer,
baseUrl: string,
userInfo: UserInfoDatabase,
oidc: OidcDatabase,
config: RootConfigService,
) {
this.auth = auth;
this.tokenIssuer = tokenIssuer;
this.baseUrl = baseUrl;
this.userInfo = userInfo;
this.oidc = oidc;
this.config = config;
}
static create(options: {
auth: AuthService;