diff --git a/src/passport-saml/multiSamlStrategy.ts b/src/passport-saml/multiSamlStrategy.ts index 860c56c9..fa00d77e 100644 --- a/src/passport-saml/multiSamlStrategy.ts +++ b/src/passport-saml/multiSamlStrategy.ts @@ -3,13 +3,7 @@ import * as saml from './saml'; import {CacheProvider as InMemoryCacheProvider} from './inmemory-cache-provider'; import SamlStrategy = require('./strategy'); import type { Request } from 'express'; -import { AuthenticateOptions, AuthorizeOptions, RequestWithUser, SamlConfig, VerifyWithoutRequest, VerifyWithRequest } from './types'; - -type SamlOptionsCallback = (err: Error | null, samlOptions?: SamlConfig) => void; - -interface MultiSamlConfig extends SamlConfig { - getSamlOptions(req: Request, callback: SamlOptionsCallback): void; -} +import { AuthenticateOptions, AuthorizeOptions, MultiSamlConfig, RequestWithUser, VerifyWithoutRequest, VerifyWithRequest } from './types'; class MultiSamlStrategy extends SamlStrategy { _options: MultiSamlConfig diff --git a/src/passport-saml/types.ts b/src/passport-saml/types.ts index b7daa3a8..59734c54 100644 --- a/src/passport-saml/types.ts +++ b/src/passport-saml/types.ts @@ -135,3 +135,9 @@ export type VerifiedCallback = (err: Error | null, user?: Record void; export type VerifyWithoutRequest = (profile: Profile | null | undefined, done: VerifiedCallback) => void; + +export type SamlOptionsCallback = (err: Error | null, samlOptions?: SamlConfig) => void; + +export interface MultiSamlConfig extends SamlConfig { + getSamlOptions(req: express.Request, callback: SamlOptionsCallback): void; +}