import type { OAuthProfile } from "../oauth/types"; import { consumeSamlAssertion, InMemorySamlAssertionReplayStore, REPLAY_RETENTION_MS, resetSamlReplayCacheForTests, setSamlAssertionReplayStoreForTests } from "./samlAssertionReplay"; interface SamlServiceProviderOptions { idpSsoUrl: string; idpCert: string; spEntityId: string; acsUrl: string; idpIssuer: string; wantAssertionsSigned?: boolean; wantAuthnResponseSigned?: boolean; disableRequestedAuthnContext?: boolean; } interface NodeSamlProfile { ID?: string; nameID?: string; email?: string; name?: string; issuer?: string; sessionIndex?: string | string[]; getAssertion?: () => { Assertion?: { $?: { ID?: string; }; }; }; [key: string]: unknown; } type NodeSamlClient = { getAuthorizeUrlAsync(relayState: string, host: string | undefined, options: object): Promise; validatePostResponseAsync(container: Record): Promise<{ profile: NodeSamlProfile | null; loggedOut: boolean; }>; }; declare function readSamlEnvOptions(): SamlServiceProviderOptions; type NodeSamlModule = { SAML: new (options: Record) => NodeSamlClient; }; declare function setNodeSamlLoaderForTests(loader: (() => Promise) | null): void; declare class SamlServiceProvider { private readonly options; private client; constructor(options: SamlServiceProviderOptions); private getClient; authorizationUrl(relayState: string): Promise; consumePost(samlResponse: string, relayState?: string): Promise; } declare function createSamlServiceProvider(options?: SamlServiceProviderOptions): SamlServiceProvider; export type { SamlServiceProviderOptions }; export { consumeSamlAssertion, createSamlServiceProvider, InMemorySamlAssertionReplayStore, REPLAY_RETENTION_MS, readSamlEnvOptions, resetSamlReplayCacheForTests, SamlServiceProvider, setNodeSamlLoaderForTests, setSamlAssertionReplayStoreForTests, };