Skip to content

Commit

Permalink
Merge pull request #1589 from authts/fix-compiler-error
Browse files Browse the repository at this point in the history
Fix future compiler error
  • Loading branch information
pamapa authored Jul 18, 2024
2 parents 8eb41a3 + edc9c5f commit 77583a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/ResponseValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ import type { ClaimsService } from "./ClaimsService";
*/
export class ResponseValidator {
protected readonly _logger = new Logger("ResponseValidator");
protected readonly _userInfoService = new UserInfoService(this._settings, this._metadataService);
protected readonly _tokenClient = new TokenClient(this._settings, this._metadataService);
protected readonly _userInfoService: UserInfoService;
protected readonly _tokenClient: TokenClient;

public constructor(
protected readonly _settings: OidcClientSettingsStore,
protected readonly _metadataService: MetadataService,
protected readonly _claimsService: ClaimsService,
) {}
) {
this._userInfoService = new UserInfoService(this._settings, this._metadataService);
this._tokenClient = new TokenClient(this._settings, this._metadataService);
}

public async validateSigninResponse(response: SigninResponse, state: SigninState, extraHeaders?: Record<string, ExtraHeader>): Promise<void> {
const logger = this._logger.create("validateSigninResponse");
Expand Down
8 changes: 5 additions & 3 deletions src/utils/Event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ export type Callback<EventType extends unknown[]> = (...ev: EventType) => (Promi
* @internal
*/
export class Event<EventType extends unknown[]> {
protected readonly _logger = new Logger(`Event('${this._name}')`);
protected readonly _logger: Logger;

private _callbacks: Array<Callback<EventType>> = [];
private readonly _callbacks: Array<Callback<EventType>> = [];

public constructor(protected readonly _name: string) {}
public constructor(protected readonly _name: string) {
this._logger = new Logger(`Event('${this._name}')`);
}

public addHandler(cb: Callback<EventType>): () => void {
this._callbacks.push(cb);
Expand Down

0 comments on commit 77583a3

Please sign in to comment.