Skip to content

Commit a4699b5

Browse files
Revised AbstractStrategy for authenticate method to match PassportStrategy expectation
1 parent 2d10c9a commit a4699b5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/multiSamlStrategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class MultiSamlStrategy extends AbstractStrategy {
3939
this._options = samlConfig;
4040
}
4141

42-
authenticate(req: RequestWithUser, options: AuthenticateOptions): void {
42+
authenticate(req: Request, options: AuthenticateOptions): void {
4343
this._options.getSamlOptions(req, (err, samlOptions) => {
4444
if (err) {
4545
return this.error(err);

src/strategy.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
VerifyWithoutRequest,
1111
VerifyWithRequest,
1212
} from "./types";
13+
import { Request } from "express";
1314

1415
export abstract class AbstractStrategy extends PassportStrategy {
1516
static readonly newSamlProviderOnConstruct: boolean;
@@ -56,7 +57,7 @@ export abstract class AbstractStrategy extends PassportStrategy {
5657
this._passReqToCallback = !!options.passReqToCallback;
5758
}
5859

59-
authenticate(req: RequestWithUser, options: AuthenticateOptions): void {
60+
authenticate(req: Request, options: AuthenticateOptions): void {
6061
if (this._saml == null) {
6162
throw new Error("Can't get authenticate without a SAML provider defined.");
6263
}
@@ -256,7 +257,7 @@ export abstract class AbstractStrategy extends PassportStrategy {
256257
redirect(url: string, status?: number): void {
257258
super.redirect(url, status);
258259
}
259-
success(user: any, info?: any): void {
260+
success(user: unknown, info?: unknown): void {
260261
super.success(user, info);
261262
}
262263
}

0 commit comments

Comments
 (0)