import type { IOAuthController, OAuthReq, OAuthTokenReq, OAuthTokenRes, Profile, SAMLResponsePayload, OIDCAuthzResponsePayload } from '../typings';
export declare class OAuthController implements IOAuthController {
    private connectionStore;
    private sessionStore;
    private codeStore;
    private tokenStore;
    private ssoTraces;
    private opts;
    private ssoHandler;
    private idFedApp;
    constructor({ connectionStore, sessionStore, codeStore, tokenStore, ssoTraces, opts, idFedApp }: {
        connectionStore: any;
        sessionStore: any;
        codeStore: any;
        tokenStore: any;
        ssoTraces: any;
        opts: any;
        idFedApp: any;
    });
    authorize(body: OAuthReq): Promise<{
        redirect_url?: string;
        authorize_form?: string;
        error?: string;
    }>;
    samlResponse(body: SAMLResponsePayload): Promise<{
        redirect_url?: string;
        app_select_form?: string;
        response_form?: string;
        error?: string;
    }>;
    oidcAuthzResponse(body: OIDCAuthzResponsePayload): Promise<{
        redirect_url?: string;
        response_form?: string;
        error?: string;
    }>;
    private _buildAuthorizationCode;
    /**
     * @openapi
     *
     * /oauth/token:
     *   post:
     *     tags:
     *       - OAuth
     *     summary: Code exchange
     *     operationId: oauth-code-exchange
     *     requestBody:
     *       content:
     *         application/x-www-form-urlencoded:
     *           schema:
     *             required:
     *               - client_id
     *               - client_secret
     *               - code
     *               - grant_type
     *               - redirect_uri
     *             type: object
     *             properties:
     *               grant_type:
     *                 type: string
     *                 description: Grant type should be 'authorization_code'
     *                 default: authorization_code
     *               client_id:
     *                 type: string
     *                 description: Use the client_id returned by the SAML connection API
     *               client_secret:
     *                 type: string
     *                 description: Use the client_secret returned by the SAML connection API
     *               code_verifier:
     *                 type: string
     *                 description: code_verifier against the code_challenge in the authz request (relevant to PKCE flow)
     *               redirect_uri:
     *                 type: string
     *                 description: Redirect URI
     *               code:
     *                 type: string
     *                 description: Code
     *       required: true
     *     responses:
     *       200:
     *         description: Success
     *         content:
     *           application/json:
     *             schema:
     *               type: object
     *               properties:
     *                 access_token:
     *                   type: string
     *                 token_type:
     *                   type: string
     *                 expires_in:
     *                   type: string
     *               example:
     *                 access_token: 8958e13053832b5af58fdf2ee83f35f5d013dc74
     *                 token_type: bearer
     *                 expires_in: "300"
     */
    token(body: OAuthTokenReq, authHeader?: string | null): Promise<OAuthTokenRes>;
    /**
     * @openapi
     *
     * /oauth/userinfo:
     *   get:
     *     tags:
     *       - OAuth
     *     summary: Get profile
     *     operationId: oauth-get-profile
     *     responses:
     *       200:
     *         description: Success
     *         content:
     *           application/json:
     *             schema:
     *               type: object
     *               properties:
     *                 id:
     *                   type: string
     *                 email:
     *                   type: string
     *                 firstName:
     *                   type: string
     *                 lastName:
     *                   type: string
     *                 roles:
     *                   type: array
     *                   items:
     *                     type: string
     *                 groups:
     *                   type: array
     *                   items:
     *                     type: string
     *                 raw:
     *                   type: object
     *                   properties: {}
     *                 requested:
     *                   type: object
     *                   properties: {}
     *               example:
     *                 id: 32b5af58fdf
     *                 email: jackson@coolstartup.com
     *                 firstName: SAML
     *                 lastName: Jackson
     *                 raw: {}
     *                 requested: {}
     */
    userInfo(token: string): Promise<Profile>;
}
