import type { SAMLProfile } from '@boxyhq/saml20/dist/typings';
import type { Storable, SAMLSSORecord, OIDCSSORecord, IdentityFederationApp, SSOTracesInstance, SSOTrace, JacksonOptionWithRequiredLogger } from '../typings';
export declare class SSOHandler {
    private connection;
    private session;
    private opts;
    constructor({ connection, session, opts, }: {
        connection: Storable;
        session: Storable;
        opts: JacksonOptionWithRequiredLogger;
    });
    resolveConnection(params: {
        authFlow: 'oauth' | 'saml' | 'idp-initiated';
        originalParams: Record<string, any>;
        tenant?: string;
        product?: string;
        entityId?: string;
        iss?: string;
        idp_hint?: string;
        idFedAppId?: string;
        fedType?: string;
        thirdPartyLogin?: {
            idpInitiatorType?: 'oidc' | 'saml';
            iss?: string;
            target_link_uri?: string;
        };
        tenants?: string[];
        ssoTraces?: {
            instance: SSOTracesInstance;
            context: SSOTrace['context'];
        };
    }): Promise<{
        connection: SAMLSSORecord | OIDCSSORecord;
    } | {
        redirectUrl: string;
    } | {
        postForm: string;
    }>;
    createSAMLRequest({ connection, requestParams, mappings, }: {
        connection: SAMLSSORecord;
        requestParams: Record<string, any>;
        mappings: IdentityFederationApp['mappings'];
    }): Promise<{
        redirect_url: any;
        authorize_form: any;
    }>;
    createOIDCRequest({ connection, requestParams, mappings, ssoTraces, }: {
        connection: OIDCSSORecord;
        requestParams: Record<string, any>;
        mappings: IdentityFederationApp['mappings'];
        ssoTraces: {
            instance: SSOTracesInstance;
            context: SSOTrace['context'];
        };
    }): Promise<{
        redirect_url: string;
        authorize_form: null;
    }>;
    createSAMLResponse: ({ profile, session }: {
        profile: SAMLProfile;
        session: any;
    }) => Promise<{
        responseForm: string;
    }>;
    private createSession;
}
