From 3a9d6bb2fa95a66e1fd60cd203801a27a9de15a2 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Fri, 27 Nov 2020 15:32:35 -0500 Subject: [PATCH] fix(typing): Export Multi SAML types --- src/passport-saml/multiSamlStrategy.ts | 8 +------- src/passport-saml/types.ts | 6 ++++++ 2 files changed, 7 insertions(+), 7 deletions(-) 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; +}